/* Dual-view availability (3D | Table) + lead-capture modal — suite_views.js.
 * Colors come from the bot-theme.css brand variables (navy/gold house palette). */

/* ── View toggle tabs ─────────────────────────────────────────────── */
.bot-view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 4px 0 18px;
  background: var(--bot-bg-subtle, #F4EFE4);
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 10px;
}
.bot-view-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bot-navy, #004890);
  font-weight: 600;
  font-size: 14.5px;
  padding: 8px 22px;
  border-radius: 7px;
  cursor: pointer;
}
.bot-view-tab:hover { background: rgba(0, 72, 144, .08); }
.bot-view-tab.is-active {
  background: var(--bot-navy, #004890);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--bot-gold, #F0A800);
}
.bot-view-tab:focus-visible {
  outline: 3px solid var(--bot-gold, #F0A800);
  outline-offset: 1px;
}

/* ── Filter bar ───────────────────────────────────────────────────── */
.st-filters-toggle { display: none; }
.st-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--bot-bg-card, #fff);
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 10px;
}
.st-f { display: flex; flex-direction: column; gap: 4px; }
.st-f > label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bot-text-muted, #5C564F);
}
.st-pair { display: inline-flex; align-items: center; gap: 6px; }
.st-dash { color: var(--bot-text-muted, #5C564F); }
.st-filters input[type="number"],
.st-filters input[type="search"] {
  width: 96px;
  padding: 7px 9px;
  font-size: 14px;
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 7px;
  background: #fff;
  color: var(--bot-text, #1F2733);
}
.st-f-grow input[type="search"] { width: 170px; }
.st-filters input:focus-visible,
.st-floors summary:focus-visible,
.st-clear:focus-visible {
  outline: 3px solid var(--bot-gold, #F0A800);
  outline-offset: 1px;
}
.st-floors { position: relative; }
.st-floors summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 30px 7px 10px;
  min-width: 110px;
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
  color: var(--bot-text, #1F2733);
  position: relative;
  user-select: none;
}
.st-floors summary::-webkit-details-marker { display: none; }
.st-floors summary::after {
  content: "▾";
  position: absolute;
  right: 10px;
  color: var(--bot-navy, #004890);
}
.st-floor-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 150px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .16);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.st-floor-opt { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 0; }
.st-clear {
  appearance: none;
  border: 0;
  background: none;
  color: var(--bot-navy, #004890);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 2px;
}
.st-clear:hover { color: var(--bot-navy-2, #003A73); }
.st-countrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 2px 8px;
}
.st-count {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--bot-text-muted, #5C564F);
}
.st-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.st-export-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--bot-text-muted, #5C564F);
}
.st-export button {
  appearance: none;
  border: 1px solid var(--bot-border, #D6CBB5);
  background: var(--bot-bg-card, #fff);
  color: var(--bot-navy, #004890);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.st-export button:hover {
  border-color: var(--bot-navy, #004890);
  background: rgba(0, 72, 144, .06);
}
.st-export button:focus-visible {
  outline: 3px solid var(--bot-gold, #F0A800);
  outline-offset: 1px;
}

/* ── The table ────────────────────────────────────────────────────── */
.st-scroll {
  overflow-x: auto;
  max-height: 72vh;
  overflow-y: auto;
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 10px;
  background: var(--bot-bg-card, #fff);
}
.st-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14.5px;
  color: var(--bot-text, #1F2733);
}
.st-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bot-navy, #004890);
  color: var(--bot-gold-2, #FFC233);
  text-align: left;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 0;
  border-bottom: 3px solid var(--bot-gold, #F0A800);
  white-space: nowrap;
}
.st-table thead th > button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
}
.st-table thead th:not([data-k]) { padding: 12px 14px; }
.st-table thead th > button:hover { background: var(--bot-navy-2, #003A73); }
.st-table thead th > button:focus-visible {
  outline: 3px solid var(--bot-gold, #F0A800);
  outline-offset: -3px;
}
.st-arrow { margin-left: 6px; font-size: 11px; color: var(--bot-gold, #F0A800); }
.st-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--bot-border-subtle, #E4DCCD);
  vertical-align: middle;
}
.st-table tbody tr:nth-child(even) { background: var(--bot-bg-subtle, #F4EFE4); }
.st-table tbody tr:hover { background: #EAF2FB; }
.st-suite-link {
  font-weight: 700;
  color: var(--bot-navy, #004890);
  text-decoration: none;
}
.st-suite-link:hover { text-decoration: underline; }
.st-status {
  display: block;
  font-size: 12px;
  color: var(--bot-gold-text, #8A6D0F);
  font-weight: 600;
  margin-top: 2px;
}
.st-unit { font-size: 12px; color: var(--bot-text-muted, #5C564F); }
.st-rent { font-weight: 700; color: var(--bot-navy, #004890); white-space: nowrap; }
.st-thumb {
  width: 120px;
  height: 84px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 6px;
  cursor: zoom-in;
  display: block;
}
.st-thumb:focus-visible { outline: 3px solid var(--bot-gold, #F0A800); }
.st-noplan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 120px;
  height: 84px;
  padding: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bot-gold-2, #FFC233);
  background: var(--bot-navy-panel, #002A52);
  border-radius: 6px;
}
.st-actions { white-space: nowrap; }
.st-actions .bot-lead-btn { margin: 2px 6px 2px 0; }
.st-footnote {
  margin: 8px 2px 0;
  font-size: 12.5px;
  color: var(--bot-text-muted, #5C564F);
}

/* ── Hover popover (desktop) ──────────────────────────────────────── */
.st-pop {
  position: fixed;
  z-index: 1900;
  display: none;
  pointer-events: none;
  background: #fff;
  border: 2px solid var(--bot-navy, #004890);
  border-bottom: 4px solid var(--bot-gold, #F0A800);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(16, 24, 40, .35);
  padding: 6px;
}
.st-pop.open { display: block; }
.st-pop img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* ── Tap lightbox (touch / keyboard) ──────────────────────────────── */
.st-lb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 26, 51, .88);
  padding: 18px;
}
.st-lb.open { display: flex; }
.st-lb figure {
  margin: 0;
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.st-lb img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.st-lb figcaption {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.st-lb-x {
  position: absolute;
  top: 14px;
  right: 16px;
  appearance: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bot-gold, #F0A800);
  color: var(--bot-navy-panel, #002A52);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}
.st-lb-x:focus-visible { outline: 3px solid #fff; }

/* ── Lead-capture modal ───────────────────────────────────────────── */
.bot-lead-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 26, 51, .62);
  padding: 16px;
}
.bot-lead-modal {
  width: min(560px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bot-bg-card, #fff);
  border-radius: 12px;
  border-top: 5px solid var(--bot-gold, #F0A800);
  box-shadow: 0 24px 64px rgba(16, 24, 40, .4);
}
.bot-lead-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  background: var(--bot-navy, #004890);
}
.bot-lead-head h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}
.bot-lead-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bot-gold-2, #FFC233);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}
.bot-lead-x:focus-visible { outline: 3px solid var(--bot-gold, #F0A800); }
.bot-lead-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 14px 20px;
  background: var(--bot-bg-subtle, #F4EFE4);
  border-bottom: 1px solid var(--bot-border, #D6CBB5);
}
.bot-lead-facts dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bot-text-muted, #5C564F);
}
.bot-lead-facts dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--bot-navy, #004890);
}
.bot-lead-form { padding: 16px 20px 20px; }
.bot-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-bottom: 6px;
}
.bot-lead-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bot-text, #1F2733);
  margin: 0;
}
.bot-opt { font-weight: 400; color: var(--bot-text-muted, #5C564F); }
.bot-span2 { grid-column: 1 / -1; }
.bot-lead-grid input,
.bot-lead-grid select,
.bot-lead-grid textarea {
  padding: 8px 10px;
  font-size: 14.5px;
  border: 1px solid var(--bot-border, #D6CBB5);
  border-radius: 7px;
  background: #fff;
  color: var(--bot-text, #1F2733);
}
.bot-lead-grid input:focus-visible,
.bot-lead-grid select:focus-visible,
.bot-lead-grid textarea:focus-visible {
  outline: 3px solid var(--bot-gold, #F0A800);
  outline-offset: 1px;
}
.bot-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.bot-lead-msg { margin: 10px 0 0; font-size: 14.5px; min-height: 1em; }
.bot-lead-msg.is-err { color: #B42318; font-weight: 600; }
.bot-lead-msg.is-ok { color: #067647; font-weight: 500; font-size: 15px; }
.bot-lead-msg.is-ok .bot-lead-done { margin-left: 10px; }
.bot-lead-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.bot-spin {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(0, 42, 82, .3);
  border-top-color: var(--bot-navy-panel, #002A52);
  border-radius: 50%;
  animation: bot-spin .7s linear infinite;
}
@keyframes bot-spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .st-filters-toggle {
    display: inline-flex;
    align-items: center;
    appearance: none;
    border: 1px solid var(--bot-border, #D6CBB5);
    background: var(--bot-bg-card, #fff);
    color: var(--bot-navy, #004890);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
  }
  .st-filters { display: none; }
  .st-filters.is-open { display: flex; }
  .st-filters input[type="number"] { width: 84px; }
  .bot-lead-grid { grid-template-columns: 1fr; }
  .st-table { min-width: 640px; }   /* horizontal scroll inside .st-scroll */
  .st-actions .bot-lead-btn { display: block; margin: 4px 0; }
}
