/* Public appearance shares Shark's placement, modes and anonymous storage key. */
@media (prefers-reduced-motion: no-preference) {
  html.divers-theme-fade :is(body,.divers-header,.divers-appearance button,.divers-appearance-panel) {
    transition: background-color 720ms ease, color 720ms ease, border-color 720ms ease;
  }
}
html[data-divers-appearance] {
  --appearance-panel: #fff;
  --appearance-ink: #071d2b;
  --appearance-line: #ced5d7;
  --night: #071d2b;
  --action-red: #c3192d;
}
html[data-divers-appearance][data-theme=dark] {
  --paper: #091d28;
  --ink: #edf4f7;
  --line: #3c5663;
  --red: #ff6570;
  --divers-surface: #102b39;
  --divers-muted: #b6cbd5;
  --appearance-panel: #102b39;
  --appearance-ink: #edf4f7;
  --appearance-line: #3c5663;
}
.divers-appearance {
  position: fixed;
  left: 8px;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 1301;
  font: 600 12px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Aptos", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--appearance-ink);
}
/* Keep both public controls on one baseline. CookieScript may expand its
   label to the right without covering the appearance control. */
html[data-divers-appearance] #cookiescript_badge {
  left: 58px;
  bottom: max(8px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  min-width: 42px;
  height: 42px;
  padding: 9px;
  align-items: center;
  border-radius: 999px;
}
html[data-divers-appearance] #cookiescript_badge #cookiescript_badgeimage,
html[data-divers-appearance] #cookiescript_badge #cookiescript_badgesvg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
html[data-divers-appearance] #cookiescript_badge #cookiescript_badgetext {
  font-size:12px;
  line-height:1.3;
  font-weight:500;
  text-transform:none;
  letter-spacing:normal;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html[data-divers-appearance] #cookiescript_badge:focus-visible {
  outline: 3px solid #1589a8;
  outline-offset: 3px;
}
/* Match the adjacent appearance control instead of CookieScript's white badge. */
html[data-divers-appearance][data-theme=dark] #cookiescript_badge {
  padding: 8px;
  border: 1px solid var(--appearance-line);
  background: radial-gradient(90px 54px at 74% 18%, #ffffff57, transparent 70%), var(--appearance-panel);
  backdrop-filter: blur(8px) saturate(135%);
  box-shadow: inset 0 1px 0 #ffffff57, 0 12px 28px #0f172a20;
}
html[data-divers-appearance][data-theme=dark] #cookiescript_badge:is(:hover, :focus-visible) {
  box-shadow: 0 0 0 3px #356d8833, inset 0 1px 0 #ffffff57, 0 16px 34px #0f172a29;
}
html[data-divers-appearance][data-theme=dark] #cookiescript_badge .cookiescriptlogo {
  fill: #65ade5;
}
html[data-divers-appearance][data-theme=dark] #cookiescript_badge #cookiescript_badgetext {
  color: var(--appearance-ink);
}
@media (prefers-reduced-motion: reduce) {
  html[data-divers-appearance] #cookiescript_badge,
  html[data-divers-appearance] #cookiescript_badge #cookiescript_badgetext {
    transition: none;
  }
}
.divers-appearance button {
  appearance: none;
  cursor: pointer;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  border: 1px solid var(--appearance-line);
  background: var(--appearance-panel);
  color: var(--appearance-ink);
  border-radius: 999px;
  box-shadow: none;
}
.divers-appearance .divers-appearance-trigger {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--appearance-panel) 90%, transparent);
  backdrop-filter: blur(8px) saturate(135%);
  box-shadow: 0 8px 22px #0f172a33;
}
.divers-appearance-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.divers-appearance .divers-appearance-trigger[data-mode=light] { color: #b07a12; }
.divers-appearance .divers-appearance-trigger[data-mode=dark] { color: #65ade5; }
.divers-appearance-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: 6px 8px;
  border: 1px solid var(--appearance-line);
  border-radius: 24px;
  background: var(--appearance-panel);
  box-shadow: 0 8px 24px #0f172a29;
}
.divers-appearance-panel[hidden] { display: none; }
.divers-appearance-panel>span { padding-inline: 2px 4px; }
.divers-appearance-panel button { padding: 5px 8px; min-height: 28px; white-space: nowrap; font-size:12px; font-weight:760; box-shadow:inset 0 1px 0 #ffffff57,0 3px 8px #0f172a14; }
.divers-appearance button:is(:hover,[aria-pressed=true]) { background: color-mix(in srgb, var(--appearance-panel) 80%, #1589a8); }
.divers-appearance button:focus-visible { outline: 3px solid #1589a8; outline-offset: 3px; }
html[data-theme=dark] .divers-header .divers-nav-brand img { content: url('/logo-divers-direct-light.png'); }
html[data-theme=dark] .divers-nav-login { border-color: var(--appearance-line); }
html[data-theme=dark] .divers-nav-login:is(:hover,:focus-visible,:active) { background: #253c48; }
html[data-theme=dark] :is(.reviews-page,.public-events) { --review-ink: #edf4f7; --review-muted: #b6cbd5; --event-ink: #edf4f7; --event-muted: #b6cbd5; --event-accent: #ff7c85; }
html[data-theme=dark] :is(.events-categories,.events-view) button[aria-pressed=true] { background: #285366; border-color: #5f8a9c; }
html[data-theme=dark] :is(.event-filters,.reviews-filters,.reviews-hero-aside,.contacts-branches,.service-product-stage,.service-price-nav) { background: #163541; }
html[data-theme=dark] .reviews-page :is(input,select,textarea) { background: #091d28; border-color: #4a6977; }
html[data-theme=dark] .reviews-page :is(h1 em,h2 em,.reviews-filters>button,.review-mark) { color: #76d7d9; }
html[data-theme=dark] .event-filters :is(input,select) { background: #091d28; }
html[data-theme=dark] .events-empty { background: #163541; }
html[data-theme=dark] :is(.events-categories button,.public-event-grid article) { --chip-start:#244657; --chip-end:#183442; --chip-ink:#d0eaf7; --chip-border:#5a8398; }
html[data-theme=dark] :is(.events-categories [data-event-category=vikendovka],.public-event-grid article[data-category=vikendovka]) { --chip-start:#4b3c25; --chip-end:#332b20; --chip-ink:#f5d6a2; }
html[data-theme=dark] :is(.events-categories [data-event-category=prednaska],.public-event-grid article[data-category=prednaska]) { --chip-start:#234a36; --chip-end:#18372b; --chip-ink:#bae8ca; }
html[data-theme=dark] :is(.events-categories [data-event-category=trenink],.public-event-grid article[data-category=trenink]) { --chip-start:#3a3055; --chip-end:#27213d; --chip-ink:#dfd0ff; }
html[data-theme=dark] :is(.events-categories [data-event-category=deti],.public-event-grid article[data-category=deti]) { --chip-start:#4c2d3d; --chip-end:#36212d; --chip-ink:#ffd1e3; }
html[data-theme=dark] .events-categories button,
html[data-theme=dark] .event-date-badge { background: linear-gradient(120deg,var(--chip-start),var(--chip-end)); box-shadow: none; }
html[data-theme=dark] .events-categories button span { background: #ffffff12; }
html[data-theme=dark] .event-photo-tag { box-shadow: none; }
html[data-theme=dark] :is(.events-intro h1 em,.events-catalog-heading h2 em,.event-open,.about-benefit-symbol,.branch-marker,.reviews-hero h1 em,.review-read,.review-tags button,.review-filter-options label:has(input:checked)) { color:#86cbdc; }
html[data-theme=dark] .review-stars { color:#f4c86b; }
html[data-theme=light] .reviews-continuation .reviews-eyebrow { color:#086d74; }
html[data-theme=dark] .reviews-continuation .reviews-eyebrow { color:#86cbdc; }
/* This technical illustration retains its light paper in both appearances. */
html[data-divers-appearance] .work-unfold { --divers-muted:#526a75; }
html[data-theme=dark] .work-callout>span { color:var(--red); }
html[data-theme=dark] :is(.catalog-heading>p,.catalog-path li span,.catalog-path-branches a,.catalog-filter-help,.catalog-results,.catalog-group>header>p,.catalog-help>div>p:not(.catalog-eyebrow)) { color:var(--divers-muted); }
/* Rental has its own isolated variables and prototype settings. Public choice wins. */
html[data-theme=dark] .rental-content { --paper:#171c1e; --surface:#101517; --ink:#f4f5f2; --muted:#afb9bd; --line:#353d40; --accent-text:#ff6570; }
html[data-theme=light] .rental-content { --paper:#f5f5f2; --surface:#fff; --ink:#171a1b; --muted:#60676a; --line:#d9ddda; }
/* Course presentations keep their photographic scenes dark; reading surfaces follow appearance. */
html[data-divers-appearance][data-theme=light]:is([data-course],[data-beginner],[data-embed]) {
  --paper:#f5f5f2; --surface:#e5edef; --ink:#102e3b; --muted:#45606e; --line:#aabfc8; --accent:#087583; --red:#c3192d;
}
html[data-divers-appearance][data-theme=light]:is([data-course],[data-beginner],[data-embed]):not(.classified-reading) :is(.hero,.freediving-intro,.nav:not([data-divers-section-nav]),.course-card,.card-wrap,.card-scene,.card-back,.gift-wrap,.theme-feature--night,.theme-feature--rescue,.beginner-immersion-sticky,.beginner-gallery) {
  --paper:#071e2b; --surface:#102d3b; --ink:#f3f8fa; --muted:#b2c6cf; --accent:#a6eef4; --line:#335968;
  color:var(--ink);
}
html[data-divers-appearance][data-theme=light]:is([data-course],[data-beginner],[data-embed]) .facts { background:var(--paper); }
html[data-divers-appearance][data-theme=light] :is(.beginner-variants,.beginner-variant,.beginner-cta,.beginner-program>div,.program-related,.freediving-program) { background:var(--surface); color:var(--ink); }
html[data-divers-appearance][data-theme=light] .bundle-unpack { background:var(--paper); }
html[data-divers-appearance][data-theme=light] .beginner-cta p { color:var(--muted); }
html[data-divers-appearance][data-theme=light] .club-discount { color:#fff; }
html[data-divers-appearance][data-theme=light] .club-discount p { color:#fff; }
/* Lazy responsive logos use size containment (sizes="auto"). Preserve the
   brand ratio even when the theme replaces the image through CSS content. */
html[data-divers-appearance] .footer .brand img { height:auto; aspect-ratio:5765 / 1006; object-fit:contain; }
html[data-divers-appearance][data-theme=light] .footer .brand img { content:url('/logo-divers-direct.png'); }
html[data-divers-appearance][data-theme=light][data-embed]:not([data-course]) :is(.journey,.focus-section,.gallery,.contact,.index-path,.lightbox) { background:var(--surface); }
html[data-theme=light] .voucher-page { background:#f5f5f2; color:#102e3b; --accent:#087583; }
html[data-theme=light] .voucher-page :is(.voucher-note,.voucher-program-grid p,.voucher-sticky>p:last-child,.voucher-hero figcaption,.voucher-steps p) { color:#45606e; }
html[data-theme=light] .voucher-how { background:#e5edef; }
.divers-appearance .divers-appearance-trigger { background:radial-gradient(90px 54px at 74% 18%,#ffffff57,transparent 70%),var(--appearance-panel); color:#356d88; box-shadow:inset 0 1px 0 #ffffff57,0 12px 28px #0f172a20; transition:box-shadow 170ms ease,background-color 170ms ease; }
.divers-appearance .divers-appearance-trigger:is(:hover,:focus-visible) { box-shadow:0 0 0 3px #356d8833,inset 0 1px 0 #ffffff57,0 16px 34px #0f172a29; }
.divers-appearance-panel { backdrop-filter:blur(16px) saturate(150%); }
.divers-appearance-panel>span { min-width:42px; font-size:12px; font-weight:650; }
@media(pointer:coarse) { .divers-appearance-panel button { min-height:44px; } }
@media(prefers-reduced-motion:reduce) { .divers-appearance .divers-appearance-trigger { transition:none; } }
/* Card instructions can cross from the dark photo into the light page on mobile. */
html[data-divers-appearance][data-theme=light][data-course] .card-hint {
  color:#f3f8fa;
  background:#102e3b;
  width:max-content;
  max-width:100%;
  margin-inline:auto;
  padding:4px 10px;
  border-radius:4px;
}
/* Keep Independent Diving's copper identity on the shared light shell. */
html[data-divers-appearance][data-theme=light][data-course=independent]{--accent:#905323}
html[data-divers-appearance][data-theme=light][data-course=independent]:not(.classified-reading) :is(.hero,.nav:not([data-divers-section-nav]),.card-scene,.card-back,.theme-feature--independent){--paper:#08272d;--surface:#103a40;--ink:#f3f8fa;--muted:#bfd1d1;--accent:#efbd8c;--line:#416064}
