/* Shared material for navigation, form shells and the controls inside them. */
:root[data-theme] {
  --liquid-neutral:#eff5f9;
  --liquid-opacity:66%;
  --liquid-field-opacity:35%;
  --liquid-content-opacity:68%;
  --liquid-blur:blur(14px) saturate(.90);
  --liquid-rim-light:#ffffffb8;
  --liquid-rim-dark:#2538473d;
  --liquid-depth:#162b422b;
  --liquid-spot:#233a4d4a;
  --liquid-spot-fade:#233a4d21;
  --liquid-edge-hot:#ffffffc7;
  --liquid-edge-fade:#e8edf45c;
  --liquid-field-reflection:#263a4d59;
  --liquid-ink:#10212e;
  --liquid-muted:#203749;
}
:root[data-theme=dark] {
  --liquid-neutral:#132330;
  --liquid-opacity:69%;
  --liquid-field-opacity:42%;
  --liquid-content-opacity:72%;
  --liquid-blur:blur(14px) saturate(.84) brightness(.76);
  --liquid-rim-light:#e7f0f965;
  --liquid-rim-dark:#07111999;
  --liquid-depth:#0005;
  --liquid-spot:#dfedff53;
  --liquid-spot-fade:#b7cde82b;
  --liquid-edge-hot:#f1f6ffb8;
  --liquid-edge-fade:#d2deec4f;
  --liquid-field-reflection:#e5efff77;
  --liquid-ink:#f6faff;
  --liquid-muted:#e2eef7;
}

:root[data-theme],
:root[data-theme] :is([data-lovi-category],.vault-dialog-v63) {
  --liquid-base:var(--liquid-neutral);
  --air-surface:color-mix(in srgb,var(--liquid-base) var(--liquid-opacity),transparent);
  --liquid-field-fill:color-mix(in srgb,var(--liquid-base) var(--liquid-field-opacity),transparent);
  --air-field:color-mix(in srgb,var(--liquid-base) var(--liquid-content-opacity),transparent);
  --air-ink:var(--liquid-ink);
  --air-muted:var(--liquid-muted);
  --liquid-rim:inset 0 1px 1px var(--liquid-rim-light),inset 0 -1px 2px var(--liquid-rim-dark);
  --air-shadow:var(--liquid-rim),0 8px 24px var(--liquid-depth);
  --liquid-field-shadow:var(--liquid-rim),0 2px 8px var(--liquid-depth);
}

/* Category tint is reserved for the title, navigation and service cards. */
:root[data-theme] :is(.section-brand,.primary-navigation button,.sidebar nav button,.service-card)[data-lovi-category] {
  --liquid-base:color-mix(in srgb,var(--section-tint,var(--liquid-neutral)) 40%,var(--liquid-neutral));
}

/* A form with a dedicated shell shares its glass instead of stacking another blur. */
:root[data-theme] :is(.auth-card,dialog,.section-brand,
  .page :is(.panel,.tool-panel,.draft-editor,.travel-cinema-search,.insurance-hub-v54,
  .account-vault-v63,.smart-search-form,.search-form,.help-search-panel,.chat-heading,
  .composer,.chat-settings,.market-account-v51,.listing-search-bar-v52,.listing-import-v44,
  .product-filter-disclosure-v66[open],.listing-safety-v45,.listing-empty-v36,.help-empty,.help-support,
  .help-answer,.help-answers details,.banking-comparison,.banking-availability,.banking-faq details,
  .banking-state-v33,.insurance-manual-v54,.insurance-review-v54,.workspace-group,
  .owner-empty-v53,.vault-record-v63,.empty,.notice),
  .page form:not(:is(.panel,.draft-editor,.travel-cinema-search,.help-search-panel,.insurance-hub-v54,
    .panel form,.draft-editor form,.travel-cinema-search form,.help-search-panel form,
    .insurance-hub-v54 form,.account-vault-v63 form,.listing-import-v44 form,.banking-comparison form,dialog form))) {
  --air-field:var(--liquid-field-fill);
  background:var(--air-surface)!important;
  box-shadow:var(--air-shadow)!important;
  -webkit-backdrop-filter:var(--liquid-blur)!important;
  backdrop-filter:var(--liquid-blur)!important;
}

:root[data-theme] .page :is(.listing-safety-v45,.listing-empty-v36,.help-empty,.help-support,
  .help-answer,.help-answers details,.banking-comparison,.banking-availability,.banking-faq details,
  .banking-state-v33,.insurance-review-v54,.owner-empty-v53,.empty,.notice) {
  border:0!important;
  border-radius:16px;
}

:root[data-theme] :is(.panel,.draft-editor,.travel-cinema-search,.insurance-hub-v54)
  :is(.panel,.tool-panel,.listing-import-v44,.banking-state-v33,.insurance-review-v54,.empty,.notice) {
  --air-surface:var(--air-field);
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
:root[data-theme] .page :is(.policy-row,.policy-car,.policy-renew-field) {
  background:var(--liquid-field-fill);
  color:var(--air-ink);
  box-shadow:var(--liquid-field-shadow);
}
:root[data-theme] #search-page .product-filter-disclosure-v66[open] {
  padding:12px;
  border-radius:16px;
}
:root[data-theme] .page .listing-browser:has(>form) {
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}

:root[data-theme] :is(.auth-card,dialog,.page) :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=range],[type=color]),textarea,select) {
  background-color:var(--air-field)!important;
  color:var(--air-ink)!important;
  box-shadow:var(--liquid-field-shadow)!important;
}
:root[data-theme] :is(.auth-card,dialog,.page) :is(input,textarea)::placeholder {
  color:var(--air-muted)!important;
  opacity:1;
}
:root[data-theme] :is(.auth-card,dialog,.page) :is(input,select,textarea,button):focus-visible {
  outline:2px solid var(--air-accent);
  outline-offset:3px;
}
:root[data-theme] .page :is(.listing-search-bar-v52 input,.smart-search-form>#smart-query) {
  background-color:transparent!important;
  box-shadow:none!important;
}
:root[data-theme] #travel-page .travel-cinema-fields label {
  background:var(--air-field)!important;
  box-shadow:var(--liquid-field-shadow);
}
:root[data-theme] #travel-page .travel-cinema-fields input {
  background:transparent!important;
  box-shadow:none!important;
}
:root[data-theme] :is(.page,.auth-card,dialog,.site-header,.sidebar) :is(button,.button-link) {
  box-shadow:var(--liquid-field-shadow);
}
:root[data-theme] :is(.site-header,.sidebar) :is(button,a):focus-visible {
  outline:2px solid var(--air-accent);
  outline-offset:2px;
}
:root[data-theme] .primary-navigation button[data-page] {
  box-shadow:var(--liquid-field-shadow)!important;
}
@media(min-width:1000px) {
  :root[data-theme] body[data-menu]:not([data-menu=open]) .sidebar nav button[data-page]::before {
    background:var(--air-surface)!important;
    box-shadow:var(--liquid-field-shadow)!important;
  }
}

/* Location, appearance, basket and account share one control silhouette. */
:root[data-theme] .site-header {--header-action-size:44px}
:root[data-theme] .site-header .header-account-actions {
  gap:8px;
}
:root[data-theme] .site-header :is(#location-open,#theme-toggle,#workspace-basket-open,#header-account),
:root[data-theme] .site-header .header-brand-row>#menu-toggle {
  box-sizing:border-box;
  height:var(--header-action-size);
  min-height:var(--header-action-size);
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 12px;
  border:0;
  border-radius:16px;
  background:var(--liquid-field-fill);
  box-shadow:var(--liquid-field-shadow);
  color:var(--liquid-ink);
  font-size:14px;
  line-height:20px;
  font-weight:600;
}
:root[data-theme] .site-header .header-account-actions>#theme-toggle {
  display:flex;
  flex:none;
  width:var(--header-action-size);
  min-width:var(--header-action-size);
  padding:0;
}
:root[data-theme] .site-header :is(#location-open,#theme-toggle,#workspace-basket-open) svg {
  width:20px;
  height:20px;
}
:root[data-theme] .site-header #header-avatar {
  width:24px;
  min-width:24px;
  height:24px;
  flex:none;
}
:root[data-theme] .site-header #header-account-label {
  font-size:inherit;
  font-weight:inherit;
}
:root[data-theme] .site-header .header-account-actions :is([aria-expanded=true],#workspace-basket-open.active) {
  box-shadow:var(--liquid-rim),0 0 0 1px var(--liquid-rim-light);
}
@media(max-width:1100px) {
  :root[data-theme] .site-header .header-account-actions #workspace-basket-open {
    width:var(--header-action-size);
    min-width:var(--header-action-size);
    padding:0;
  }
}
@media(max-width:700px) {
  :root[data-theme] .site-header {--header-action-size:40px}
  :root[data-theme] .site-header .header-account-actions {gap:4px}
  :root[data-theme] .site-header :is(#location-open,#theme-toggle,#workspace-basket-open,#header-account) {
    width:var(--header-action-size);
    min-width:var(--header-action-size);
    max-width:var(--header-action-size);
    gap:0;
    padding:0;
    border-radius:12px;
  }
  :root[data-theme] .site-header .header-brand-row>#menu-toggle {padding:0 4px}
  :root[data-theme] .site-header :is(#location-label,.workspace-cart-label,#header-account-label,#header-account-dot) {display:none!important}
}
@media(max-width:359px) {
  :root[data-theme] .site-header {--header-action-size:36px}
}

/* Paint under the contents so cutouts can cross the rim without being tinted. */
.liquid-lit {isolation:isolate}
.liquid-glow-anchor {position:relative}
.liquid-glow {
  display:none;
  position:absolute;
  inset:var(--liquid-inset,0);
  z-index:-1;
  border-radius:var(--liquid-radius,inherit);
  pointer-events:none;
  background:radial-gradient(ellipse 228px 156px at var(--liquid-x) var(--liquid-y),
    var(--liquid-spot),var(--liquid-spot-fade) 54%,transparent);
}
.liquid-glow::before {
  content:"";
  position:absolute;
  inset:0;
  padding:1px;
  border-radius:inherit;
  background:radial-gradient(ellipse 76% 82% at var(--liquid-x) var(--liquid-y),
    var(--liquid-edge-hot),var(--liquid-edge-fade) 52%,transparent 82%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
}
.liquid-glow[data-liquid-part=control] {
  background:radial-gradient(ellipse 105px 64px at var(--liquid-x) var(--liquid-y),
    var(--liquid-spot),transparent 88%);
}
:root[data-theme] :is(.primary,[aria-selected=true],[aria-pressed=true])>.liquid-glow {
  --liquid-spot:#ffffff32;
}
@media(prefers-reduced-motion:no-preference) {
  body:not([data-motion=paused]) .liquid-glow {display:block}
  :root[data-theme] body:not([data-motion=paused]) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea).liquid-field-lit {
    background-image:radial-gradient(ellipse 120px 65px at var(--liquid-x) var(--liquid-y),
      var(--liquid-spot),transparent)!important;
  }
  :root[data-theme] body:not([data-motion=paused]) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea).liquid-field-lit {
    box-shadow:inset var(--liquid-edge-x) var(--liquid-edge-y) 4px -1px var(--liquid-field-reflection),
      var(--liquid-field-shadow)!important;
  }
}
@supports not ((mask-composite:exclude) or (-webkit-mask-composite:xor)) {
  .liquid-glow::before {background:none;box-shadow:inset 0 0 0 1px var(--liquid-edge-fade)}
}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  :root[data-theme] {--liquid-opacity:94%;--liquid-field-opacity:89%;--liquid-content-opacity:94%}
}
@media(prefers-reduced-transparency:reduce), (prefers-contrast:more), (forced-colors:active) {
  :root[data-theme] {
    --liquid-opacity:100%;
    --liquid-field-opacity:100%;
    --liquid-content-opacity:100%;
    --liquid-blur:none;
    --liquid-field-shadow:inset 0 0 0 1px var(--liquid-muted);
  }
  body .liquid-glow {display:none!important}
}

:root[data-theme] .page .lovi-autofill-action {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  text-align:center;
  font-size:14px;
  line-height:20px;
}
.lovi-ai-badge {
  display:inline-grid;
  place-items:center;
  min-width:28px;
  min-height:20px;
  padding:0 4px;
  border-radius:8px;
  background:#e6e5ff;
  color:#493b8f;
  box-shadow:inset 0 1px 1px #fff9;
  font-size:12px;
  line-height:16px;
  font-weight:700;
}
:root[data-theme=dark] .lovi-ai-badge {
  background:#352c56;
  color:#e9e2ff;
  box-shadow:inset 0 1px 1px #c7b4ff45;
}

/* Keep the first search visually prominent and the suggestions easy to scan. */
:root[data-theme] #home-page #smart-search-form {
  min-height:72px;
  padding:8px 12px;
  border-radius:24px;
  box-shadow:var(--liquid-rim),0 10px 28px var(--liquid-depth)!important;
}
:root[data-theme] #home-page #smart-search-form:focus-within {
  box-shadow:var(--liquid-rim),0 0 0 2px color-mix(in srgb,var(--air-accent) 45%,transparent),
    0 10px 28px var(--liquid-depth)!important;
}
:root[data-theme] #home-page #smart-query {
  min-height:52px;
  padding-inline:8px;
  font-size:18px;
  line-height:28px;
}
:root[data-theme] #home-page #smart-search-form>button {
  min-height:48px;
  padding-inline:20px;
}
:root[data-theme] #home-page #smart-suggestions {
  top:calc(100% + 8px);
  padding:8px;
  border:0;
  border-radius:20px;
  background:color-mix(in srgb,var(--liquid-base) var(--suggestion-opacity,82%),transparent);
  box-shadow:var(--air-shadow);
  -webkit-backdrop-filter:var(--liquid-blur);
  backdrop-filter:var(--liquid-blur);
  transform-origin:center top;
}
:root[data-theme] #home-page #smart-suggestions .search-suggestion {
  min-height:44px;
  padding:8px 12px;
  border-radius:12px;
  background:transparent!important;
  color:var(--air-ink)!important;
  box-shadow:none;
  font-size:16px;
  line-height:24px;
}
:root[data-theme] #home-page #smart-suggestions .search-suggestion small {
  color:var(--air-muted);
  line-height:16px;
}
:root[data-theme] #home-page #smart-suggestions .search-suggestion:is(:hover,[aria-selected=true]) {
  background:color-mix(in srgb,var(--air-accent) 15%,transparent)!important;
  box-shadow:var(--liquid-rim);
}
@media(max-width:650px) {
  :root[data-theme] #home-page #smart-search-form {min-height:0;padding:8px 12px;gap:8px}
  :root[data-theme] #home-page #smart-query {min-height:52px;font-size:16px;line-height:24px}
}
@media(prefers-reduced-transparency:reduce), (prefers-contrast:more), (forced-colors:active) {
  :root[data-theme] #home-page #smart-suggestions {--suggestion-opacity:100%}
}
@media(prefers-reduced-motion:no-preference) {
  body[data-motion=on] #home-page #smart-suggestions:not([hidden]) {
    animation:lovi-suggestions-in .26s cubic-bezier(.22,1,.36,1) both;
  }
  body[data-motion=on] #home-page #smart-suggestions:not([hidden]) .search-suggestion {
    animation:lovi-suggestion-row .24s cubic-bezier(.22,1,.36,1) var(--suggestion-delay,0ms) both;
  }
  body[data-motion=on] #smart-suggestions .search-suggestion:nth-child(2) {--suggestion-delay:24ms}
  body[data-motion=on] #smart-suggestions .search-suggestion:nth-child(3) {--suggestion-delay:48ms}
  body[data-motion=on] #smart-suggestions .search-suggestion:nth-child(4) {--suggestion-delay:72ms}
  body[data-motion=on] #smart-suggestions .search-suggestion:nth-child(5) {--suggestion-delay:96ms}
  body[data-motion=on] #smart-suggestions .search-suggestion:nth-child(6) {--suggestion-delay:120ms}
}
@keyframes lovi-suggestions-in {
  from {opacity:0;transform:translateY(-6px) scaleY(.98)}
  to {opacity:1;transform:none}
}
@keyframes lovi-suggestion-row {
  from {opacity:0;transform:translateY(-4px)}
  to {opacity:1;transform:none}
}

/* One clipped glass plane joins the fixed header to the navigation rail. */
:root[data-theme] body {
  --navigation-full-width:340px;
  --navigation-sidebar-width:var(--rail-width);
}
:root[data-theme] body[data-menu=open] {--navigation-sidebar-width:var(--navigation-full-width)}
:root[data-theme] .navigation-material {
  position:fixed;
  inset:0;
  z-index:23;
  pointer-events:none;
  clip-path:polygon(0 0,100% 0,100% var(--header-visible-height),
    var(--navigation-sidebar-width) var(--header-visible-height),var(--navigation-sidebar-width) 100%,0 100%);
  background:color-mix(in srgb,var(--liquid-neutral) var(--navigation-opacity,79%),transparent);
  -webkit-backdrop-filter:var(--liquid-blur);
  backdrop-filter:var(--liquid-blur);
  transition:clip-path .24s ease;
}
:root[data-theme] :is(.site-header,.sidebar) {
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
:root[data-theme] .sidebar {z-index:24;transition:clip-path .24s ease,top .24s ease,transform .24s ease}
:root[data-theme] .menu-backdrop {
  left:var(--navigation-sidebar-width);
  transition:left .24s ease;
}
@media(min-width:1000px) {
  :root[data-theme] body:not([data-menu=open]) .sidebar nav button>.liquid-glow {
    inset:0 auto 0 0;
    width:88px;
  }
}
@media(max-width:999px) {
  :root[data-theme] body {
    --navigation-full-width:min(316px,calc(100vw - 24px));
    --navigation-sidebar-width:0px;
  }
}
body[data-motion=paused] :is(.navigation-material,.menu-backdrop) {transition:none}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  :root[data-theme] {--navigation-opacity:97%}
}
@media(prefers-reduced-transparency:reduce), (prefers-contrast:more), (forced-colors:active) {
  :root[data-theme] {--navigation-opacity:100%}
}
@media(prefers-reduced-motion:reduce) {
  :root[data-theme] :is(.navigation-material,.menu-backdrop) {transition:none}
}

/* Service and catalogue cards use the same glass as forms, with colour in the artwork. */
:root[data-theme] .page :is(.service-card,.product-store-tile,.listing-card,.offer-card,.basket-line,
  .draft-card,.history-row,.admin-metric,.carrier-card,.smart-search-result,.dm-thread,.dm-message,
  .listing-consultant,.price-guide,.shop-start,.listing-search-v52,.listing-mobile-helper,
  .banking-tabs,.partner-archive-v55,.finance-metric,.dm-empty) {
  color:var(--air-ink);
  background:var(--air-surface)!important;
  border-color:transparent!important;
  box-shadow:var(--air-shadow)!important;
  -webkit-backdrop-filter:var(--liquid-blur)!important;
  backdrop-filter:var(--liquid-blur)!important;
}
:root[data-theme] .page .service-card p {color:var(--air-muted)}
:root[data-theme] #search-page .product-store-tile[aria-pressed=true] {
  box-shadow:inset 0 0 0 2px var(--air-accent),var(--air-shadow)!important;
}
#search-page .product-store-logo {
  display:block;
  flex:none;
  width:34px;
  height:34px;
  border-radius:8px;
  object-fit:contain;
}
@media(max-width:650px) {
  #search-page .product-store-logo {width:30px;height:30px;border-radius:7px}
}

:root[data-theme] .page :is(.owner-editor-v53,.partner-notice-v55,.partner-status-v55,.partner-facts-v55) {
  background:var(--liquid-field-fill)!important;
  color:var(--air-ink)!important;
  box-shadow:var(--liquid-field-shadow);
  border-color:transparent!important;
}
