/* Shared light selection cues: one 1px neutral line, no extra surface or stacked rings. */
:root {
  --konic-selection-ink: #8a8279;
  --konic-focus-color: #8a8279;
}

/* Keyboard focus is distinct from validation; keep the same cue on both sites. */
html :focus-visible:not(:is([aria-invalid="true"], .is-invalid, .error)) {
  outline: 1px solid var(--konic-focus-color) !important;
  outline-offset: 2px;
}
html :where(.konic-source-footer, .x-search-page, .finder, #mounts, .hero, .hero-slider) {
  --konic-focus-color: #c5bfb6;
}
html :is(.finder-panel, .finder-modal, .modal-search, .search-box, .category-dock, .v31-calendar, .konic-source-footer.is-office) {
  --konic-focus-color: #8a8279;
}
/* Entry choices sit directly on photography. */
html:not([data-konic-context]) :is(.choice, .brand):focus-visible {
  outline-color: #fff !important;
}

/* Input frames change only their line colour; avoid an additional halo. */
html :is(.search-head, .x-field, .x-search-tools, .x-search-page, .download-tools) :is(input, textarea, select):focus:not([aria-invalid="true"]):not(.is-invalid):not(.error) {
  border-color: var(--konic-focus-color) !important;
  box-shadow: none !important;
  outline: none !important;
}
html[data-konic-context="home"] .field:focus-within {
  border-color: var(--konic-selection-ink) !important;
  box-shadow: none !important;
}
/* Home forms have one outer field frame; Office search has one underline. */
html[data-konic-context="home"] .field :is(input, textarea, select):focus {
  outline: none !important;
  box-shadow: none !important;
}
html :is(.search-modal, .retailer-modal) > label {
  border-bottom: 1px solid #d5d0ca !important;
  box-shadow: none !important;
}
html :is(.search-modal, .retailer-modal) > label:focus-within {
  border-color: var(--konic-selection-ink) !important;
  box-shadow: none !important;
}
html :is(.search-modal, .retailer-modal) input:focus {
  outline: none !important;
  box-shadow: none !important;
}
html .finder-fields label:focus-within {
  border-color: var(--konic-selection-ink) !important;
  box-shadow: none !important;
}
html .finder-fields select:focus {
  outline: none !important;
}
html :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--konic-selection-ink);
}

/* One fine edge distinguishes the selected image; preserve the original surface. */
html[data-konic-context] :is(.konic-source-product__thumb, .x-product-thumb):is(.is-active, [aria-selected="true"], [aria-pressed="true"]) {
  border-color: var(--konic-selection-ink) !important;
  box-shadow: none !important;
}
html[data-konic-context] :is(.konic-source-product__thumb, .x-product-thumb):hover:not(.is-active):not([aria-selected="true"]):not([aria-pressed="true"]) {
  border-color: #b9b2a9 !important;
}
html[data-konic-context] :is(.konic-source-product__thumb, .x-product-thumb):focus-visible {
  border-color: var(--konic-selection-ink) !important;
  outline: none !important;
}

/* Remove red hover frames while retaining each card's existing lift and shadow. */
html .stockist-card:hover {
  border-color: #b9b2a9 !important;
}
html[data-konic-context="office"] .office-mega-category-card:is(:hover, :focus-visible, .is-konic-hovered),
html[data-konic-context="office"] .site-header .mega-menu .mega-links .office-mega-category-card:is(:hover, :focus-visible, .is-konic-hovered),
html[data-konic-context="office"] .site-header .mega-menu[data-konic-category="products"] .office-mega-category-card:is(:hover, :focus-visible, .is-konic-hovered) {
  border-color: #b9b2a9 !important;
}
html .konic-all-products-entry:focus-visible {
  box-shadow: none !important;
}

/* Date and attachment controls follow the same neutral selection language. */
html .v31-file-control:focus-within {
  border-color: var(--konic-selection-ink) !important;
  outline: none !important;
  box-shadow: none !important;
}
html .v31-date-trigger:focus-visible {
  outline: 1px solid var(--konic-selection-ink) !important;
  outline-offset: -3px;
}
html[data-konic-context="home"] .field .v31-date-trigger:focus-visible {
  outline: none !important;
}
html .v31-calendar :is(button, select):focus-visible {
  border-color: var(--konic-selection-ink) !important;
  outline: none !important;
}
html .v31-calendar .v31-calendar-days button[aria-current="date"] {
  border-color: var(--konic-selection-ink) !important;
}
html .v31-calendar .v31-calendar-days button[aria-pressed="true"] {
  border-color: var(--konic-selection-ink) !important;
  background: #f0ede8 !important;
  color: #514b44 !important;
  font-weight: 600;
}

/* Red remains reserved for an actual invalid field, not ordinary focus. */
html :is(input, select, textarea):is([aria-invalid="true"], .is-invalid, .error),
html[data-konic-context="home"] .field:has([aria-invalid="true"], .is-invalid, .error) {
  border-color: #c62828 !important;
}
html :is(input, select, textarea):is([aria-invalid="true"], .is-invalid, .error):focus,
html[data-konic-context="home"] .field:has([aria-invalid="true"], .is-invalid, .error):focus-within {
  box-shadow: none !important;
  outline-color: #c62828 !important;
}
@media (forced-colors: active) {
  html :focus-visible { outline-color: Highlight !important; }
  html[data-konic-context] :is(.konic-source-product__thumb, .x-product-thumb).is-active {
    outline: 2px solid Highlight !important;
    outline-offset: -2px;
  }
}
