/*
 * Display mode for Webstudio. Always loaded after the original navy/azure palette.
 * Light is the existing design; only data-ws-theme="dark" recolors page elements.
 */
.ws-mode-control { position: relative; flex: none; }
.ws-mode-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 9px 12px;
  background: #f5f8fc; color: #142b4c; border: 1px solid #d9e5f3;
  font-size: .83rem; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.ws-mode-toggle:hover,
.ws-mode-toggle[aria-expanded="true"] { background: #eaf4ff; border-color: #007fff; }
.ws-mode-icon { font-size: 1.25rem; line-height: 1; width: 21px; text-align: center; }
.ws-mode-options {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 90;
  width: 194px; padding: 6px; background: #fff;
  border: 1px solid #d9e5f3; box-shadow: 0 14px 35px rgba(20,43,76,.16);
}
.ws-mode-options[hidden] { display: none !important; }
.ws-mode-choice {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; background: transparent; color: #142b4c; border: 0;
  text-align: left; font-size: .86rem; cursor: pointer;
}
.ws-mode-choice:hover,
.ws-mode-choice:focus-visible { background: #eaf4ff; }
.ws-mode-choice[aria-pressed="true"] { background: #eaf4ff; font-weight: 800; }
.ws-mode-choice[aria-pressed="true"]::after {
  content: "✓"; color: #005cb8; margin-left: auto; font-size: 1rem;
}
.ws-mode-choice-symbol { width: 22px; text-align: center; font-size: 1.1rem; }
.ws-mode-toggle:focus-visible,
.ws-mode-choice:focus-visible { outline: 3px solid #007fff; outline-offset: 2px; }

@media (max-width: 1150px) {
  .ws-mode-label { display: none; }
  .ws-mode-toggle { padding: 9px 11px; }
}
@media (max-width: 920px) {
  .ws-mode-control { width: 100%; }
  .ws-mode-toggle { width: 100%; justify-content: flex-start; }
  .ws-mode-label { display: inline; }
  .ws-mode-options { position: static; width: 100%; margin-top: 7px; box-shadow: none; }
}

/* Dark mode: shared readable text, subtle dividing lines, and dark native form controls. */
html[data-ws-theme="dark"] {
  --ink: #eff5ff;
  --ink-2: #ceddf0;
  --cream: #102239;
  --white: #142b45;
  --muted: #bccde2;
  --line: #2f4767;
  --teal: #79bcff;
  --teal-dark: #142b4c;
  --teal-light: #213d5f;
  --ws-blue-line: #304966;
  color-scheme: dark;
}
html[data-ws-theme="dark"] body { background: #102239; color: #eff5ff; }
html[data-ws-theme="dark"] .site-header,
html[data-ws-theme="dark"] .primary-nav,
html[data-ws-theme="dark"] .nav-list .sub-menu {
  background: #0e2037; color: #eff5ff;
}
html[data-ws-theme="dark"] .site-header.scrolled {
  box-shadow: 0 6px 22px rgba(0,0,0,.28);
}
html[data-ws-theme="dark"] .brand-name strong,
html[data-ws-theme="dark"] .nav-list a { color: #eff5ff; }
html[data-ws-theme="dark"] .nav-list a:hover { color: #79bcff; }
html[data-ws-theme="dark"] .brand-mark { border: 1px solid #4c6b92; }
html[data-ws-theme="dark"] .nav-contact { background: #005cb8; color: #fff; }
html[data-ws-theme="dark"] .nav-contact:hover { background: #006bd1; }
html[data-ws-theme="dark"] .menu-toggle span { background: #eff5ff; }

/* Preserve the original dark navy hero; avoid changing user-defined photos. */
html[data-ws-theme="dark"] .hero { color: #fff; }
html[data-ws-theme="dark"] .button-primary {
  background: #005cb8; color: #fff;
}
html[data-ws-theme="dark"] .button-primary:hover { background: #006bd1; }
html[data-ws-theme="dark"] .button-light { background: #fff; color: #142b4c; }
html[data-ws-theme="dark"] .button-light:hover { background: #eaf4ff; }
html[data-ws-theme="dark"] .text-link {
  color: #a4d4ff; border-bottom-color: #007fff;
}
html[data-ws-theme="dark"] .text-link:hover,
html[data-ws-theme="dark"] .page-content a:hover,
html[data-ws-theme="dark"] .contact-details a:hover { color: #d4eaff; }

/* Existing section layout, media, typography and spacing are untouched. */
html[data-ws-theme="dark"] .strengths-section,
html[data-ws-theme="dark"] .services-section,
html[data-ws-theme="dark"] .team-section,
html[data-ws-theme="dark"] .inner-page-section { background: #101f34; }
html[data-ws-theme="dark"] .about-section,
html[data-ws-theme="dark"] .projects-section,
html[data-ws-theme="dark"] .testimonial-section,
html[data-ws-theme="dark"] .contact-section { background: #172c47; }

html[data-ws-theme="dark"] .service-card,
html[data-ws-theme="dark"] .project-card,
html[data-ws-theme="dark"] .testimonial-card,
html[data-ws-theme="dark"] .contact-form-card {
  background: #1c3553; color: #eff5ff;
}
html[data-ws-theme="dark"] .services-grid {
  background: #304966; border-color: #304966;
}
html[data-ws-theme="dark"] .services-grid .service-card:hover { background: #284665; }
html[data-ws-theme="dark"] .service-arrow { border-color: #57779c; color: #79bcff; }
html[data-ws-theme="dark"] .project-placeholder { background: #355574; }
html[data-ws-theme="dark"] .team-photo { background: #213a57; }
html[data-ws-theme="dark"] .team-placeholder {
  background: linear-gradient(145deg, #213a57, #355574); color: #9dceff;
}
html[data-ws-theme="dark"] .about-card { background: #005cb8; color: #fff; }
html[data-ws-theme="dark"] .about-facts strong { color: #eff5ff; }
html[data-ws-theme="dark"] .page-content { color: #c4d5e9; }
html[data-ws-theme="dark"] .page-content a { color: #9dceff; }
html[data-ws-theme="dark"] .page-content h2,
html[data-ws-theme="dark"] .page-content h3 { color: #eff5ff; }

/* Forms including plugin inputs: keep text and borders visible at night. */
html[data-ws-theme="dark"] .ws-form input:not([type="checkbox"]),
html[data-ws-theme="dark"] .ws-form textarea,
html[data-ws-theme="dark"] .contact-form-card input:not([type="checkbox"]),
html[data-ws-theme="dark"] .contact-form-card textarea,
html[data-ws-theme="dark"] .contact-form-card select {
  background: #10243d; color: #eff5ff; border-color: #46617e;
}
html[data-ws-theme="dark"] .ws-form input:focus,
html[data-ws-theme="dark"] .ws-form textarea:focus,
html[data-ws-theme="dark"] .contact-form-card input:focus,
html[data-ws-theme="dark"] .contact-form-card textarea:focus {
  background: #142b48; color: #eff5ff; border-color: #79bcff;
  box-shadow: 0 0 0 3px rgba(0,127,255,.2);
}
html[data-ws-theme="dark"] .contact-form-card input::placeholder,
html[data-ws-theme="dark"] .contact-form-card textarea::placeholder { color: #a8bdd5; opacity: 1; }
html[data-ws-theme="dark"] .contact-form-card input[type="checkbox"] { accent-color: #007fff; }
html[data-ws-theme="dark"] .checkbox-line a { color: #a4d4ff; text-decoration: underline; }
html[data-ws-theme="dark"] .form-notice { background: #243f5d; color: #eff5ff; }

/* Display-mode popover matches the active theme. */
html[data-ws-theme="dark"] .ws-mode-toggle {
  color: #eff5ff; background: #182f4b; border-color: #426187;
}
html[data-ws-theme="dark"] .ws-mode-toggle:hover,
html[data-ws-theme="dark"] .ws-mode-toggle[aria-expanded="true"] {
  background: #294764; border-color: #79bcff;
}
html[data-ws-theme="dark"] .ws-mode-options {
  background: #142b45; border-color: #426187; box-shadow: 0 14px 35px rgba(0,0,0,.3);
}
html[data-ws-theme="dark"] .ws-mode-choice { color: #eff5ff; }
html[data-ws-theme="dark"] .ws-mode-choice:hover,
html[data-ws-theme="dark"] .ws-mode-choice:focus-visible,
html[data-ws-theme="dark"] .ws-mode-choice[aria-pressed="true"] { background: #264968; }
html[data-ws-theme="dark"] .ws-mode-choice[aria-pressed="true"]::after { color: #9dceff; }
