/* Styles for listings/templates/listings/room_detail.html
   (moved out of an inline <style> block so browsers cache them). */

/* ===================================================================
   PREMIUM ROOM DETAIL
   Same signature price tag as the cards, clipped onto the hero photo
   corner, for a consistent identity between listing and detail views.
   All original classes/URLs/form actions kept for compatibility.
   =================================================================== */

.rd-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.rd-card {
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border);
}


/* Signature price chip - sits beside the title now, no longer
   overlapping the photo (it looked like it was cutting into the
   room photos rather than reading as an intentional tag) */
.rd-trust {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
}
.rd-trust p { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--text); }
.rd-trust a { color: var(--link); font-weight: 700; }
.rd-trust-icon {
  flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 0.9rem;
}
.rd-trust-ok { background: var(--dm-bg-f0fdf4, #f0fdf4); border: 1px solid rgba(22, 163, 74, 0.3); }
.rd-trust-ok .rd-trust-icon { background: #16a34a; }
.rd-trust-wait { background: var(--dm-bg-fffbeb, #fffbeb); border: 1px solid rgba(245, 158, 11, 0.45); }
.rd-trust-wait .rd-trust-icon { background: #f59e0b; }
.rd-price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: linear-gradient(135deg, #0B6FBF, #002A5C);
  color: #fff;
  padding: 8px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(11, 111, 191, 0.28);
  margin-bottom: 8px !important;
}
.rd-price-amount {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.rd-price-period {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.85;
}

/* ===== Content ===== */
.rd-content,
.detail-content.rd-content {
  padding: 8px 26px 26px !important;
  margin: 0 !important;
}

.rd-header {
  margin-bottom: 22px;
}
.rd-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.rd-location {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Quick facts */
.rd-facts {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.rd-fact {
  flex: 1 1 140px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-sunken);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.rd-fact-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.rd-fact-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.rd-fact-value {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  margin-top: 2px;
}

.rd-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.rd-section:last-child,
.rd-report-section {
  border-bottom: none;
}
.rd-section-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.rd-subsection-header {
  margin-top: 22px;
}

.rd-description {
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.rd-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.rd-btn-secondary {
  flex-shrink: 0;
}
.rd-btn-contact-jump {
  flex-shrink: 0;
}

/* Mobile sticky contact bar - hidden on desktop, where the quick-jump
   button above already puts the contact button one click from the top
   of the page. On mobile it stays pinned while scrolling so contact
   is never more than a tap away, even deep in reviews/report. */
.rd-sticky-contact-bar {
  display: none;
}
@media (max-width: 768px) {
  .rd-btn-contact-jump {
    display: none;
  }
  .rd-sticky-contact-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(135deg, #0B6FBF, #002A5C);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.18);
  }
  /* Leaves room at the bottom of the page so the sticky bar doesn't
     sit on top of the report-listing section. */
  body.rd-sticky-cta-active main.container {
    padding-bottom: 76px;
  }
}

/* Waitlist card - shown instead of "contact to move in" framing when
   the room is fully occupied but still listed (a landlord building
   a queue ahead of a known re-availability date). */
.rd-waitlist-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--dm-bg-fffbeb, #fffbeb);
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.rd-waitlist-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.rd-waitlist-text {
  flex: 1 1 200px;
  min-width: 0;
}
.rd-waitlist-text strong {
  color: var(--dm-fg-0f172a, #0f172a);
}
.rd-waitlist-copy {
  margin: 4px 0 0;
  font-size: 0.88rem;
}
.rd-waitlist-count {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  color: var(--dm-fg-92400e, #92400e);
}
.rd-waitlist-form {
  flex-shrink: 0;
}

/* Landlord card with trust ring */
.rd-landlord-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  background: var(--card-sunken);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.rd-landlord-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0B6FBF, #002A5C);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 0 0 3px var(--card-sunken), 0 0 0 5px #16a34a;
}
.rd-landlord-name {
  display: block;
  font-size: 1rem;
  color: var(--text);
}
.rd-landlord-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.rd-landlord-view {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--link);
}
.rd-landlord-avatar-unverified {
  box-shadow: 0 0 0 3px var(--card-sunken), 0 0 0 5px #cbd5e1;
}
.rd-landlord-checks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.rd-check-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  background: var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}
.rd-check-chip-fast {
  background: var(--dm-bg-fff7ed, #fff7ed);
  color: var(--dm-fg-9a3412, #9a3412);
}
.rd-check-chip-founding {
  background: var(--dm-bg-fef3c7, #fef3c7);
  color: var(--dm-fg-78350f, #78350f);
}
.rd-check-chip-ppra {
  background: var(--dm-bg-dcfce7, #dcfce7);
  color: var(--dm-fg-166534, #166534);
}

.rd-contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.rd-contact-btn {
  flex-shrink: 0;
  text-align: center;
}
.rd-contact-btn-whatsapp {
  background: #15803d;
}

.rd-interest-form {
  margin-bottom: 14px;
}
.rd-interest-btn {
  width: 100%;
}
.rd-interest-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}
.rd-interest-done {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--dm-bg-ecfdf5, #ecfdf5);
  color: var(--dm-fg-065f46, #065f46);
  font-size: 0.9rem;
}
.rd-interest-done a {
  color: inherit;
  font-weight: 600;
}

.rd-message-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rd-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}
.rd-send-btn {
  align-self: flex-start;
}
.rd-success-form {
  margin-top: 14px;
}

/* The floating support "Help" button isn't shown on room pages: here
   the only green WhatsApp button should be the landlord's, so nobody
   messages support thinking they're reaching the landlord. Support
   stays one tap away in the note under the contact section. */
.support-fab-wrap {
  display: none !important;
}

.rd-contact-hint,
.rd-support-note {
  margin: 10px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.rd-contact-hint strong {
  color: var(--text);
}
.rd-support-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.rd-support-note a {
  color: var(--link);
  font-weight: 700;
}

/* Logged-out contact panel: shows what a free account unlocks. */
.rd-gate {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: var(--card-sunken);
  border: 1px solid var(--border);
}
.rd-gate-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rd-gate-lock {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(11, 111, 191, 0.12);
  color: var(--link);
  font-size: 1.05rem;
}
.rd-gate-title {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text);
}
.rd-gate-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.rd-gate-locked {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rd-gate-locked a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.rd-gate-locked a:hover {
  border-color: var(--link);
  color: var(--text);
}
.rd-gate-locked .fa-whatsapp {
  color: #25d366;
}
.rd-gate-mask {
  letter-spacing: 0.08em;
  filter: blur(0.6px);
}
.rd-gate-item-lock {
  margin-left: auto;
  font-size: 0.8rem;
  opacity: 0.7;
}
.rd-gate-primary {
  display: block;
  text-align: center;
  width: 100%;
}
.rd-gate-secondary {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}
.rd-gate-secondary strong {
  color: var(--link);
}
.rd-gate-after {
  margin: -4px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== Ratings & reviews ===== */
.rd-rating-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-sunken);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
}
.rd-rating-link:hover { border-color: #f59e0b; }
.rd-rating-star { color: #f59e0b; font-size: 1rem; }
.rd-rating-link span:not(.rd-rating-star) { color: var(--text-muted); }
.rd-rating-go { font-weight: 800; color: var(--link) !important; }
.rv { scroll-margin-top: 80px; }
.rv-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card-sunken);
}
.rv-score { display: grid; justify-items: center; gap: 2px; min-width: 96px; }
.rv-avg { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--text); }
.rv-stars { display: inline-flex; gap: 1px; font-size: 1.05rem; color: var(--border); letter-spacing: 1px; }
.rv-stars-sm { font-size: 0.85rem; }
.rv-star.is-on { color: #f59e0b; }
.rv-count { font-size: 0.8rem; color: var(--text-muted); }
.rv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.rv-bar-row { display: grid; grid-template-columns: 26px 1fr 26px; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.rv-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.rv-bar-fill { display: block; height: 100%; border-radius: inherit; background: #f59e0b; }
.rv-bar-num { text-align: right; }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rv-item { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.rv-item[hidden] { display: none; }
.rv-avatar {
  flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: var(--card-sunken); color: var(--text); font-weight: 800; font-size: 0.9rem;
}
.rv-body { min-width: 0; flex: 1; }
.rv-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rv-name { color: var(--text); font-size: 0.92rem; }
.rv-date { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; }
.rv-comment { margin: 6px 0 0; color: var(--text); font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }
.rv-more { width: 100%; margin-top: 12px; }
.rv-empty, .rv-hint { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.rv-hint { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--card-sunken); }
.rv-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.rv-form-title { margin: 0; font-size: 1.05rem; color: var(--text); }
.rv-form-note { margin: 0; color: var(--text-muted); font-size: 0.88rem; }
.rv-label { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.rv-picker { border: 0; margin: 0; padding: 0; }
.rv-picker-legend { font-weight: 700; font-size: 0.9rem; color: var(--text); margin-bottom: 4px; padding: 0; }
/* Five tappable stars: the radios are reversed in the markup so CSS
   can light up a star and every star before it. */
.rv-picker-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rv-picker-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-picker-stars label { font-size: 2.1rem; line-height: 1; color: var(--border); cursor: pointer; padding: 2px; transition: color 0.12s ease, transform 0.12s ease; }
.rv-picker-stars label:hover,
.rv-picker-stars label:hover ~ label,
.rv-picker-stars input:checked ~ label { color: #f59e0b; }
.rv-picker-stars input:focus-visible + label { outline: 3px solid #0B6FBF; outline-offset: 2px; border-radius: 6px; }
.rv-picker-stars label:active { transform: scale(0.9); }
@media (max-width: 480px) {
  .rv-summary { grid-template-columns: 1fr; }
}
.rd-muted {
  color: var(--text-muted);
  text-align: center;
}

.rd-report-section { scroll-margin-top: 80px; }
.rp-intro, .rp-done { margin: 0 0 12px; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.rp-intro a { color: var(--link); font-weight: 700; }
.rp-done { color: var(--text); padding: 12px 14px; border-radius: 12px; background: var(--card-sunken); }
.rp-form { display: grid; gap: 10px; }
.rp-btn { justify-self: start; }
.rd-form-field {
  margin-bottom: 14px;
}
.rd-form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.rd-select {
  width: 100%;
}

.rd-report-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rd-report-form select {
  flex: 1 1 200px;
  min-width: 0;
}

@media (max-width: 480px) {
  .rd-content,
  .detail-content.rd-content {
    padding: 6px 18px 20px !important;
    margin: 0 !important;
  }
  .rd-title { font-size: 1.3rem; }
  .rd-facts { gap: 8px; }
  .rd-fact { flex: 1 1 100%; }
  .rd-price-amount { font-size: 1.2rem; }
}
