/* ============================================================
   AssistCard Care Manager — Main Stylesheet
   ============================================================ */

:root {
  --bg: #0b1220;
  --surface: rgba(255,255,255,0.06);
  --card: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --shadow: 0 10px 28px rgba(0,0,0,0.35);
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.25);
  --radius: 14px;
  --radius-sm: 12px;
  --focus: rgba(59,130,246,0.45);
}

html, body {
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(59,130,246,0.22), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(245,158,11,0.14), transparent 60%),
    var(--bg);
}

/* ── Shell & Layout ─────────────────────────────────────── */

.initial-appt-shell {
  height: 100vh;
  padding: 14px;
  box-sizing: border-box;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.initial-appt-header { margin-bottom: 12px; }

.initial-appt-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  margin-bottom: 10px;
}

.brand-title { font-size: 44px; }

.initial-appt-layout {
  height: calc(100vh - 190px);
  align-items: stretch;
}

.initial-appt-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* ── Pane Cards ─────────────────────────────────────────── */

.pane-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
  min-height: 0;
}

.pane-card--map { overflow: visible; }

.pane-title {
  padding: 12px 14px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
}

.pane-subtitle {
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
}

.pane-scroll {
  flex: 1 1 auto;
  overflow: auto;
  margin: 0;
  padding: 10px;
  min-height: 0;
}

.pane-fill { flex: 1 1 auto; min-height: 0; }

/* ── Map ────────────────────────────────────────────────── */

#map {
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.15);
}

/* ── Provider List ──────────────────────────────────────── */

.provider-list {
  list-style: none;
  padding: 10px;
  margin: 0;
}

.provider-list > div { margin-bottom: 10px; }

.provider-list .list-group-item {
  padding-right: 10px !important;
  padding-left: 10px !important;
  box-sizing: border-box;
  font-size: 16px;
  border: none;
  border-radius: var(--radius-sm);
}

.in-infoview {
  position: relative;
  border-radius: var(--radius-sm);
}

.loc-eff {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 1.1em;
  font-weight: 900;
  opacity: 0.95;
  line-height: 1;
}

.result-count {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 14px 8px;
}

/* ── Right column: stacked filters + map ────────────────── */

.right-stack {
  flex-direction: column;
  gap: 12px;
}

/* Filters pane shrinks to content; does NOT stretch to full height */
.pane-card--filters {
  height: auto !important;
  flex: 0 0 auto;
}

/* Map pane fills all remaining vertical space */
.pane-card--map-grow {
  flex: 1 1 auto;
  min-height: 0;
}

/* ── Filters Panel ──────────────────────────────────────── */

.filters {
  padding: 12px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

/* Inline variant: no scroll, auto height */
.filters--inline {
  overflow: visible;
  flex: none;
}

/* Default 2-col grid (used in old right panel) */
.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/*
  Wide grid for the merged right panel:
  address spans full width; the 4 selects + button sit in one row.
  Layout: [address──────────────] full row
          [radius][eff][type][coe][btn]  5 equal cols
*/
.filters-grid--wide {
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
}

.filters-address  { grid-column: 1 / -1; }  /* address spans all 5 cols */
.filters-submit   { grid-column: auto; }     /* button sits in its own col cell */

.form-group { margin-bottom: 0; }

.filters label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.filters input.form-control,
.filters select.form-control {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  height: 40px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.filters select.form-control option {
  background: #1e293b;
  color: var(--text);
}

.filters input.form-control::placeholder { color: rgba(255,255,255,0.45); }

.filters input.form-control:focus,
.filters select.form-control:focus {
  outline: none;
  border-color: rgba(59,130,246,0.7);
  box-shadow: 0 0 0 4px var(--focus);
  background: rgba(0,0,0,0.25);
  color: var(--text);
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  border-radius: 12px !important;
  height: 40px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(180deg, rgba(59,130,246,1), rgba(37,99,235,1));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 18px rgba(37,99,235,0.25);
}

.btn-primary:hover { filter: brightness(1.03); }

/* ── Misc ───────────────────────────────────────────────── */

.hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 10px;
}

/* ── Scrollbars ─────────────────────────────────────────── */

.pane-scroll::-webkit-scrollbar,
.filters::-webkit-scrollbar { width: 10px; }

.pane-scroll::-webkit-scrollbar-thumb,
.filters::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.2);
}

/* ── Google Places autocomplete z-index fix ─────────────── */

.pac-container { z-index: 99999 !important; }
