/* Ana konteyner: Etiketleri ekrana sabitler */
.global-label-container {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.measurement-label {
    position: absolute;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px;
    font-size: 12px;
    border-radius: 5px;
    border: 3px solid black;
    white-space: nowrap;
    pointer-events: none; /* İsterseniz etkileşimi kapatma */
  }


.compass-container {
    position: fixed;
    right: 0.875rem;
    bottom: 0.875rem;
    width: clamp(8rem, 9vw, 12.5rem);
    width: clamp(8rem, 9vw, 12.5rem);
    pointer-events: none;
    user-select: none;
    z-index: 1000;
    transform-origin: center center;
}

.compass-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

.toolbar-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 0px 0px 20px 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: clamp(8px, 1.2vh, 20px);
    z-index: 1000;
    opacity: 1;
    width: clamp(300px, 80vw, 1200px);
    max-width: 100%;
    min-width: fit-content;
    height: auto;
    overflow: visible !important;
    padding-block: clamp(6px, 1vh, 12px) clamp(8px, 1vw, 12px);
    padding-bottom: clamp(12px, 2vh, 16px) !important;
}

.toolbar-container:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
}

.toolbar-buttons {
    display: flex;
    /* gap: clamp(6px, 1vw, 10px); */
    gap: clamp(4px, 0.5vw, 6px);
    padding: 0 15px;
    justify-content: center;
    align-items: center;
}

.toolbar-button {
    background-color: inherit;
    opacity: 1;
    color: white !important;
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
    padding: clamp(6px, 1vw, 12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.toolbar-button:hover {
    transform: scale(1.1);
    background-color: inherit;
}

.toolbar-button path {
    fill: white !important;
    width: clamp(10px, 2.5vw, 24px) !important;
    height: clamp(10px, 2.5vw, 24px) !important;
}

.toolbar-button .button-selected path {
    fill: rgba(33, 92, 229, 1) !important;
    width: clamp(10px, 2.5vw, 24px) !important;
    height: clamp(10px, 2.5vw, 24px) !important;
}

.toolbar-button span {
    display: none;
    font-size: 12px;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px;
    border-radius: 3px;
    position: absolute;
    bottom: -30px;
    white-space: nowrap;
}

.toolbar-button:hover span {
    display: inline;
}

.toolbar-button .tooltip {
    display: none;
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.3rem;
    font-size: 1rem;
    white-space: nowrap;
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.toolbar-button:hover .tooltip {
    display: block;
}

.toolbar-divider {
    width: 0px;
    height: clamp(42px, 5vh, 50px);
    /* margin: 0 10px; */
    margin: 0 4px;
    border: 0.1px solid white;
}

.button-label {
    font-weight: 500;
    color: white;
}

.constant-toolbar-button:disabled {
    opacity: 0.5;
    filter: grayscale(20%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.toolbar-save-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgb(43, 44, 46);
    border-radius: 32px;
}

.toolbar-save-pill .save-btn {
    position:relative;  
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    padding:0 6px;  
    background: transparent;
    min-height:42px; 
    height:100%; 
}

.save-switch-root {
    width: 40px !important;
    height: 22px !important;
    padding: 0 !important;
    align-items: center;
}

.save-switch-thumb {
    width: 18px !important;
    height: 18px !important;
    box-shadow: none !important;
    background: #fff !important;
}

.save-switch-track {
    background: rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    opacity: 1 !important;
    transition: background 0.2s;
}

.save-switch-base.Mui-checked + .save-switch-track {
    background: #1d4ed8 !important;
    border-color: #1d4ed8;
}

.save-switch-base.Mui-checked {
    transform: translateX(20px);
}

.save-switch-track.Mui-disabled {
    opacity: 0.4 !important;
}

.save-auto-label {
    margin-top: 2px;
    font-size: 7.6px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    pointer-events: none; 
    white-space:nowrap;    
}

.toolbar-help-button {
    color: #fff !important;
    border: none;
    border-radius: 50%;
    width: clamp(14px, 1.2vw, 20px) !important;
    height: clamp(14px, 1.2vw, 20px) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 2px 8px rgba(33, 92, 229, 0.15);
    position: relative;
    transition: background 0.2s, transform 0.2s;
}


.toolbar-help-button svg,
.toolbar-help-button path {
    fill: #fff !important;
    width: clamp(18px, 2vw, 24px);
    height: clamp(18px, 2vw, 24px);
}

.toolbar-help-button .tooltip {
    display: none;
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(33, 92, 229, 0.95);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    font-size: 0.95rem;
    white-space: nowrap;
    z-index: 1002;
    box-shadow: 0px 4px 12px rgba(33, 92, 229, 0.12);
}

.toolbar-help-button:hover .tooltip {
    display: block;
}


/* Tam sayfayı kaplayan yarı saydam overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* arka planı koyulaştır */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 9999;
    font-family: Times New Roman, serif;
}

/* Spinner'ı ve ortadaki logoyu sarmalayan kutu */
.spinner-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

/* Logo ortada duracak */
.spinner-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px; /* logo boyutu */
    height: 50px; /* orantılı olması için sadece width ya da sadece height verebilirsin */
    transform: translate(-50%, -50%);
    z-index: 2; /* spinnerın üstünde */
}

/* Dönen halka */
.spinner-ring {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 8px solid rgba(255, 255, 255, 0.2); /* dış halka */
    border-top: 8px solid #fff; /* üst kısım daha belirgin */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1; /* logonun altında */
}

/* İstersen spinner ortasında da bir yüzde gösterebilirsin (yukarıdaki JSX'te .spinner-percentage) */
/* 
.spinner-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 14px;
  transform: translate(-50%, -50%);
  z-index: 3;
}
*/

/* Döndürme animasyonu */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mesaj ve progress alanları */
.loading-message {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.loading-progress {
    font-size: 1rem;
    color: #ddd;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* yarı saydam arka plan */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #ffffff;
}

/* .popup-content {
  background-color: rgb(0, 0, 0);
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(191, 174, 174, 0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
  font-family: sans-serif;
  animation: fadeIn 0.2s ease-out;
  position : relative;
} */

.popup-content {
    background-color: rgba(43, 44, 46, 1);
    padding: 20px 24px;
    border-radius: 10px;
    width: 328px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.popup-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    text-align: center;
    margin-bottom: 16px;
    width: 280px;
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 280px;
}

.popup-actions.single {
    justify-content: center;
}

.popup-button {
    width: 135px;
    height: 40px;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.popup-cancel {
    background-color: #555;
    color: white;
}

.popup-confirm {
    background-color: rgba(33, 92, 229, 1);
    color: white;
}

.popup-button:hover {
    filter: brightness(1.1);
}

.popup-close-button {
    position: absolute;
    top: 2%;
    right: 1%;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: rgba(43, 44, 46, 1);
    color: #ab4141;

    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;

    border: none;
    border-radius: 8px;
    cursor: pointer;

    transition: background 0.2s ease, color 0.2s ease;
}

.popup-close-button:hover {
    filter: brightness(1.2);
}

