/* Shared room preview popup (Views/Shared/_RoomPreviewModal.cshtml). */

/* The booking review screen is a fixed overlay at Bootstrap's modal z-index, so sit above it. */
.rp-modal {
  z-index: 1070;
}

body:has(.rp-modal.show) .modal-backdrop {
  z-index: 1065;
}

.rp-dialog {
  max-width: 640px;
}

.rp-modal .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 1.1rem;
  background: #fff;
}

.rp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 0.75rem;
}

.rp-heading {
  min-width: 0;
}

.rp-title {
  margin: 0;
  color: var(--hs-text, #2f2b22);
  font-size: 1.1rem;
  font-weight: 800;
}

.rp-subtitle {
  margin-top: 0.15rem;
  color: var(--hs-text-muted, #8a8272);
  font-size: 0.8rem;
}

.rp-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1efe9;
  color: var(--hs-text, #2f2b22);
  font-size: 1rem;
}

.rp-close:hover {
  background: #e7e3d9;
}

.rp-body {
  padding: 0;
}

/* Height follows the tallest photo (set from script), so portrait shots aren't squeezed. */
.rp-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 68vh;
  background: #111;
  user-select: none;
  transition: aspect-ratio 0.2s ease;
}

.rp-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: #c9c3b6;
  font-size: 0.85rem;
}

.rp-empty[hidden],
.rp-stage img[hidden] {
  display: none;
}

.rp-empty i {
  font-size: 2.25rem;
}

.rp-nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.1rem;
  transform: translateY(-50%);
}

.rp-nav:hover {
  background: rgba(0, 0, 0, 0.55);
}

.rp-nav[hidden] {
  display: none;
}

.rp-prev {
  left: 0.6rem;
}

.rp-next {
  right: 0.6rem;
}

.rp-counter {
  position: absolute;
  right: 0.65rem;
  bottom: 0.6rem;
  padding: 0.1rem 0.5rem;
  border-radius: 50rem;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.rp-counter:empty {
  display: none;
}

.rp-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rp-thumbs:empty {
  display: none;
}

.rp-thumbs button {
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  background: #eee;
  opacity: 0.75;
}

.rp-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rp-thumbs button.is-active {
  border-color: var(--hs-green, #3e5a3a);
  opacity: 1;
}

.rp-info {
  padding: 0.6rem 1rem 1rem;
}

.rp-note {
  margin-bottom: 0.5rem;
  color: var(--hs-green, #3e5a3a);
  font-size: 0.82rem;
  font-weight: 700;
}

.rp-description {
  margin-bottom: 0.75rem;
  color: var(--hs-text, #2f2b22);
  font-size: 0.85rem;
  line-height: 1.55;
}

.rp-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.rp-amenities span {
  padding: 0.3rem 0.75rem;
  border: 1px solid #dfe8dc;
  border-radius: 50rem;
  background: #f3f7f1;
  color: var(--hs-text, #2f2b22);
  font-size: 0.78rem;
}

.rp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--hs-border, #e7e0d0);
  background: #f6f8f3;
}

.rp-price {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rp-price[hidden] {
  display: none;
}

.rp-price span {
  color: var(--hs-text-muted, #8a8272);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rp-price strong {
  color: var(--hs-green-dark, #2e4530);
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
}

.rp-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.rp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 50rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rp-btn[hidden] {
  display: none;
}

.rp-btn-secondary {
  border: 1px solid var(--hs-border, #e7e0d0);
  background: #fff;
  color: var(--hs-text, #2f2b22);
}

.rp-btn-secondary:hover {
  border-color: var(--hs-green, #3e5a3a);
  color: var(--hs-green, #3e5a3a);
}

.rp-btn-primary {
  border: 1px solid var(--hs-green, #3e5a3a);
  background: var(--hs-green, #3e5a3a);
  color: #fff;
  box-shadow: 0 0.4rem 0.9rem rgba(62, 90, 58, 0.25);
}

.rp-btn-primary:hover {
  border-color: var(--hs-green-dark, #2e4530);
  background: var(--hs-green-dark, #2e4530);
  color: #fff;
}

@media (max-width: 575.98px) {
  .rp-modal .modal-content {
    border-radius: 0;
  }

  .rp-stage {
    max-height: 62vh;
  }

  .rp-btn {
    padding: 0.5rem 0.9rem;
  }
}
