@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  .container {
    max-width: 1440px;
    margin: 0 auto;
  }

  .translate-x-full {
    transform: translateX(100%);
  }

  .hidden {
    display: none;
  }

  .no-scroll {
    overflow: hidden;
  }


  .overlay-text {
    position: absolute;
    bottom: 18px;
    left: 30px;
    font-family: "Inter", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 33.89px;
    text-align: left;
    color: white;
  }

  #thumbnails img {
    height: 100px;
    width: 210px;
  }

  .overlay-text-1 {
    position: absolute;
    bottom: 18px;
    left: 30px;
    font-family: "Inter", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 33.89px;
    text-align: left;
    color: white;
  }

  .overlay-text-2 {
    position: absolute;
    bottom: 18px;
    left: 30px;
    font-family: "Inter", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 33.89px;
    text-align: left;
    color: white;
  }

  .relative-container {
    position: relative;
    width: max-content;
    margin: 0 auto;
  }

  .search-hotel h2 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 36.31px;
    text-align: left;
    color: rgba(0, 0, 0, 0.8);
  }

  .search-hotel p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 32px;
    text-align: left;
    color: rgba(0, 0, 0, 0.6)
  }

  .active {
    background-color: rgba(0, 0, 0, 0.8);
    color: #FFFFFF;
  }

  .no-scroll {
    overflow: hidden;
  }

  #room-price {
    display: inline-block;
  }

  #modalImage {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
  }

  #modalImage.fade-out {
    opacity: 0;
  }

  .header-container {
    border-radius: 0px, 0px, 30px, 30px;
  }

  .title-design {
    top: -20px;
    right: -32px;
    position: absolute;
  }

  .active {
    background-color: rgba(0, 0, 0, 0.8);
    /* Example active color */
    color: #FFFFFF;
    /* Example active text color */
  }

  .overlay {
    position: absolute;
    top: 30px;
    left: 45px;
  }

  .content {
    margin-top: 20px;
  }


  .transition-opacity {
    transition: opacity 1s ease-in-out;
  }




}

/* Mobile slide-in nav: must paint above the positioned page sections below it */
#nav-menu {
  z-index: 100;
}

#cancel-button {
  z-index: 101;
}

/* Gallery preview: keep tall images inside the viewport */
#modalImage {
  max-height: 80vh;
  object-fit: contain;
}

@media (max-width: 767px) {
  #modalImage {
    max-height: 70vh;
  }
}

/* Gallery preview: hold the frame open and hide the stale/blank image until the
   next photo is decoded, so opening the modal never flashes a broken image */
#modalImageFrame.is-loading {
  min-height: 45vh;
}

#modalImageFrame.is-loading #modalImage {
  opacity: 0;
}

.modal-spinner {
  display: none;
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: modal-spin 0.8s linear infinite;
}

#modalImageFrame.is-loading .modal-spinner {
  display: block;
}

@keyframes modal-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-spinner {
    animation-duration: 2s;
  }

  #modalImage {
    transition-duration: 0.01ms;
  }
}

/* Video Modal */
#videoModal {
  z-index: 1000;
}

#modalVideo {
  max-height: 80vh;
}

@media (max-width: 767px) {
  #modalVideo {
    max-height: 60vh;
  }
}
