/**
 * On Method 2026 — browser / UA chrome layer
 * Selection, scrollbars, autofill, caret, overscroll, color-scheme,
 * tap highlight, touch-action, print. Cursor lives in cursor.css.
 */

/* Color scheme — light Antique White default; dark look for princess-anise */
html {
  color-scheme: light;
  caret-color: var(--om-accent, #BC8D1F);
  -webkit-tap-highlight-color: rgba(188, 141, 31, 0.22);
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
}

html[data-om-fashion="princess-anise"] {
  color-scheme: dark;
}

body.om2026 {
  caret-color: var(--om-accent, #BC8D1F);
  -webkit-tap-highlight-color: rgba(var(--om-accent-rgb, 188, 141, 31), 0.22);
  overscroll-behavior-y: none;
}

/* Selection — Arrowwood / Antique White pairing */
::selection {
  background: var(--om-accent, #BC8D1F);
  color: var(--om-on-accent, #111111);
}
::-moz-selection {
  background: var(--om-accent, #BC8D1F);
  color: var(--om-on-accent, #111111);
}

/* Scrollbars — Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--om-accent, #BC8D1F) var(--om-surface-2, #E4D9C4);
}

/* Scrollbars — WebKit */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--om-surface-2, #E4D9C4);
}
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--om-accent, #BC8D1F) 78%, var(--om-ink, #0B0B0C));
  border-radius: 999px;
  border: 2px solid var(--om-surface-2, #E4D9C4);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--om-accent, #BC8D1F);
}
*::-webkit-scrollbar-corner {
  background: var(--om-surface-2, #E4D9C4);
}

/* Touch: prefer pan/manipulation on interactive chrome */
a,
button,
.om-nav-toggle,
.om-nav__cta,
.om-btn,
[data-om-fashion-swatch],
.om-sound-toggle,
summary {
  touch-action: manipulation;
}

/* Form caret + autofill (Chrome / Safari / Edge) */
input,
textarea,
select,
[contenteditable="true"] {
  caret-color: var(--om-accent, #BC8D1F);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--om-ink, #0B0B0C) !important;
  caret-color: var(--om-accent, #BC8D1F);
  box-shadow: 0 0 0 1000px var(--om-surface, #F6F0E4) inset !important;
  transition: background-color 99999s ease-out;
}

/* Dark fashion look autofill */
html[data-om-fashion="princess-anise"] input:-webkit-autofill,
html[data-om-fashion="princess-anise"] textarea:-webkit-autofill,
html[data-om-fashion="princess-anise"] select:-webkit-autofill {
  -webkit-text-fill-color: var(--om-ink, #EEE5D3) !important;
  box-shadow: 0 0 0 1000px var(--om-surface, #0A5FAD) inset !important;
}

/* Print — basics: ink on white, hide chrome chrome */
@media print {
  html,
  body.om2026 {
    background: #fff !important;
    color: #000 !important;
    caret-color: #000;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }

  .om-header,
  .om-nav,
  .om-nav-toggle,
  .om-sound-toggle,
  .om-fashion,
  [data-om-fashion-picker],
  .om-color-underband,
  .om-spine,
  .screen-reader-text,
  .om-footer__sounds,
  audio,
  video:not([controls]) {
    display: none !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #444;
    word-break: break-all;
  }
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  .om-wrap,
  .om-wrap--wide,
  main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
