/* Site chrome on every page: footer, Help bubble, idle-timeout modal,
   install and push banners. Moved out of the partials' inline <style>
   blocks; kept in the order they used to appear in the page. Linked
   from base.html after each page's own CSS, as before. */

/* ===== templates/listings/partials/_footer.html ===== */

.ft {
  margin-top: 72px;
  padding: 0;
  background: #061a33;
  background-image: linear-gradient(180deg, #072247 0%, #04142a 100%);
  color: #c3cfdf;
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: left;
  border-top: 3px solid #0B6FBF;
}
.ft a { color: #c3cfdf; text-decoration: none; }
.ft a:hover, .ft a:focus-visible { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft p { margin: 0; }
/* Bottom space so the floating Help button never covers the legal bar. */
.ft-inner { max-width: var(--page-max); margin: 0 auto; padding: 56px var(--gutter) 96px; } /* same edges as the header */

.ft-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) 3fr;
  gap: 48px;
  padding-bottom: 36px;
}
/* The light logo file has its own brand-blue background: shown as a badge. */
.ft-logo { display: block; height: 52px; width: auto; border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.ft-tagline { margin-top: 12px !important; color: #4cb8f5; font-weight: 800; letter-spacing: 0.02em; }
.ft-about { margin-top: 8px !important; max-width: 340px; }
.ft-contact { margin-top: 18px !important; display: grid; gap: 8px; }
.ft-contact li { display: flex; align-items: center; gap: 10px; }
.ft-contact i { width: 18px; text-align: center; color: #7fa3c9; }
.ft-contact .fa-whatsapp { color: #25d366; }

.ft-social { display: flex; gap: 10px; margin-top: 20px; }
.ft-social a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  font-size: 1rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ft-social a:hover { background: #0B6FBF; border-color: #0B6FBF; color: #fff; text-decoration: none; }

.ft-apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ft-app, .ft-beta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  color: #aebcd0;
}
.ft-app em, .ft-soon em { font-style: normal; color: #f7a440; font-weight: 600; }

.ft-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.ft-h {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
}
.ft-col li + li { margin-top: 10px; }
.ft-soon { color: #8394ab; }

.ft-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.ft-trust li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.86rem;
}
.ft-trust strong { color: #ffffff; }
.ft-trust-icon { font-size: 1.15rem; line-height: 1.3; }

.ft-areas {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.85rem;
}
.ft-areas-label { color: #ffffff; font-weight: 700; margin-right: 4px; }

.ft-bottom {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.8rem;
  color: #8fa1b8;
}
.ft-legal p + p { margin-top: 4px; }
.ft-legal strong { color: #c3cfdf; font-weight: 600; }
.ft-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; flex-shrink: 0; }

@media (max-width: 960px) {
  .ft-top { grid-template-columns: 1fr; gap: 32px; }
  .ft-about { max-width: none; }
}
@media (max-width: 720px) {
  .ft-inner { padding: 40px var(--gutter) 96px; }
  .ft-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .ft-trust { grid-template-columns: 1fr; gap: 10px; }
  .ft-bottom { flex-direction: column; }
  .ft-badges { justify-content: flex-start; }
}

/* ===== templates/listings/partials/_support_help.html ===== */

.support-fab-wrap {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.support-fab-wrap > * {
  pointer-events: auto;
}

.support-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  /* The site's WhatsApp green (same as the room page's WhatsApp
     button). The brighter #25d366 left white text at only 2:1. */
  background: #15803d;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.support-fab:hover,
.support-fab:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}
.support-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.support-fab-icon {
  font-size: 1.6rem;
  line-height: 1;
}

/* One-time tip, pointing at the button. */
.support-tip {
  position: relative;
  width: min(270px, calc(100vw - 32px));
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  animation: support-tip-in 0.22s ease-out;
}
.support-tip[hidden] {
  display: none;
}
.support-tip::after {
  content: "";
  position: absolute;
  right: 30px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: var(--card);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.support-tip-title {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 0.95rem;
}
.support-tip-text {
  margin: 0 0 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.support-tip-text strong {
  color: var(--text);
}
.support-tip-ok {
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  background: var(--link);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
@keyframes support-tip-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .support-tip { animation: none; }
  .support-fab { transition: none; }
}

/* ===== templates/listings/partials/_idle_modal.html ===== */

.st-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050; /* above the Help button (9999) and sticky bars */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 23, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.st-overlay[hidden] { display: none; }
.st-card {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 20px;
  border-radius: 22px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.35);
  text-align: center;
  animation: st-in 0.2s ease-out;
}
.st-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(11, 111, 191, 0.12);
  color: var(--link);
  font-size: 1.6rem;
}
.st-title { margin: 0 0 8px; font-size: 1.35rem; font-weight: 800; color: var(--text); }
.st-text { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); }
.st-countdown {
  margin: 10px 0 12px;
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text);
}
.st-bar {
  height: 6px;
  margin: 0 0 20px;
  border-radius: 999px;
  background: var(--card-sunken);
  overflow: hidden;
}
.st-bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--link);
  transition: width 1s linear;
}
.st-countdown.is-urgent { color: var(--danger); }
.st-bar-fill.is-urgent { background: #dc2626; }
.st-stay { display: block; width: 100%; min-height: 48px; font-size: 1rem; }
.st-signout {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.st-signout:hover { color: var(--text); text-decoration: underline; }
@keyframes st-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .st-card { animation: none; }
  .st-bar-fill { transition: none; }
}

/* ===== templates/listings/partials/_pwa_install_banner.html ===== */

/* The [hidden] override below matters: .pwa-install-banner's own
   "display: flex" ties in specificity with the browser's built-in
   "[hidden] { display: none }" rule, and author CSS wins ties over
   the UA stylesheet - so without this, "display: flex" always won
   and the banner showed on every page load regardless of the hidden
   attribute or what the JS set it to. */
.pwa-install-banner[hidden] {
  display: none;
}
.pwa-install-banner {
  position: fixed;
  /* 82px clears both the 70px desktop navbar and the 60px mobile one
     (see .navbar / its @media max-width:768px override in base.css)
     with room to spare, rather than needing two separate offsets. */
  top: 82px;
  right: 16px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  background: var(--dm-bg-fff, #fff);
  border-radius: 16px;
  padding: 12px 12px 12px 14px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.pwa-install-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.pwa-install-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pwa-install-text strong {
  font-size: 0.88rem;
  color: var(--dm-fg-0f172a, #0f172a);
}
.pwa-install-text span {
  font-size: 0.76rem;
  color: var(--dm-fg-64748b, #64748b);
}
.pwa-install-btn {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #0b6fbf, #002a5c);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
}
.pwa-install-dismiss {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #94a3b8;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
}
@media (max-width: 480px) {
  .pwa-install-banner {
    /* A compact top-right card rather than the old full-width bar -
       narrower phones just get tighter side margins, not a stretch
       across the whole screen (that's what reached under the
       WhatsApp FAB in the first place). */
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ===== listings/templates/listings/partials/_push_notify_banner.html ===== */

/* Sits above the PWA install banner (same corner) rather than beside
   it, so the two never fight for the same space on a narrow phone
   screen - only one is ever visible at a time in practice anyway,
   since install shows pre-install and this shows post-install/login. */
.push-notify-banner {
  bottom: 88px;
}
@media (max-width: 480px) {
  .push-notify-banner {
    bottom: 78px;
  }
}

/* Phones held sideways: the bubble shrinks to the WhatsApp icon so it
   doesn't sit on top of the page's controls. */
@media (max-height: 500px) and (orientation: landscape) {
  .support-fab { height: 44px; padding: 0 12px; }
  .support-fab-label { display: none; }
}
