/*
 * Dark scheme for the legacy landing theme (GWP-53).
 *
 * Linked last in the head with media="(prefers-color-scheme: dark)" and
 * wrapped in the same media query, so it never applies in the light scheme
 * and needs no script: the server-rendered page is already dark when the
 * system is, and it switches live when the setting changes.
 *
 * What stays as it is: the brand-coloured header, the brand-coloured
 * sections (.dark, #contact), hero photos, flags, logos and document images.
 * Nothing is inverted or filtered. Logos drawn for a white page (client
 * logos) keep a light plate behind them.
 *
 * Most rules start with "html body": the header, footer and page
 * stylesheets are linked from the body, after this file, and several of
 * them set white with !important. The extra specificity keeps these rules
 * ahead of them.
 */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --lp-bg: #141413;
    --lp-bg-alt: #1b1b1a;
    --lp-card: #21201e;
    --lp-field: #2c2b28;
    --lp-line: #34332f;
    --lp-line-strong: #55544f;
    --lp-head: #ecebe7;
    --lp-text: #cfcdc7;
    --lp-muted: #a9a7a1;
    --lp-link: #9db4d8;
    --lp-plate: #f4f3ef;
  }

  /* ---- page surfaces ---------------------------------------------------- */
  html body,
  html body #wrapper,
  html body #content,
  html body #content .content-wrap,
  html body #footer,
  html body #copyrights {
    background-color: var(--lp-bg) !important;
    color: var(--lp-text);
  }
  html body .section:not(.dark),
  html body #more-info.section,
  html body .pricing-line-items {
    background-color: var(--lp-bg-alt) !important;
  }
  html body #about.section {
    background: linear-gradient(rgba(25, 102, 221, 0.12), rgba(0, 47, 120, 0.2)) !important;
  }

  /* Cards and boxes, including the Bootstrap white and light utilities. */
  html body .card,
  html body #widget.card,
  html body .bg-white,
  html body .bg-light,
  html body .pricing-box,
  html body .pricing-title,
  html body .tab-content,
  html body .visa-table .toggle,
  html body .visa-table > .toggle > .togglet,
  html body .visa-table > .toggle > .toggleta,
  html body .dropdown-menu,
  html body .dropdown-menu-language,
  html body .modal-content {
    background-color: var(--lp-card) !important;
    border-color: var(--lp-line) !important;
  }
  html body .card.shadow,
  html body .shadow,
  html body .shadow-sm {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5) !important;
  }
  html body hr,
  html body .line,
  html body .toggle,
  html body .divider,
  html body .pricing-features,
  html body .pricing-action,
  html body .table td,
  html body .table th,
  html body .border,
  html body .border-top,
  html body .border-bottom,
  html body #footer .footer-widgets-wrap {
    border-color: var(--lp-line) !important;
  }

  /* The theme's gradient section fades from the brand colour to white. */
  html body .section-gradient {
    background: linear-gradient(
      to bottom,
      var(--themecolor, #3f5b84) 30%,
      var(--lp-bg) 80%
    ) !important;
  }

  /* Wave dividers are drawn in white to run into the white section below. */
  html body .shape-divider svg[style*='white'],
  html body .svg-separator svg[style*='white'],
  html body .shape-divider path[fill='white'] {
    fill: var(--lp-bg) !important;
  }

  /* ---- text ------------------------------------------------------------- */
  /* Brand-coloured (.dark) sections, the header, buttons and the light
     plates are excluded: they keep their own text colours. */
  html
    body
    :is(h1, h2, h3, h4, h5, h6, .togglet, .toggleta, legend, th, dt):not(.dark *):not(
      #header *
    ):not(.text-white):not(.lp-plate *):not(.button *):not(.btn *) {
    color: var(--lp-head);
  }
  html
    body
    :is(p, li, td, dd, address, strong, b, label, small, blockquote, figcaption):not(.dark *):not(
      #header *
    ):not(.text-white):not(.lp-plate *):not(.button *):not(.btn *) {
    color: var(--lp-text);
  }
  html
    body
    :is(
      .text-muted,
      .text-black-50,
      .pricing-title span,
      .heading-block > span,
      .testi-meta,
      .testi-meta span,
      .portfolio-desc span
    ):not(.dark *):not(#header *) {
    color: var(--lp-muted) !important;
  }
  html body :is(.text-dark, .text-black, .text-body):not(.dark *):not(#header *):not(.lp-plate *) {
    color: var(--lp-head) !important;
  }
  html
    body
    a:not(.button):not(.btn):not(.dark *):not(#header *):not(.text-white):not(.lp-plate *):not(
      .dropdown-item
    ),
  html
    body
    a:not(.button):not(.btn):not(.dark *):not(#header *):not(.text-white):not(.lp-plate *)
    > :is(u, span, div),
  html body .process-steps li.active h5 {
    color: var(--lp-link) !important;
  }
  /* Headings given black inline, on sections that are dark here. */
  html body :is(h1, h2, h3, h4, h5, h6, p, span)[style*='color:black']:not(.lp-plate *),
  html body :is(h1, h2, h3, h4, h5, h6, p, span)[style*='color: black']:not(.lp-plate *),
  html body .text-black-0 {
    color: var(--lp-head) !important;
  }
  /* A link inside a sentence is underlined, so it does not rely on colour. */
  html
    body
    :is(p, td, dd, .content-wrap li)
    > a:not(.button):not(.btn):not(#header *):not(#footer *):not(.nav-link) {
    text-decoration: underline !important;
  }
  html body .badge:not(.dark *) {
    color: var(--lp-link) !important;
  }
  html body .badge.lightthemecolor {
    background-color: rgba(157, 180, 216, 0.14) !important;
  }
  /* The legacy white text-shadow embosses headings on a dark card. */
  html body :is(h1, h2, h3, h4, h5, h6, span, p, a):not(#header *):not(.dark *) {
    text-shadow: none !important;
  }

  /* ---- header ----------------------------------------------------------- */
  /* The brand colour stays. The half-opacity white labels on it measure
     2.8:1, so they are raised to 4.9:1 in this scheme. */
  html body #header .text-white-50 {
    color: rgba(255, 255, 255, 0.85) !important;
  }
  /* Flagship navigation strip and its menus. */
  html body #header-nav .container,
  html body #primary-menu ul ul,
  html body #primary-menu .mega-menu-content {
    background-color: var(--lp-card) !important;
    border-color: var(--lp-line) !important;
  }
  html body #header-nav #primary-menu a,
  html body #header-nav #primary-menu a > div,
  html body #header-nav #primary-menu a i,
  html body #primary-menu ul ul li > a,
  html body #primary-menu ul ul li:hover > a {
    color: var(--lp-head) !important;
  }
  html body #header-nav .button {
    background-color: var(--lp-field) !important;
    color: var(--lp-head) !important;
  }
  html body .dropdown-menu-language a,
  html body .dropdown-menu a,
  html body .dropdown-item {
    color: var(--lp-head) !important;
  }
  html body .dropdown-item:hover,
  html body .dropdown-item:focus {
    background-color: #33322f !important;
  }
  @media (max-width: 991.98px) {
    html body #primary-menu,
    html body #primary-menu > div > ul {
      background-color: var(--lp-card) !important;
    }
  }

  /* ---- hero ------------------------------------------------------------- */
  /* White-label hero photo: keep the photo, swap the fade to white for a
     fade to the page colour. The inline style draws the white fade, so a
     layer above it takes over from 80% down, below the hero copy. */
  html body #overlay-bg-img.full::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 80%, var(--lp-bg) 100%);
    pointer-events: none;
  }
  /* Flagship hero: the inline gradient runs from white into the brand blue.
     Here it runs from the page colour into the same blue. */
  html body #hero-section {
    background: linear-gradient(var(--lp-bg) 25%, #3f5b84 75%) !important;
  }
  /* Hero copy sits on the photo, which keeps its light sky: unchanged. */
  html body #overlay-bg-img ~ .row h2.text-black.h2 {
    color: #444 !important;
  }
  /* The sign-in prompt can fall where the photo fades into the page (on
     phones it always does), so its text gets a dark backing in this scheme.
     The backing is a background and a 2px shadow on the inline span: neither
     takes part in layout, so the prompt sits exactly where it does in the
     light scheme. */
  html body .hero-signin-prompt,
  html body .hero-signin-prompt > span {
    color: var(--lp-head) !important;
  }
  html body .hero-signin-prompt > span {
    border-radius: 4px;
    background: #1b1b1a;
    box-shadow: 0 0 0 2px #1b1b1a;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
  /* The white Sign in button under it stays a light control. */
  /* :not(#_) twice: raises specificity above the general link rule, whose
     :not(#header *) carries an id. */
  html body a[data-gws-cta='hero-signin']:not(#_):not(#_) {
    color: #222 !important;
    text-decoration: none !important;
  }

  /* ---- eligibility widget and form fields ------------------------------- */
  html body .input-group-text,
  html body .btn.dropdown-toggle.btn-light,
  html body .form-control,
  html body .sm-form-control,
  html body .bootstrap-select .dropdown-menu {
    background-color: var(--lp-field) !important;
    border-color: var(--lp-line-strong) !important;
    color: var(--lp-head) !important;
  }
  html body ::placeholder {
    color: var(--lp-muted) !important;
    opacity: 1;
  }
  html body .filter-option-inner-inner,
  html body .input-group-text i {
    color: var(--lp-head) !important;
  }
  html body .bootstrap-select .dropdown-menu li a,
  html body .bootstrap-select .dropdown-menu li a span {
    color: var(--lp-text) !important;
  }
  html body .bootstrap-select .dropdown-menu li a:hover,
  html body .bootstrap-select .dropdown-menu li.selected a,
  html body .bootstrap-select .dropdown-menu li a.active {
    background-color: #33322f !important;
  }
  /* Tabs above the widget (flagship). */
  html body .nav-tabs {
    border-color: var(--lp-line) !important;
  }
  html body .nav-tabs .nav-link,
  html body #slider .nav-link:not(.active) {
    background-color: var(--lp-bg-alt) !important;
    color: var(--lp-muted) !important;
  }
  html body .nav-tabs .nav-link.active,
  html body .nav-tabs .nav-link:hover,
  html body .nav-tabs .nav-link:focus {
    background-color: var(--lp-card) !important;
    color: var(--lp-head) !important;
    border-color: var(--lp-line) !important;
  }

  /* ---- visa table: expanded rows ---------------------------------------- */
  /* The details under a visa row open on a click. Their grey sheet and
     white cards are set with !important in the page stylesheet. */
  html body .visa-table > .toggle > .togglec {
    background-color: var(--lp-bg-alt) !important;
  }
  html body .visa-table > .toggle > .togglec .card {
    background-color: var(--lp-card) !important;
    border-color: var(--lp-line) !important;
  }
  html body .visa-table > .toggle > .togglet:hover,
  html body .visa-table > .toggle > .toggleta:hover,
  html body .visa-table > .toggle > .toggleta {
    background-color: #2a2926 !important;
  }
  /* Help popovers on the required-documents list. */
  html body .popover,
  html body .popover-header,
  html body .popover-body {
    background-color: var(--lp-field) !important;
    border-color: var(--lp-line-strong) !important;
    color: var(--lp-head) !important;
  }
  html body .popover .arrow::before,
  html body .popover .arrow::after {
    border-top-color: var(--lp-field) !important;
    border-bottom-color: var(--lp-field) !important;
  }

  /* ---- process steps ---------------------------------------------------- */
  html body .process-steps li .i-bordered {
    background-color: var(--lp-card) !important;
    border-color: var(--lp-line-strong) !important;
    color: var(--lp-text) !important;
  }
  html body .process-steps li::before,
  html body .process-steps li::after {
    border-color: #3a3936 !important;
  }

  /* ---- buttons ---------------------------------------------------------- */
  /* Filled theme buttons keep the brand colour and white text. White
     buttons stay light controls with dark text. */
  html body a.button.button-white,
  html body .button.button-light {
    color: #333 !important;
  }
  html body a.country-button:not(#_):not(#_) {
    background-color: var(--lp-card) !important;
    color: var(--lp-head) !important;
    box-shadow: 0 0 0 1px var(--lp-line) !important;
  }
  html body .iportfolio .portfolio-overlay a {
    background-color: var(--lp-plate) !important;
    color: #333 !important;
  }

  /* ---- footer ----------------------------------------------------------- */
  html body .social-icon {
    border-color: var(--lp-line-strong) !important;
  }
  html body .social-icon i:last-child {
    background-color: var(--lp-field) !important;
  }

  /* ---- "Our Service" icons ---------------------------------------------- */
  /* The white blob behind each icon is a PNG. Here it is replaced by a
     tinted disc of the same size, and the line icon takes the link blue
     (5.9:1 on the disc), so the row reads as part of the dark page. */
  html body .feature-box .fbox-icon[style*='iconbg'] {
    background-image: none !important;
    background-color: #2c3447 !important;
    border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  }
  html body .feature-box .fbox-icon[style*='iconbg'] i {
    color: var(--lp-link) !important;
  }

  /* ---- light plates ----------------------------------------------------- */
  /* Client logos are dark drawings made for a white page. They keep a light
     plate, and any text on the plate stays dark. */
  /* The weather forecast is a third-party iframe (weatherwidget.io) with a
     white page of its own that this stylesheet cannot reach. Its card stays
     a framed white panel on purpose, like the payment card fields. */
  html body .card.weather-plate {
    background-color: #ffffff !important;
    border-color: var(--lp-line-strong) !important;
    color-scheme: light;
  }
  html body .lp-plate,
  html body #oc-clients-full {
    background-color: var(--lp-plate) !important;
    border-radius: 6px;
  }
}
