/* SafariAnts Independent Hotel Module
   Namespace: .sa-hotel-*
   Loaded only on hotel pages. Does not target attraction/destination classes. */

:root {
  --sa-hotel-ink: #202923;
  --sa-hotel-muted: #737d76;
  --sa-hotel-line: #e4e8e5;
  --sa-hotel-paper: #fff;
  --sa-hotel-soft: #f1f3f2;
  --sa-hotel-green: #397653;
  --sa-hotel-green-soft: #edf3ef;
  --sa-hotel-shadow: 0 2px 10px rgba(20, 37, 26, 0.06);
  --sa-hotel-radius: 12px;
}

.sa-hotel-body {
  margin: 0;
  min-height: 100vh;
  color: var(--sa-hotel-ink);
  background: #f0f2f1;
  font: 15px/1.45 "Facebook Sans", Helvetica, Arial, sans-serif;
}

.sa-hotel-body *,
.sa-hotel-body *::before,
.sa-hotel-body *::after {
  box-sizing: border-box;
}

/* Top bar */
.sa-hotel-topbar {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--sa-hotel-line);
}

.sa-hotel-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.6px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.sa-hotel-mark {
  width: 34px;
  height: 34px;
  border: 2px solid #7ea98b;
  border-radius: 50% 50% 50% 8px;
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  color: var(--sa-hotel-green);
  font-size: 11px;
  font-weight: 800;
}

.sa-hotel-mark span {
  transform: rotate(45deg);
}

.sa-hotel-brand em {
  font-style: normal;
  color: var(--sa-hotel-green);
}

.sa-hotel-search {
  flex: 1;
  max-width: 640px;
  height: 40px;
  display: flex;
  align-items: center;
  background: var(--sa-hotel-soft);
  border-radius: 24px;
  padding: 0 14px;
}

.sa-hotel-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.sa-hotel-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sa-hotel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.sa-hotel-avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--sa-hotel-green-soft);
  color: var(--sa-hotel-green);
  font-weight: 700;
}

/* Layout: banner spans left+middle; right from top; main stack below banner */
.sa-hotel-page {
  max-width: 1700px;
  margin: 0 auto;
  padding: 16px;
}

.sa-hotel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  grid-template-rows: auto 1fr;
  gap: 18px;
  align-items: start;
}

.sa-hotel-banner-wrap {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  border-radius: var(--sa-hotel-radius);
  overflow: hidden;
  min-height: 280px;
  max-height: 380px;
  cursor: pointer;
  background: #d8ddd9;
  box-shadow: var(--sa-hotel-shadow);
}

.sa-hotel-banner-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.sa-hotel-banner-placeholder {
  min-height: 280px;
  background: linear-gradient(135deg, #c5d0c8, #e8ece9);
}

.sa-hotel-banner-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 24px;
  background: linear-gradient(transparent, rgba(12, 22, 16, 0.72));
  color: #fff;
}

.sa-hotel-title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.sa-hotel-tagline {
  margin: 0 0 8px;
  opacity: 0.92;
}

.sa-hotel-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.sa-hotel-gallery-hint {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}

.sa-hotel-right {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sa-hotel-main-stack {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

/* Widgets */
.sa-hotel-widget {
  background: var(--sa-hotel-paper);
  border: 1px solid var(--sa-hotel-line);
  border-radius: var(--sa-hotel-radius);
  margin-bottom: 14px;
  padding: 16px 18px;
  box-shadow: var(--sa-hotel-shadow);
}

.sa-hotel-widget-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 750;
}

.sa-hotel-rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sa-hotel-rating-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sa-hotel-rating-big {
  font-size: 28px;
  font-weight: 800;
  color: var(--sa-hotel-green);
}

.sa-hotel-stars {
  letter-spacing: 1px;
  color: #c9a227;
}

.sa-hotel-star.is-full,
.sa-hotel-star.is-half {
  color: #c9a227;
}

.sa-hotel-rating-actions {
  display: flex;
  gap: 8px;
}

.sa-hotel-word-action {
  border: 0;
  background: transparent;
  color: #5d7665;
  font-weight: 650;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.sa-hotel-word-action:hover {
  background: var(--sa-hotel-soft);
}

.sa-hotel-soft-btn {
  border: 1px solid #e1e6e2;
  background: #f4f6f5;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.sa-hotel-soft-btn:hover {
  background: #edf1ee;
}

.sa-hotel-primary-btn {
  width: 100%;
  border: 0;
  background: var(--sa-hotel-green);
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 8px;
}

.sa-hotel-primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sa-hotel-primary-btn:not(:disabled):hover {
  filter: brightness(1.05);
}

.sa-hotel-muted {
  color: var(--sa-hotel-muted);
  font-size: 13px;
}

.sa-hotel-fineprint {
  font-size: 12px;
  color: var(--sa-hotel-muted);
  margin-top: 10px;
  line-height: 1.4;
}

.sa-hotel-prose {
  line-height: 1.55;
}

.sa-hotel-address {
  margin-top: 12px;
  color: var(--sa-hotel-muted);
  font-size: 14px;
}

/* Rooms */
.sa-hotel-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.sa-hotel-room-card {
  border: 1px solid var(--sa-hotel-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fafbfa;
}

.sa-hotel-room-photo img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.sa-hotel-room-body {
  padding: 12px 14px 14px;
}

.sa-hotel-room-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.sa-hotel-room-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--sa-hotel-muted);
}

.sa-hotel-room-desc {
  margin: 0 0 10px;
  font-size: 13px;
}

.sa-hotel-room-price {
  margin-bottom: 10px;
}

.sa-hotel-room-price span {
  font-size: 12px;
  color: var(--sa-hotel-muted);
  font-weight: 500;
}

/* Amenities */
.sa-hotel-amenity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px 14px;
}

.sa-hotel-amenity {
  padding: 8px 10px;
  background: var(--sa-hotel-soft);
  border-radius: 8px;
  font-size: 13px;
}

/* Deals / events / nearby / posts */
.sa-hotel-deal-card {
  padding: 12px;
  border: 1px solid var(--sa-hotel-line);
  border-radius: 10px;
  margin-bottom: 10px;
  position: relative;
}

.sa-hotel-deal-badge {
  display: inline-block;
  margin-top: 6px;
  background: var(--sa-hotel-green-soft);
  color: var(--sa-hotel-green);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
}

.sa-hotel-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sa-hotel-event {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sa-hotel-line);
}

.sa-hotel-event:last-child {
  border-bottom: 0;
}

.sa-hotel-event-date {
  min-width: 90px;
  font-weight: 700;
  font-size: 13px;
}

.sa-hotel-nearby-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-hotel-nearby-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.sa-hotel-nearby-item:hover {
  background: var(--sa-hotel-soft);
}

.sa-hotel-nearby-item img {
  width: 64px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
}

.sa-hotel-post {
  padding: 12px 0;
  border-bottom: 1px solid var(--sa-hotel-line);
}

.sa-hotel-post-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

/* Booking form */
.sa-hotel-booking-form label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 10px;
}

.sa-hotel-booking-form input[type="date"],
.sa-hotel-booking-form input[type="number"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid var(--sa-hotel-line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.sa-hotel-selected-room {
  font-size: 13px;
  color: var(--sa-hotel-muted);
  min-height: 1.4em;
}

.sa-hotel-host {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sa-hotel-host-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.sa-hotel-facts {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

/* Listings */
.sa-hotel-listings-header {
  margin-bottom: 20px;
}

.sa-hotel-listings-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.sa-hotel-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.sa-hotel-listing-card {
  background: var(--sa-hotel-paper);
  border: 1px solid var(--sa-hotel-line);
  border-radius: var(--sa-hotel-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sa-hotel-shadow);
  transition: transform 0.12s ease;
}

.sa-hotel-listing-card:hover {
  transform: translateY(-2px);
}

.sa-hotel-listing-img {
  height: 160px;
  background: #d8ddd9;
}

.sa-hotel-listing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sa-hotel-listing-body {
  padding: 14px 16px 16px;
}

.sa-hotel-listing-body h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.sa-hotel-listing-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  font-size: 13px;
}

/* Modal / gallery */
.sa-hotel-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}

.sa-hotel-modal[hidden] {
  display: none !important;
}

.sa-hotel-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 12, 0.55);
}

.sa-hotel-modal-panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  width: min(920px, 94vw);
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.sa-hotel-modal-sm {
  width: min(420px, 94vw);
}

.sa-hotel-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: var(--sa-hotel-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.sa-hotel-gallery-stage img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: #111;
}

.sa-hotel-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}

.sa-hotel-gallery-thumbs img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.75;
  border: 2px solid transparent;
}

.sa-hotel-gallery-thumbs img.is-active {
  opacity: 1;
  border-color: var(--sa-hotel-green);
}

.sa-hotel-empty {
  text-align: center;
  padding: 48px 20px;
}

.sa-hotel-footer {
  margin-top: 32px;
  padding: 24px 16px;
  border-top: 1px solid var(--sa-hotel-line);
  text-align: center;
  color: var(--sa-hotel-muted);
  font-size: 13px;
}

/* Independent scroll behaviour helpers (JS toggles classes) */
.sa-hotel-body.sa-hotel-banner-passed .sa-hotel-right {
  /* already sticky */
}

@media (max-width: 960px) {
  .sa-hotel-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .sa-hotel-banner-wrap {
    grid-column: 1;
    grid-row: auto;
    max-height: 260px;
    min-height: 200px;
  }

  .sa-hotel-banner-img {
    min-height: 200px;
    max-height: 260px;
  }

  .sa-hotel-right {
    grid-column: 1;
    grid-row: auto;
    position: static;
    max-height: none;
    order: 3;
  }

  .sa-hotel-main-stack {
    grid-column: 1;
    grid-row: auto;
  }

  .sa-hotel-title {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .sa-hotel-topbar {
    padding: 0 12px;
    gap: 10px;
  }

  .sa-hotel-brand-text {
    display: none;
  }

  .sa-hotel-search {
    max-width: none;
  }

  .sa-hotel-page {
    padding: 10px;
  }
}
