@import url("./root.css");

.header {
  height: 60px;
  background-color: var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 100;
}


.legend {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .legend {
    flex-direction: row;
  }
}

.legend-item {
  display: flex;
  align-items: center;
  margin-right: 1.25rem;
  margin-bottom: 0.5rem;
}

.color-box {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.available {
  background-color: var(--available-color);
}

.occupied {
  background-color: var(--occupied-color);
}

.clickable {
  background-color: var(--white);
  border: 1px solid var(--border-color);
}

.floor-selection {
  margin: 1rem auto;
  padding: 1rem 0;
  position: relative;
}



.scrollbar-hide {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scroll-shadow-left::before,
.scroll-shadow-right::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.scroll-shadow-left::before {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
}

.scroll-shadow-right::after {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
}

.floor-btn {
  font-family: 'Erode', sans-serif;
  font-weight: 500;
    font-size: 0.875rem;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem;
  background-color: var(--secondary-color);
  color: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  margin-bottom: 10px;
}

@media (min-width: 768px) {
  .floor-btn {
    font-size: 1rem;
  }
}

.floor-btn:hover {
  background-color: var(--primary-color);
}

.floor-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.content-container {
  background-color: var(--white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  aspect-ratio: 1200 / 800;
  margin-top: 1rem;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.loading-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(124, 92, 38, 0.3);
  border-radius: 50%;
  border-top-color: var(--secondary-color);
  animation: spin 1s linear infinite;
}

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

.floor-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
  opacity: 0;
  display: none;
}

.floor-content.active {
  opacity: 1;
  display: block;
}

.sel-container {
  position: relative;
  overflow: hidden;
}

.clickable-path {
  cursor: pointer;
  transition: stroke 0.2s ease;
}

.clickable-path:hover {
  stroke: #f1bd78 !important;
  stroke-width: 4 !important;
}

.booked {
  stroke: #666 !important;
  cursor: not-allowed;
}

/* Add zoom controls styling */
.zoom-controls {
  position: absolute;
  top: 0px;
  right: 0px;
  z-index: 1000;
  padding: 10px;
}

.zoom-controls button {
  display: flex;
  align-self: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--secondary-color);
  color: white;
  font-weight: bold;
}

.zoom-controls button i {
  width: 24px;
  height: 24px;
  font-size:1rem;
}


.zoom-in,
.zoom-out,
.reset {
  align-self: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: black solid 1px;
}

.zoom-in:hover,
.zoom-out:hover,
.reset:hover {
  background-color: var(--primary-color);
}

.detail-button {
  position: absolute;
  z-index: 100;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #ddd;
  cursor: pointer;
}

.detail-button:hover {
  transform: scale(1.02);
  transition: transform 0.1s ease-in;
}

.mask-rect {
  width: 0;
  transition: width 0.3s cubic-bezier(0.1, 0, 0.5, 0.5);
}

.mask-rect-right {
  x: 1200;
}

.mask-rect-right.mask-rect-animate {
  width: 1200px !important;
  x: 0 !important;
}

.mask-rect-left {
  x: 0;
}

.mask-rect-left.mask-rect-animate {
  width: 1200px !important;
  x: 0 !important;
}

@keyframes polyline-reveal {
  to {
    stroke-dashoffset: 0;
  }
}

.animated-polyline {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: polyline-reveal 0.3s cubic-bezier(0.1, 0, 0.5, 0.5) 0.3s forwards;
}

@keyframes card-border-reveal {
  to {
    stroke-dashoffset: 0;
  }
}

.animated-card-border {
  fill: none;
  stroke-width: 4;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: card-border-reveal 0.3s cubic-bezier(0.1, 0, 0.5, 0.5) 0s forwards;
}

.room-group {
  transition: all 0.3s ease;
}

.room-group>*:not(foreignObject) {
  transition: all 0.3s ease;
}

.room-group:hover>*:not(foreignObject) {
  stroke: #f1bd78 !important;
  stroke-width: 4 !important;
}

.selectable-area {
  cursor: pointer;
  fill: transparent;
  stroke: #f1bd78;
  stroke-width: 5px;
  stroke-linecap: round;
  stroke-linejoin: bevel;
}

.selectable-area:hover {
  stroke: #f1bd78;
  stroke-width: 5px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background-color: var(--white);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  margin: auto;
}

/* Desktop layout for modal */
@media (min-width: 992px) {
  .modal-content.modal-desktop-layout {
    max-width: 1000px;
    width: 95%;
    padding: 0;
    overflow-y: auto;
  }

  .modal-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    height: 100%;
  }

  .modal-slider-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
  }

  .modal-content-section {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 1rem;
  }

  .modal-close-desktop {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
  }
}

/* Mobile layout - stack vertically */
@media (max-width: 991px) {
  .modal-grid-container {
    display: flex;
    flex-direction: column;
  }

  .modal-close-desktop {
    display: none;
  }
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* ROOM STATUS: AVAILABLE */
.room-available {
  stroke: #f1bd78;
  fill: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ROOM STATUS: BOOKED */
.room-booked {
  stroke: #d20000 !important;
  fill: rgba(210, 0, 0, 0.35) !important;
  cursor: not-allowed !important;
  animation: pulseBooked 1.5s infinite ease-in-out;
}

/* Soft pulse animation for booked rooms */
@keyframes pulseBooked {
  0% {
    fill: rgba(210, 0, 0, 0.25);
  }

  50% {
    fill: rgba(210, 0, 0, 0.45);
  }

  100% {
    fill: rgba(210, 0, 0, 0.25);
  }
}



.room-number {
  font-weight: bold;
  fill: #333;
  /* Text color */
  pointer-events: none;
  /* Make text non-interactive */
  user-select: none;
  /* Prevent text selection */
}


/* Modal header and body styling */
.modal-header-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

@media (min-width: 992px) {
  .modal-header-section {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
  }
}

.modal-body {
  flex-grow: 1;
}

.main-slider-container {
  height: 40vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

@media (min-width: 992px) {
  .main-slider-container {
    min-height: 400px;
    aspect-ratio: auto;
    flex: 1;
  }
}

.main-slider {
  position: relative;
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  height: 100%;
}

/* @media (min-width: 575px) {
  .main-slider-container-single {
    aspect-ratio: 16/9;
  }
}
@media (min-width: 769px) {
  .main-slider-container-single {
    aspect-ratio: 20/9;
  }
} */

.slide {
  min-width: 100%;
  height: 100%;
  display: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  display: flex;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.slider-arrow:hover {
  opacity: 1;
}

.slide-indicators {
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 8px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicator.active {
  background-color: white;
}

.thumbnail-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (max-width: 992px) {
  .thumbnail-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 0;
    margin-top: 0;
  }
}

.thumbnail-item {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.thumbnail-item.active {
  border-color: #007bff;
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-item:hover:not(.active) {
  border-color: #dee2e6;
}

/* Modal responsive adjustments */
@media (max-width: 768px) {
  .slider-arrow {
    width: 35px;
    height: 35px;
  }
}

/* Room Details - Image Gallery (fits viewport height) */
.main-slider-container-single {
  height: 75vh;
  max-height: 750px;
  min-height: 320px;
  overflow: hidden;
}

.main-slider-container-single .row {
  height: 100%;
  min-height: 0;
}

.main-slider-container-single .col-12.col-sm-10,
.main-slider-container-single .col-12.col-sm-2 {
  height: 100%;
  min-height: 0;
}

.main-slider-container-single .main-slider img,
.main-slider-container-single .main-slider video {
  width: 100%;    
  height: 100%;
  object-fit: contain;
}

.main-slider-container-single .col-12.col-sm-2 > div {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.main-slider-container-single .thumbnail-item {
  flex: 0 0 auto;
}

@media (max-width: 575.98px) {
  .main-slider-container-single {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .main-slider-container-single .row {
    height: auto;
  }

  .main-slider-container-single .col-12.col-sm-10 {
    height: 60vh;
    min-height: 280px;
  }

  .main-slider-container-single .col-12.col-sm-2 {
    height: auto;
  }

  .main-slider-container-single .col-12.col-sm-2 > div {
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
  }

  .main-slider-container-single .thumbnail-item {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
  }
}