/* v3.2.6 base variables */
.fvh-lds3-wrap{
  --brand:#2563eb; --brand-hover:#1d4ed8; --brand-ring:rgba(37,99,235,.2); --brand-ring-strong:rgba(37,99,235,.28);
  --text-900:#111827; --muted-400:#9ca3af; --border:#e5e7eb; --surface:#fff; --surface-soft:#f8fafc;
  width:100%;
}
.fvh-lds3-wrap.theme--pink{ --brand: var(--theme-pink,#db2777); --brand-hover:#be185d; --brand-ring:rgba(219,39,119,.2); --brand-ring-strong:rgba(219,39,119,.28); }
.fvh-lds3-wrap.theme--blue{ --brand: var(--theme-blue,#2563eb); --brand-hover:#1d4ed8; --brand-ring:rgba(37,99,235,.2); --brand-ring-strong:rgba(37,99,235,.28); }
.fvh-lds3-wrap.theme--black{ --brand: var(--theme-black,#111827); --brand-hover:#0b1220; --brand-ring:rgba(17,24,39,.22); --brand-ring-strong:rgba(17,24,39,.30); }
.fvh-lds3-wrap.theme--dark{
  --brand:#38bdf8; --brand-hover:#0ea5e9; --brand-ring:rgba(56,189,248,.25); --brand-ring-strong:rgba(56,189,248,.35);
  --text-900:#f3f4f6; --muted-400:#9ca3af; --border:#334155; --surface:#0b1220; --surface-soft:#111827;
}

/* bar */
.fvh-lds3{ display:flex; gap:12px; align-items:center; width:100%; background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:14px; box-shadow:0 6px 24px rgba(0,0,0,.06); }
.fvh-lds3-field{ position:relative; flex:1 1 0; min-width:0; } .fvh-lds3-loc{ min-width:260px; }
.fvh-lds3-input{ width:100%; height:56px; padding:12px 44px 12px 14px; cursor:pointer; border:1px solid #d1d5db; border-radius:12px; background:#fff; color:#1f2937; font-size:16px; line-height:1.2; transition:border-color .15s, box-shadow .15s, background .15s; }
.fvh-lds3-wrap.theme--dark .fvh-lds3-input{ border-color:#cbd5e1; background:#fff; color:#111827; }
.fvh-lds3-input:focus{ outline:0; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-ring); }
.fvh-lds3-input.is-empty{ border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-ring); }
.fvh-lds3-icon{ position:absolute; right:14px; top:50%; transform:translateY(-50%); display:grid; place-items:center; color:var(--muted-400); pointer-events:none; user-select:none; }
.fvh-lds3-help{ margin-top:10px; color:#6b7280; font-size:12px; } .fvh-lds3-wrap.theme--dark .fvh-lds3-help{ color:#9ca3af; }

/* dialog + overlay (portaled) */
.fvh-lds3-overlay{ position:fixed; inset:0; background:rgba(17,24,39,.55); backdrop-filter:saturate(120%) blur(2px); z-index:99998; }
.fvh-lds3-dialog{ position:fixed; left:50%; top:12vh; transform:translateX(-50%); background:var(--surface); width:min(980px, 92vw); border-radius:16px; border:1px solid var(--border); box-shadow:0 30px 60px rgba(0,0,0,.25); z-index:99999; display:flex; flex-direction:column; max-height:76vh; }
.fvh-lds3-wrap.theme--dark .fvh-lds3-dialog{ background:var(--surface-soft); }
.fvh-lds3-dialog[hidden], .fvh-lds3-overlay[hidden]{ display:none !important; }

/* header */
.fvh-lds3-dialog__header{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--border); color:var(--text-900); }
.fvh-lds3-dialog__header h3{ margin:0; font-size:28px; line-height:1.25; font-weight:700; color:var(--text-900); }

/* subtitle */
.fvh-lds3-subtitle{
  padding:10px 18px 0 18px;
  color: var(--text-900);
  opacity:.9;
  font-size:14px;
}

/* close button */
.fvh-lds3-close{ display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--border); border-radius:8px; background:transparent; color:#334155; cursor:pointer; outline:none; }
.fvh-lds3-close svg{ width:18px; height:18px; }
.fvh-lds3-wrap.theme--dark .fvh-lds3-close{ color:#e5e7eb; border-color:#475569; }
.fvh-lds3-close:hover, .fvh-lds3-close:focus{ color:var(--brand); border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-ring); }

/* grid */
.fvh-lds3-grid{ padding:14px 16px; display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:14px; overflow:auto; color:var(--text-900); min-height:200px; }
@media (max-width:980px){ .fvh-lds3-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width:720px){ .fvh-lds3-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width:440px){ .fvh-lds3-grid{ grid-template-columns: repeat(1, minmax(0, 1fr)); } }

/* cards */
.fvh-lds3-card{ border:1px solid var(--border); border-radius:12px; overflow:hidden; cursor:pointer; background:#fff; display:flex; flex-direction:column; min-height:180px; transition:transform .1s, box-shadow .15s, border-color .15s, background .15s; -webkit-appearance:none; appearance:none; outline:0; }
.fvh-lds3-wrap.theme--dark .fvh-lds3-card{ background:#0b1220; color:#e5e7eb; border-color:#334155; }
.fvh-lds3-card:hover{ transform: translateY(-2px); box-shadow:0 10px 20px rgba(0,0,0,.08); }
.fvh-lds3-thumb{ width:100%; height:134px; object-fit:cover; display:block; filter:none !important; }
.fvh-lds3-name{ padding:12px 14px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; text-align:center; color:#111827; }
.fvh-lds3-wrap.theme--dark .fvh-lds3-name{ color:#e5e7eb; }
.fvh-lds3-card.is-selected{ border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-ring-strong); }
.fvh-lds3-card:focus-visible{ box-shadow:0 0 0 3px var(--brand-ring); border-color:var(--brand); }
.fvh-lds3-card:focus{ outline:none; box-shadow:0 0 0 3px var(--brand-ring), 0 6px 16px rgba(0,0,0,.08); border-color:var(--brand); }

/* keep cards white in non-dark themes */
.fvh-lds3-wrap:not(.theme--dark) .fvh-lds3-card{ background:#fff !important; color:#111827; border-color:#e5e7eb; }
.fvh-lds3-wrap:not(.theme--dark) .fvh-lds3-card:hover,
.fvh-lds3-wrap:not(.theme--dark) .fvh-lds3-card:focus{ background:#fff !important; border-color:#e5e7eb; box-shadow:0 10px 20px rgba(0,0,0,.08); }

/* ---------- PORTAL (Slider Revolution safe) ---------- */
.fvh-lds3-portal{
  position: fixed; inset: 0; z-index: 2147483000 !important; pointer-events: none;
  --surface:#fff; --surface-soft:#0b1220; --border:#e5e7eb; --text-900:#111827;
}
.fvh-lds3-portal .fvh-lds3-overlay{
  position: fixed; inset: 0; background: rgba(17,24,39,.55); backdrop-filter: saturate(120%) blur(2px);
  z-index: 2147483001 !important; pointer-events: auto;
}
.fvh-lds3-portal .fvh-lds3-dialog{
  position: fixed; left: 50%; top: 12vh; transform: translateX(-50%);
  width: min(980px, 92vw); max-height: 76vh; overflow: auto;
  background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
  z-index: 2147483002 !important; pointer-events: auto;
}
/* unhide if a theme forces display:none */
.fvh-lds3-portal .fvh-lds3-dialog:not([hidden]){ display:flex !important; opacity:1 !important; visibility:visible !important; }
/* strip inherited transforms/filters */
.fvh-lds3-portal *, .fvh-lds3-portal *::before, .fvh-lds3-portal *::after{ filter:none !important; }
