:root {
  color-scheme: light dark;
  &:has(input[name="color-scheme"][value="dark"]) {
    color-scheme: dark;
  }
  &:has(input[name="color-scheme"][value="light"]:checked) {
    color-scheme: light;
  }
}

* {
  box-sizing: content-box;
  margin: 0;
  padding: 0;
}
  
html,body{
  font-family: Roboto !important;
  overflow: hidden;
}

#main-container {
  overflow: hidden;
  position: absolute;
  padding: 0%;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}


 
.color-scheme-toggle {
  top: 2vh;
  display: flex; 
  position: absolute;
  padding: 0;
  height: 30px;
  width: 150px;
  right:1vw;
  justify-content: space-evenly;
  align-items: center;
  margin: 10px 
}

@media only screen and (max-width: 460px) {
  .color-scheme-toggle {
    display: flex; 
    position: absolute;
    justify-content: center;
    flex-direction: column-reverse;
    top:20vh;
    right:-10vw;
  } 
}

.color-scheme-toggle label img {
  
  width: 160%;
} 

.scheme-label {
  display: inline-block;
  cursor: pointer;
}

.scheme-label input[type="radio"] {
  display: none;
}

.scheme-label img {
  border: 2px solid transparent;
  padding: 2px;
}


/* Layer control container */
#layer-control {
  position: absolute;
  bottom: 1vh;
  left: 1vw;
  z-index: 1000;
  display: flex;
  flex-direction: row;
}

/* Main layer toggle that's always visible */
.main-toggle {
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Hidden layer toggles container */
.hidden-toggles {
  display: none;
  flex-direction: row;
  margin-left: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 5px;
  transition: all 0.3s ease;
}

/* Show hidden toggles on hover */
#layer-control:hover .hidden-toggles {
  display: flex;
}

/* Layer toggle styles */
.layer-toggle,
.main-layer-toggle {
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 25%;
  border: 2px solid light-dark(#4686bb, #000);
  box-shadow: 0 0 5px light-dark(#4686bb55, #00000054);
  margin: 5px;
  position: relative;
}

.layer-toggle img,
.main-layer-toggle img {
  width: 40px;
  height: 40px;
  border-radius: 25%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.layer-toggle img:hover,
.main-layer-toggle img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px light-dark(#4686bb55, #00000054);
}

/* Placeholder styles */
.placeholder {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: light-dark(#3179b594, #16020ecb);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.layer-toggle:hover .placeholder,
.main-layer-toggle:hover .placeholder {
  opacity: 1;
}

.layer-toggle:first-child,
.main-layer-toggle:first-child .placeholder {
  margin-right: 5px;
}

#imageContainer {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Sabit genişlik */
  gap: 10px;
}
.media-item {
  width: 300px; /* Sabit genişlik */
  height: 200px; /* Sabit yükseklik */
  object-fit: cover; /* Görüntü kesilmeden boyutlandır */
  border: 1px solid #ddd;
  border-radius: 4px;
}

.zemin-info-hover {
    display: inline-block;
    position: relative;
    cursor: help;
    color: #007BFF;
    font-weight: bold;
    margin-left: 4px;
}

.zemin-info-hover .hover-table {
    display: none;
    position: absolute;
    top: 1.5em;
    left: 0;
    z-index: 1000;
    background-color: #fff;
    color: #000;
    border: 1px solid #999;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
    padding: 4px;
    font-size: 12px;
    width: 400px;
    white-space: normal;
    word-wrap: break-word;
}

.zemin-info-hover:hover .hover-table {
    display: block;
}

.zemin-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

.zemin-table th, .zemin-table td {
    border: 1px solid #ccc;
    padding: 4px;
    text-align: left;
    font-size: 11px;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
}

.zemin-table th:nth-child(1), .zemin-table td:nth-child(1) {
    width: 70px;
}

.zemin-table th:nth-child(2), .zemin-table td:nth-child(2) {
    width: 230px;
}

.zemin-table th:nth-child(3), .zemin-table td:nth-child(3) {
    width: 80px;
}

.zemin-highlight {
    background-color: #fff4cc !important;
    font-weight: bold;
}

.zemin-cell-hover {
    position: relative;
}

.hover-table {
    display: none;
    position: absolute;
    top: 100%;
    left: 100%;
    margin-top: 4px;
    margin-left: 4px;
    background-color: white;
    border: 1px solid #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 8px;
    z-index: 9999;
    max-width: 600px; /* daha geniş */
}

.hover-table table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    white-space: normal;
    font-size: 10px; /* küçültülmüş yazı boyutu */
}

.hover-table caption {
    caption-side: top;
    font-weight: bold;
    text-align: center;
    padding-bottom: 6px;
    font-size: 11.5px;
}

.hover-table th,
.hover-table td {
    border: 1px solid #ccc;
    padding: 4px;
    text-align: center;
    word-wrap: break-word;
}

/* Sütun oranları: sol (1), orta (3), sağ (1) */
.hover-table td:nth-child(1),
.hover-table th:nth-child(1) {
    width: 60px;
}

.hover-table td:nth-child(2),
.hover-table th:nth-child(2) {
    width: 360px; /* Zemin Cinsi: genişletildi */
}

.hover-table td:nth-child(3),
.hover-table th:nth-child(3) {
    width: 100px;
}


.zemin-cell-hover:hover .hover-table {
    display: block;
}


/* popup içindeki kamera videoları 
.media-popup .media-container {
  width: 100%;
  height: 65vh;       
  min-height: 420px;
  background: black;
}*/

.media-popup .media-container {
  width: 100%;
  aspect-ratio: 16 / 9;   /* 🔥 kritik nokta */
  max-height: 70vh;
  background: black;
}


/* video.js wrapper */
.media-popup .video-js {
  width: 100% !important;
  height: 100% !important;
}


.media-popup video,
.media-popup .video-js video {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* kırpma YOK */
}


@media (max-width: 768px) {
  .media-popup .media-container {
    width: 92vw;        /* 🔥 ekranın tamamı değil */
    max-width: 92vw;
    height: auto;       /* 🔥 yükseklik otomatik */
    max-height: none;   /* vh etkisini sıfırla */
    margin: 0 auto;     /* ortala */
  }
}
