/* ============================================================
   Banner Inspector — Glass UI Panel
   Matches TWA app glassmorphism aesthetic
   ============================================================ */

.bi-panel {
  --bi-bg:       rgba(255,255,255,0.82);
  --bi-surface:  rgba(255,255,255,0.55);
  --bi-border:   rgba(0,0,0,0.10);
  --bi-accent:   #1A6FD4;
  --bi-text:     #1C2533;
  --bi-muted:    #6B7280;
  --bi-radius:   14px;
  --bi-thumb-r:  10px;

  position: fixed;
  z-index: 99999;
  outline: none;
  width: 360px;
  height: 560px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  background: var(--bi-bg);
  backdrop-filter: blur(28px) saturate(1.9);
  -webkit-backdrop-filter: blur(28px) saturate(1.9);
  border: 1px solid var(--bi-border);
  border-radius: var(--bi-radius);
  box-shadow:
    0 12px 48px rgba(0,0,0,0.22),
    0 4px 16px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.7);

  /* Entry animation */
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition:
    opacity 240ms cubic-bezier(0.16,1,0.3,1),
    transform 280ms cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  visibility: hidden;
}

.bi-panel.bi-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  visibility: visible;
}

/* ── Header ───────────────────────────────────────────────── */

.bi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
}

.bi-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--bi-text);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bi-close-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(0,0,0,0.06);
  border-radius: 50%;
  cursor: pointer;
  color: var(--bi-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms;
}
.bi-close-btn:hover { background: rgba(0,0,0,0.12); }

/* ── Phase indicator (breadcrumb) ─────────────────────────── */

.bi-phase-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.bi-phase-step {
  font-size: 11px;
  font-weight: 600;
  color: var(--bi-muted);
  opacity: 0.5;
  transition: opacity 200ms, color 200ms;
}
.bi-phase-step.active {
  color: var(--bi-accent);
  opacity: 1;
}
.bi-phase-sep {
  font-size: 10px;
  color: var(--bi-muted);
  opacity: 0.3;
}

/* ── Scrollable body ──────────────────────────────────────── */

.bi-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.bi-body::-webkit-scrollbar { width: 4px; }
.bi-body::-webkit-scrollbar-track { background: transparent; }
.bi-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* ── Phase containers ─────────────────────────────────────── */

.bi-phase {
  display: none;
  flex-direction: column;
  min-height: 0;
}
.bi-phase.bi-phase-active {
  display: flex;
  flex: 1;
}

/* ── Theme rows ───────────────────────────────────────────── */

.bi-theme-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.bi-theme-row {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.5);
  transition: box-shadow 160ms;
}
.bi-theme-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.10); }

.bi-theme-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 140ms;
}
.bi-theme-header:hover { background: rgba(0,0,0,0.03); }

.bi-theme-thumb {
  width: 52px;
  height: 30px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1C2533;
}

.bi-theme-info {
  flex: 1;
  min-width: 0;
}
.bi-theme-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--bi-text);
}
.bi-theme-sub {
  font-size: 11px;
  color: var(--bi-muted);
  margin-top: 1px;
}

.bi-theme-arrow {
  width: 16px;
  height: 16px;
  color: var(--bi-muted);
  transition: transform 280ms cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
.bi-theme-row.bi-expanded .bi-theme-arrow {
  transform: rotate(90deg);
}

/* ── Variant grid (inside theme expand) ──────────────────── */

.bi-variants-wrap {
  max-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    max-height 320ms cubic-bezier(0.4,0,0.2,1),
    opacity 200ms ease,
    transform 240ms ease;
  scrollbar-width: thin;
}
.bi-theme-row.bi-expanded .bi-variants-wrap {
  max-height: 300px;
  opacity: 1;
  transform: translateY(0);
}
.bi-variants-wrap::-webkit-scrollbar { width: 4px; }
.bi-variants-wrap::-webkit-scrollbar-track { background: transparent; }
.bi-variants-wrap::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 4px; }

.bi-variants {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px 12px 14px;
}

.bi-variant-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition:
    border-color 160ms,
    transform 200ms cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 160ms;
  /* Default: dark bg for background-plate previews */
  background: #1C2533;
}

/* Overlay templates: dark broadcast-studio bg so the chrome elements pop */
.bi-variant-card--overlay {
  background: linear-gradient(160deg, #0a1628 0%, #12233d 50%, #0e1e35 100%);
}
.bi-variant-card:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(0,0,0,0.20);
}
.bi-variant-card.bi-selected {
  border-color: var(--bi-accent);
  box-shadow: 0 0 0 1px rgba(26,111,212,0.25), 0 4px 14px rgba(26,111,212,0.18);
}

.bi-variant-thumb {
  width: 100%;
  aspect-ratio: 12/7;
  object-fit: cover;
  display: block;
}

.bi-variant-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bi-variant-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bi-accent);
  color: #fff;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.bi-variant-card.bi-selected .bi-variant-check {
  display: flex;
}

/* ── Phase 1 footer ───────────────────────────────────────── */

.bi-footer {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bi-selection-label {
  font-size: 12px;
  color: var(--bi-muted);
}

.bi-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms, transform 120ms;
}
.bi-btn:active { transform: scale(0.97); }

.bi-btn--primary {
  background: var(--bi-accent);
  color: #fff;
}
.bi-btn--primary:hover { background: #1355a6; }
.bi-btn--primary:disabled {
  background: rgba(26,111,212,0.3);
  cursor: not-allowed;
}

.bi-btn--ghost {
  background: rgba(0,0,0,0.06);
  color: var(--bi-text);
}
.bi-btn--ghost:hover { background: rgba(0,0,0,0.10); }

/* ── Phase 2: Config ──────────────────────────────────────── */

.bi-config-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 12px 10px;
}

.bi-config-hero {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(26,111,212,0.10), rgba(26,111,212,0.04));
  border: 1px solid rgba(26,111,212,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.bi-config-hero-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bi-accent);
}

.bi-config-hero-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--bi-text);
}

.bi-slot-card {
  border-radius: 12px;
  padding: 0;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.bi-slot-card--forecast {
  background: linear-gradient(180deg, rgba(26,111,212,0.05), rgba(255,255,255,0.34));
}

.bi-slot-card--text {
  background: linear-gradient(180deg, rgba(28,37,51,0.04), rgba(255,255,255,0.30));
}

/* Config section — flat compact card */
.bi-section {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.5);
}

.bi-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: default;
  user-select: none;
}

.bi-section-icon {
  font-size: 13px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.bi-section-title {
  flex: 1;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--bi-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bi-section-body {
  padding: 0 10px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Radio group */
.bi-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bi-radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.bi-radio-row input[type="radio"] {
  accent-color: var(--bi-accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.bi-radio-label {
  font-size: 12px;
  color: var(--bi-text);
  cursor: pointer;
}

/* Location select dropdown */
.bi-select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--bi-border);
  border-radius: 7px;
  background: rgba(255,255,255,0.8);
  font-size: 12px;
  color: var(--bi-text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}
.bi-select:focus { border-color: var(--bi-accent); }

/* Text input */
.bi-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--bi-border);
  border-radius: 7px;
  background: rgba(255,255,255,0.8);
  font-size: 12px;
  color: var(--bi-text);
  outline: none;
  transition: border-color 140ms;
}
.bi-input:focus { border-color: var(--bi-accent); }
.bi-input::placeholder { color: var(--bi-muted); }

/* Temp unit toggle */
.bi-toggle-row {
  display: flex;
  gap: 6px;
}
.bi-toggle-btn {
  flex: 1;
  padding: 5px 4px;
  border-radius: 6px;
  border: 1.5px solid rgba(0,0,0,0.10);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--bi-muted);
  cursor: pointer;
  transition: all 140ms;
  white-space: nowrap;
}
.bi-toggle-btn.active {
  background: var(--bi-accent);
  border-color: var(--bi-accent);
  color: #fff;
}

/* Field checkboxes */
.bi-fields-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bi-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 3px 0;
}
.bi-field-row input[type="checkbox"] {
  accent-color: var(--bi-accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.bi-field-label {
  font-size: 12px;
  color: var(--bi-text);
  cursor: pointer;
  flex: 1;
}
.bi-field-group {
  font-size: 10px;
  color: var(--bi-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Fetch status bar */
.bi-fetch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin: 0 12px 4px;
  transition: background 200ms;
}
.bi-fetch-bar--idle    { background: transparent; }
.bi-fetch-bar--loading { background: rgba(26,111,212,0.08); color: var(--bi-accent); }
.bi-fetch-bar--ok      { background: rgba(16,185,129,0.08); color: #059669; }
.bi-fetch-bar--error   { background: rgba(239,68,68,0.08);  color: #DC2626; }

.bi-fetch-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(26,111,212,0.2);
  border-top-color: var(--bi-accent);
  border-radius: 50%;
  animation: bi-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes bi-spin { to { transform: rotate(360deg); } }

/* Custom text row (Upper Third / T53 header) */
.bi-text-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 8px;
}
.bi-text-label {
  font-size: 11px;
  color: var(--bi-muted);
  font-weight: 600;
}

/* Phase 2 footer */
.bi-p2-footer {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.07);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Location mode tabs ───────────────────────────────────── */

.bi-mode-tabs {
  display: flex;
  background: rgba(0,0,0,0.05);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
  margin-bottom: 6px;
}

.bi-mode-tab {
  flex: 1;
  padding: 4px 8px;
  border: none;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bi-muted);
  background: transparent;
  cursor: pointer;
  transition: background 140ms, color 140ms, box-shadow 140ms;
}
.bi-mode-tab.active {
  background: #fff;
  color: var(--bi-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* ── Stacked field layout ─────────────────────────────────── */

.bi-field-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bi-field-label-top {
  font-size: 10px;
  font-weight: 600;
  color: var(--bi-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Input size variants ──────────────────────────────────── */

.bi-input--lg {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 7px;
  border-width: 1px;
}

.bi-input--lg:focus {
  border-color: var(--bi-accent);
}

.bi-select--full {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 7px;
}

/* ── Input with icon prefix ───────────────────────────────── */

.bi-input-wrap {
  position: relative;
}

.bi-input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bi-muted);
  pointer-events: none;
}

.bi-input--icon {
  padding-left: 32px;
}

/* ── Chip-style field toggles ─────────────────────────────── */

.bi-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bi-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.6);
  font-size: 11px;
  font-weight: 600;
  color: var(--bi-muted);
  cursor: pointer;
  transition: border-color 140ms, background 140ms, color 140ms;
  user-select: none;
}

.bi-chip input[type="checkbox"] {
  display: none;
}

.bi-chip--on {
  border-color: var(--bi-accent);
  background: rgba(26,111,212,0.08);
  color: var(--bi-accent);
}

.bi-chip--disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.bi-chip--disabled:hover {
  border-color: rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.6);
}

.bi-chip:hover {
  border-color: var(--bi-accent);
  background: rgba(26,111,212,0.05);
}

/* ── My Banners section (Phase 1) ─────────────────────────── */

.bi-my-banners {
  padding: 10px 14px 0;
}

.bi-mb-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.bi-mb-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bi-muted);
}

.bi-mb-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(26,111,212,0.12);
  color: var(--bi-accent);
  border-radius: 20px;
  padding: 0 6px;
  line-height: 18px;
}

.bi-mb-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.bi-mb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: var(--bi-surface);
  border: 1px solid var(--bi-border);
  border-radius: 10px;
  transition: background 120ms;
}

.bi-mb-row:hover {
  background: rgba(255,255,255,0.72);
}

.bi-mb-thumb {
  width: 48px;
  height: 27px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.bi-mb-thumb-ph {
  width: 48px;
  height: 27px;
  background: rgba(0,0,0,0.07);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.bi-mb-info {
  flex: 1;
  min-width: 0;
}

.bi-mb-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bi-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bi-mb-sub {
  font-size: 10.5px;
  color: var(--bi-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bi-mb-actions {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.bi-mb-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--bi-border);
  border-radius: 7px;
  background: rgba(255,255,255,0.5);
  color: var(--bi-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, color 120ms, border-color 120ms;
  padding: 0;
}

.bi-mb-btn:hover {
  background: rgba(26,111,212,0.08);
  border-color: var(--bi-accent);
  color: var(--bi-accent);
}

.bi-mb-btn--del:hover {
  background: rgba(220,38,38,0.08);
  border-color: #DC2626;
  color: #DC2626;
}

/* Separator between My Banners and theme list */
.bi-my-banners + .bi-theme-list {
  border-top: 1px solid var(--bi-border);
  padding-top: 10px;
}

/* ── Header style row (color + font size) ───────────────────── */

.bi-header-style-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.bi-field-stack--half {
  flex: 1;
  min-width: 0;
}

.bi-color-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bi-surface);
  border: 1px solid var(--bi-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 120ms;
}

.bi-color-wrap:hover {
  border-color: var(--bi-accent);
}

.bi-color-input {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}

.bi-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.bi-color-input::-webkit-color-swatch { border: none; border-radius: 5px; }

.bi-color-val {
  font-size: 11px;
  font-family: monospace;
  color: var(--bi-muted);
  letter-spacing: 0.04em;
}

/* Three-button toggle row (e.g. °F / °C / Both) */
.bi-toggle-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── SVG section icon ─────────────────────────────────────── */

.bi-section-svg {
  color: var(--bi-muted);
  flex-shrink: 0;
  display: block;
}

/* ── Segmented control (date range / temp unit) ───────────── */

/* ── Multi-banner stacked sections ───────────────────────── */

.bi-slot-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 4px;
}

.bi-slot-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bi-accent);
}

.bi-slot-sub {
  font-size: 11px;
  color: var(--bi-muted);
}

.bi-slot-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 8px 0 2px;
}

.bi-seg-ctrl {
  display: flex;
  background: rgba(0,0,0,0.05);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.bi-seg-btn {
  flex: 1;
  padding: 4px 6px;
  border: none;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bi-muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms, color 140ms, box-shadow 140ms;
}

.bi-seg-btn.active {
  background: #fff;
  color: var(--bi-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.bi-seg-btn:not(.active):hover {
  background: rgba(255,255,255,0.5);
}

/* ── Period field spacing ─────────────────────────────────── */

.bi-field-stack--period {
  margin-top: 2px;
}

/* ── Side-by-side style row (Color + Size) ────────────────── */

.bi-style-row {
  display: flex;
  gap: 8px;
}

.bi-section-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--bi-muted);
  padding: 0 0 2px;
}

.bi-inline-status {
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid rgba(0,0,0,0.06);
}

.bi-inline-status--muted {
  color: var(--bi-muted);
  background: rgba(255,255,255,0.52);
}

.bi-inline-status--ok {
  color: #0E7A55;
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.18);
}

/* ── Hex color pill ───────────────────────────────────────── */

.bi-hex-pill {
  display: flex;
  align-items: center;
  gap: 0;
  height: 30px;
  border: 1px solid var(--bi-border);
  border-radius: 20px;
  background: rgba(255,255,255,0.85);
  overflow: hidden;
  transition: border-color 140ms;
  cursor: pointer;
}

.bi-hex-pill:focus-within {
  border-color: var(--bi-accent);
  box-shadow: 0 0 0 2px rgba(26,111,212,0.10);
}

.bi-hex-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  margin: 0 6px 0 6px;
  border: 1.5px solid rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 120ms;
}

.bi-hex-dot:hover {
  transform: scale(1.12);
}

/* Native color input lives inside the glass popover */
.bi-color-native {
  position: static;
}

.bi-hex-text {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 11.5px;
  font-family: ui-monospace, "SF Mono", "Fira Mono", monospace;
  color: var(--bi-text);
  letter-spacing: 0.04em;
  outline: none;
  padding: 0 8px 0 2px;
  height: 100%;
}

/* ── Uniform height select ────────────────────────────────── */

.bi-select--h32 {
  height: 30px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 30px;
}

/* ── Location autocomplete suggestions ───────────────────── */

.bi-loc-autocomplete {
  position: relative;
  outline: none;
}

/* Remove browser outlines on all interactive elements inside the panel */
.bi-panel input:focus,
.bi-panel button:focus,
.bi-panel select:focus,
.bi-panel textarea:focus,
.bi-input-wrap:focus-within {
  outline: none;
}

.bi-loc-suggestions {
  position: fixed;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.11);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  z-index: 999999;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}

.bi-loc-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #1C2533;
  text-align: left;
  transition: background 0.1s;
}

.bi-loc-suggestion:hover {
  background: rgba(26,111,212,0.08);
}

.bi-loc-suggestion span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Color swatch popup ───────────────────────────────────── */

.bi-swatch-popup {
  position: fixed;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.7);
  z-index: 999999;
  padding: 10px;
}

.bi-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.72);
  box-shadow: 0 2px 10px rgba(28,37,51,0.14);
  transition: transform 120ms, border-color 120ms, box-shadow 120ms;
  display: block;
  padding: 0;
}
.bi-swatch:hover {
  transform: scale(1.08);
  border-color: rgba(26,111,212,0.65);
  box-shadow: 0 4px 12px rgba(26,111,212,0.22);
}

.bi-color-popover {
  width: 238px;
  transition: padding 180ms ease;
}

.bi-color-popover-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.06);
}

.bi-color-preview {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.bi-color-meta {
  min-width: 0;
  flex: 1;
}

.bi-color-meta-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--bi-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bi-color-meta-value {
  margin-top: 2px;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", "Fira Mono", monospace;
  color: var(--bi-text);
}

.bi-color-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bi-color-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
}

.bi-color-expand-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.65);
  color: var(--bi-accent);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.bi-color-expand-btn:hover,
.bi-color-expand-btn.active {
  border-color: rgba(26,111,212,0.45);
  background: rgba(26,111,212,0.10);
}

.bi-color-expand-btn.active {
  transform: rotate(45deg);
}

.bi-color-wheel-wrap {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 180ms ease, opacity 180ms ease, margin-top 180ms ease;
}

.bi-color-popover.is-expanded .bi-color-wheel-wrap {
  max-height: 220px;
  opacity: 1;
  margin-top: 10px;
}

.bi-color-wheel {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0%, rgba(255,255,255,0.96) 18%, rgba(255,255,255,0) 62%),
    conic-gradient(#ff3b30, #ffcc00, #34c759, #00c7be, #0a84ff, #5e5ce6, #bf5af2, #ff2d55, #ff3b30);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 8px 20px rgba(28,37,51,0.10);
  cursor: crosshair;
}

.bi-color-wheel-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: none;
  left: 50%;
  top: 50%;
}

/* ── Font visual picker ───────────────────────────────────── */

.bi-font-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--bi-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--bi-text);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 140ms;
}
.bi-font-btn:hover { border-color: var(--bi-accent); }

.bi-font-list {
  position: fixed;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.11);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  z-index: 999999;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.bi-font-item {
  padding: 7px 12px;
  font-size: 13px;
  color: #1C2533;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bi-font-item:hover  { background: rgba(26,111,212,0.08); }
.bi-font-item.active { background: rgba(26,111,212,0.13); color: var(--bi-accent); font-weight: 600; }
