/* Ensure the embed route provides a full-height container so
 the Cesium map's internal layout (which uses 100% heights)
 can fill the viewport. */

.map-exploration-section {
  height: 100vh;
  width: 100%;
  padding: 0;
  margin: 0;
  display: block;
  position: relative;
  overflow: visible;
}

/* Transparent background for the map section */
.map-exploration-section.transparent-map {
  background: transparent;
}

/* Modal-style fullscreen overlay (keeps navbar visible) */
.fullscreen-overlay {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 10050;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
  transition: opacity 200ms ease, transform 260ms cubic-bezier(0.2,0,0,1);
  transform: translateY(0);
}

.fullscreen-shell {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
}

/* Close button shown inside modal */
.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10060;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 0 15px 0 15px;
  background: linear-gradient(90deg, #D4AF37, #F9E339);
  color: #fffffe;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

.modal-close-btn:hover {
  filter: brightness(1.06);
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.45);
}

.modal-close-btn:active {
  transform: scale(0.96);
}

.modal-close-btn.rtl {
  right: auto;
  left: 12px;
}

/* Prevent background page scroll when modal open */
body.modal-open {
  overflow: hidden !important;
}

.fullscreen-btn {
  position: absolute;
  top: auto;
  bottom: 20px;
  right: auto;
  left: 80px !important;
  transform: rotate(-45deg);
  width: 75px;
  height: 75px;
  border: none;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #D4AF37 0%, #F9E339 50%, #D4AF37 100%);
  color: #fffffe;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 25px rgba(212, 175, 55, 0.6),
    0 5px 12px rgba(0, 0, 0, 0.35),
    inset 0 3px 6px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(10, 4, 67, 0.3);
  z-index: 10000;
  pointer-events: auto;
  overflow: hidden;
  animation: embedButtonBounce 1.8s ease-in-out infinite;
  border: 3px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.fullscreen-btn:hover {
  filter: brightness(1.25);
  transform: rotate(-45deg) translateY(-8px) scale(1.15);
  box-shadow: 
    0 15px 35px rgba(212, 175, 55, 0.8),
    0 8px 18px rgba(0, 0, 0, 0.45),
    inset 0 3px 8px rgba(255, 255, 255, 0.5),
    0 0 25px rgba(249, 227, 57, 0.6),
    0 0 0 4px rgba(10, 4, 67, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.fullscreen-btn img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  transform: rotate(45deg);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  transition: all 0.3s ease;
}

.fullscreen-btn:active {
  transform: rotate(-45deg) scale(0.98);
  box-shadow: 
    0 5px 15px rgba(212, 175, 55, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.35),
    inset 0 3px 6px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(10, 4, 67, 0.3);
}

.fullscreen-btn .tunisia-mini-icon {
  display: block;
}

.fullscreen-btn.rtl {
  right: auto;
  left: 80px !important;
}

@media (max-width: 768px) {
  .fullscreen-btn {
    top: auto;
    bottom: 16px;
    left: 70px !important;
    transform: rotate(-45deg);
    width: 68px;
    height: 68px;
  }
  .fullscreen-btn:hover {
    transform: rotate(-45deg) translateY(-5px) scale(1.1);
  }
  .fullscreen-btn:active {
    transform: rotate(-45deg) scale(0.98);
  }
  .fullscreen-btn.rtl {
    right: auto;
    left: 70px !important;
  }
  .fullscreen-btn img {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 480px) {
  .fullscreen-btn {
    top: auto;
    bottom: 12px;
    left: 60px !important;
    transform: rotate(-45deg);
    width: 62px;
    height: 62px;
  }
  .fullscreen-btn:hover {
    transform: rotate(-45deg) translateY(-4px) scale(1.08);
  }
  .fullscreen-btn:active {
    transform: rotate(-45deg) scale(0.98);
  }
  .fullscreen-btn.rtl {
    right: auto;
    left: 60px !important;
  }
  .fullscreen-btn img {
    width: 42px;
    height: 42px;
  }
}

@keyframes embedButtonBounce {
  0%,
  100% {
    margin-bottom: 0;
  }
  50% {
    margin-bottom: 6px;
  }
}

.iframe-zoom-controls {
  position: absolute;
  top: 16px;
  right: 20px;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5002;
}

.iframe-zoom-controls.rtl {
  right: auto;
  left: 20px;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 0 15px 0 15px;
  background: linear-gradient(90deg, #D4AF37, #F9E339);
  color: #fffffe;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
  pointer-events: auto;
  user-select: none;
}

.zoom-btn:hover {
  filter: brightness(1.15);
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.5);
}

.zoom-btn:active {
  transform: scale(0.96);
}

.zoom-btn.rtl {
  right: auto;
  left: 20px;
}

/* Override Cesium button styles if needed */
button::-moz-focus-inner {
  border: 0;
}

/* Mobile-only interact button: centered at very top */
.mobile-interact-btn {
  display: none; /* hidden by default, shown on small screens */
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  padding: 8px 14px;
  border-radius: 18px;
  background: linear-gradient(90deg, #D4AF37, #F9E339);
  color: #fffffe;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

@media (max-width: 768px) {
  .mobile-interact-btn { display: block; top: 76px; }
}

.mobile-interact-btn.active {
  background: linear-gradient(90deg, #E3BE4A, #F9E339);
  color: #fffffe;
}

@media (max-width: 720px) {
  :host ::ng-deep app-cesium-map .info-panel .panel-scroll-body {
    direction: ltr;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-inline-end: 2px;
  }

  :host ::ng-deep app-cesium-map .info-panel .panel-scroll-body::-webkit-scrollbar {
    width: 8px;
  }

  :host ::ng-deep app-cesium-map .info-panel .panel-scroll-body::-webkit-scrollbar-track {
    background: transparent;
  }

  :host ::ng-deep app-cesium-map .info-panel .panel-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
  }
}
