/* Room listing detail page */
.room-detail-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

.room-detail-page__title {
  margin-bottom: 24px;
}

.room-detail-page__title-main {
  font-size: var(--lm-detail-title);
  font-weight: var(--lm-fw-bold);
  line-height: var(--lm-lh-tight);
  margin: 0 0 8px;
}

.room-detail-page__title-sub {
  font-size: var(--lm-detail-subtitle);
  margin: 0;
  opacity: 0.7;
}

.room-gallery {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) max-content;
  align-items: stretch;
  gap: 8px 16px;
  height: 360px;
  margin-bottom: 32px;
}

.room-gallery__show-all {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: var(--lm-body-sm);
  font-weight: var(--lm-fw-semibold);
  color: #222;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s, transform 0.15s;
}

.room-gallery__show-all:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  color: #222;
}

.room-gallery__show-all-icon {
  flex-shrink: 0;
}

.room-gallery__main {
  flex: 1.2;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
}

.room-gallery__grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.room-gallery__cell {
  border-radius: 12px;
  overflow: hidden;
  min-height: 0;
}

.room-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.room-content {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.room-content__left {
  flex: 1;
  min-width: 0;
}

.room-content__name {
  font-size: var(--lm-detail-block);
  font-weight: var(--lm-fw-bold);
  margin: 0 0 20px;
}

.room-advantages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.room-advantages__item {
  font-size: var(--lm-body-sm);
}

.room-description-wrap {
  margin-bottom: 24px;
}

.room-description {
  margin: 0 0 12px;
  font-size: var(--lm-body);
  line-height: var(--lm-lh-normal);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.room-description-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--lm-body-sm);
  font-weight: var(--lm-fw-semibold);
  text-decoration: underline;
  cursor: pointer;
  color: inherit;
}

.room-description-toggle:hover {
  opacity: 0.8;
}

.room-description-modal__body {
  white-space: pre-line;
  max-height: min(60vh, 480px);
  overflow-y: auto;
  line-height: 1.6;
}

/* Room description modal — fully self-contained, no framework dependency */
.rdm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  /* 不修改 body overflow，避免页面抖动 */
}

.rdm-overlay.is-open {
  display: flex;
}

.rdm-dialog {
  position: relative;
  width: 100%;
  max-width: 650px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.rdm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
  color: inherit;
  opacity: 0.55;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.rdm-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.rdm-body {
  padding: 24px 32px 28px;
  overflow-y: auto;
}

.rdm-title {
  font-size: var(--lm-subsection);
  font-weight: var(--lm-fw-bold);
  margin: 0 0 16px;
  padding-right: 28px;
}

.rdm-text {
  white-space: pre-line;
  line-height: var(--lm-lh-normal);
  font-size: var(--lm-body);
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  .rdm-dialog {
    background: #1f2937;
    color: #e5e7eb;
  }
}

@media (max-width: 480px) {
  .rdm-body {
    padding: 20px 20px 24px;
  }
}

.room-booking-card {
  width: 360px;
  flex-shrink: 0;
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  background: var(--bs-body-bg, #fff);
}

.dark .room-booking-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--bs-gray-800, #1f2937);
}

.room-booking-card__dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .room-booking-card__dates {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.room-booking-card__label {
  display: block;
  font-size: var(--lm-caption);
  font-weight: var(--lm-fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.65;
  margin-bottom: 4px;
}

.room-booking-card__value {
  font-size: var(--lm-body-sm);
  font-weight: var(--lm-fw-medium);
}

.room-booking-card__guests {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .room-booking-card__guests {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.room-booking-card__prices {
  margin-bottom: 20px;
}

.room-booking-card__price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: var(--lm-body-sm);
}

.room-booking-card__price-row:last-child {
  margin-bottom: 0;
}

.room-booking-card__price-amount {
  font-size: var(--lm-subsection);
  font-weight: var(--lm-fw-bold);
}

@media (max-width: 768px) {
  .room-gallery {
    grid-template-columns: 1fr;
    height: auto;
  }

  .room-gallery__show-all {
    justify-self: end;
  }

  .room-gallery__main {
    height: 240px;
  }

  .room-gallery__grid {
    height: 240px;
  }

  .room-content {
    flex-direction: column;
    gap: 32px;
  }

  .room-booking-card {
    width: 100%;
    position: static;
  }

  .room-advantages {
    grid-template-columns: 1fr;
  }
}
