/* The optional screen palette. Printed forms keep their own print styles. */
@media screen and (forced-colors: none) {
  html[data-contrast="high"] {
    color-scheme: dark;
    --paper: #000;
    --ink: #fff;
    --body: #fff;
    --line: #bababa;
    --green-dark: #ffe44d;
    --title-color: #fff;
    --theme-color: #ffe44d;
    --theme-color4: #000;
    --theme-color5: #ffe44d;
    --focus: #71f6ff;
  }
  html[data-contrast="high"] .brand img { content: url("/assets/logo-na-ciemnym.webp"); }

  /* Opaque backgrounds also protect text where the template overlaps sections. */
  html[data-contrast="high"] :is(.header-main7, .header-lower-seven .outer-box, .mobile-menu nav,
    .vs-hero-wrapper7, .breadcumb-wrapper, .breadcumb-menu, .why-choose-section7,
    .news-letter-box-two, .site-footer .widget-area.v7, .copyright-wrap-seven, .footer-funding,
    .service-card7, .blog-card-seven, .notice, thead, tbody tr:nth-child(even)) {
    background: var(--paper);
    color: var(--ink);
    box-shadow: none;
  }
  html[data-contrast="high"] :is(.service-section7, .news-letter-box-two, .breadcumb-menu-wrap,
    .about-img-seven, .banner-img-seven, .widget_title-seven)::before,
  html[data-contrast="high"] :is(.about-img-seven, .banner-img-seven)::after,
  html[data-contrast="high"] .hero-mark { display: none; }
  html[data-contrast="high"] .breadcumb-menu { padding-inline-start: 1.25rem; }
  html[data-contrast="high"] :is(.header-lower-seven .outer-box, .breadcumb-menu, .blog-card-seven) {
    border: 1px solid var(--line);
  }
  html[data-contrast="high"] :is(.hero-feature-box .title-two, .footer-menus h2, .footer-locations address,
    .breadcumb-menu [aria-current], .news-letter-title .sub-title7, .title-area-three .sub-title7) {
    color: var(--ink);
  }
  html[data-contrast="high"] .location-box-two .content-box .text-title { color: var(--ink) !important; }
  html[data-contrast="high"] .breadcumb-menu li + li::before { color: var(--ink); }
  html[data-contrast="high"] :is(main p, main li, main th, main td, .footer-funding-copy p) {
    text-align: start;
    hyphens: manual;
  }
  html[data-contrast="high"] :is(.title-area-three, .all-services) > p,
  html[data-contrast="high"] p.all-services { text-align: inherit; }

  /* Component styles use individual colors; share one foreground for all link states. */
  html[data-contrast="high"] a:any-link { color: var(--link-ink, var(--theme-color)) !important; }
  html[data-contrast="high"] a:any-link:hover { --link-ink: #fff; }
  html[data-contrast="high"] .location-box-two.one::before { background: var(--line); }
  html[data-contrast="high"] :is(.header-icon7, .about-block) img,
  html[data-contrast="high"] .registration-phone a::before { filter: brightness(0) invert(1); }
  html[data-contrast="high"] .choose-block .icon-box { background: var(--paper); border: 1px solid var(--line); }

  html[data-contrast="high"] :is(.btn-style7, .blog-content-seven .btn-style7, .skip-link, .mobile-menu summary, button.contrast-toggle) {
    color: var(--theme-color);
    background: var(--paper);
    border: 2px solid var(--theme-color);
  }
  html[data-contrast="high"] :is(.btn-style7, .blog-content-seven .btn-style7, .skip-link, .mobile-menu summary, button.contrast-toggle):hover,
  html[data-contrast="high"] .contrast-toggle[aria-pressed="true"],
  html[data-contrast="high"] :is(.menu-style7, .mobile-menu nav) a[aria-current="page"] {
    --link-ink: #000;
    color: #000;
    background: var(--theme-color);
  }
  html[data-contrast="high"] :is(.menu-style7, .mobile-menu nav) a:hover,
  html[data-contrast="high"] .header-lower-seven .top-link:hover {
    --link-ink: #000;
    background: #fff;
  }
  html[data-contrast="high"] .contrast-toggle[aria-pressed="true"]:hover { background: #fff; }

  html[data-contrast="high"] .notice { border-color: var(--theme-color); }
  html[data-contrast="high"] :is(.footer-menus, .branch-quick-list li, .mobile-menu nav,
    .patient-guide .accordion-item, th, td) { border-color: var(--line); }
  html[data-contrast="high"] thead { border-bottom: 2px solid var(--ink); }
  html[data-contrast="high"] :is(.field input, .field textarea) {
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    caret-color: var(--ink);
  }
  html[data-contrast="high"] .patient-guide .accordion-button { color: var(--theme-color); }
  html[data-contrast="high"] .patient-guide .accordion-button::before {
    color: var(--theme-color);
    background: var(--paper);
    border: 2px solid var(--theme-color);
  }
  html[data-contrast="high"] .patient-guide .accordion-button[aria-expanded="true"]::before {
    color: var(--paper);
    background: var(--theme-color);
  }
  /* The black inner ring separates the cyan outline from light surfaces and photographs. */
  html[data-contrast="high"] :focus-visible {
    outline: 3px solid var(--focus) !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #000;
  }
  html[data-contrast="high"] ::selection { background: var(--theme-color); color: #000; }
}

@media screen and (forced-colors: active) {
  /* Images used as decoration can survive the browser's forced background colors. */
  .site-footer .widget-area.v7, .vs-hero-wrapper7, .breadcumb-wrapper, .why-choose-section7,
  .news-letter-box-two, .news-letter-box-two::before {
    background: Canvas;
    color: CanvasText;
  }
  .service-section7::before, .about-img-seven::before, .about-img-seven::after,
  .breadcumb-menu-wrap::before { display: none; }
  .site-footer .footer-logo img {
    /* The footer's transparent white wordmark needs its dark backing in light palettes. */
    forced-color-adjust: none;
    background-color: #000;
  }
  :is(.menu-style7, .mobile-menu nav, .site-footer) a[aria-current="page"] {
    outline: 1px solid CanvasText;
    outline-offset: 0;
  }
  :focus-visible {
    outline: 3px solid CanvasText !important;
    outline-offset: 3px !important;
  }
}

@media screen and (forced-colors: active) and (prefers-color-scheme: dark) {
  .brand img { content: url("/assets/logo-na-ciemnym.webp"); }
}
