/* ==========================================================================
   Accessibility and consent — shared across the portfolio
   WCAG 2.1 Level AA remediation. In the live site these rules belong in the
   theme source, not in a standalone file. Site-specific colour
   corrections live in each site's own a11y/site.css.
   ========================================================================== */

/* 1. WCAG 2.4.7 Focus Visible
   Replaces the "enable focus indicator" opt-in link, which set a body class
   that no stylesheet on this site ever responded to. Focus is now visible for
   everyone by default, which is what the criterion requires.
   Two-tone ring: the white band carries the maroon header (7.8:1), the dark
   halo carries the white and cream sections (17.4:1 / 15.0:1). */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #1a1a1a;
  border-radius: 2px;
}
@supports not selector(:focus-visible) {
  a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
    outline: 3px solid #ffffff; outline-offset: 2px; box-shadow: 0 0 0 6px #1a1a1a;
  }
}

/* 4. Accessibility toolbar */
.a11y-bar { position: fixed; right: 0; bottom: 0; z-index: 9998; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.a11y-bar__toggle { display: flex; align-items: center; gap: .5em; background: #425563; color: #fff; border: 2px solid #fff; border-radius: 6px 0 0 0; padding: .7em 1.1em; margin: 0; font-size: 15px; font-weight: 600; cursor: pointer; line-height: 1; }
.a11y-bar__toggle:hover { background: #2f3f4b; }
/* On a phone the button is a 48px round gear so it hides almost nothing; the name stays for screen readers */
@media (max-width: 600px) {
  .a11y-bar__toggle { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; margin: 0 8px 8px 0; font-size: 22px; }
  .a11y-bar__toggle .a11y-bar__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .a11y-bar__panel { margin-right: 8px; border-radius: 6px; }
}
/* The panel carries its own text size and line height: some themes set font-size: 0 /
   line-height: 0 on the body and size every element in px, and the panel must not inherit that. */
.a11y-bar__panel { display: none; background: #fff; color: #1a1a1a; border: 2px solid #425563; border-radius: 6px 0 0 0; padding: 1em 1.1em; min-width: 260px; max-width: calc(100vw - 16px); font-size: 15px; line-height: 1.4; text-align: left; box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.a11y-bar__panel[data-open="true"] { display: block; }
.a11y-bar__panel h2 { font-size: 15px; line-height: 1.3; margin: 0 0 .7em; padding: 0; color: #1a1a1a; letter-spacing: 0; text-transform: none; font-weight: 600; position: static; }
.a11y-bar__opt { display: flex; align-items: center; gap: .6em; margin: 0 0 .55em; font-size: 14px; line-height: 1.4; }
.a11y-bar__opt label { font-size: 14px; line-height: 1.4; margin: 0; }
.a11y-bar__opt input { width: 17px; height: 17px; margin: 0; }
.a11y-bar__reset { margin-top: .6em; background: #f1eee8; color: #1a1a1a; border: 1px solid #8a8378; border-radius: 4px; padding: .45em .9em; font-size: 13px; cursor: pointer; }

/* Larger text is applied by a11y.js (largerText), element by element: most themes size text in px,
   which a percentage here never reached. Transitions pause while it reads the theme's sizes. */
html[data-a11y-measuring] * { transition: none !important; }
/* a long unbroken name (some copy joins words with non-breaking spaces) may wrap rather than run off a phone screen */
html[data-a11y-text="large"] body { overflow-wrap: break-word; }
html[data-a11y-contrast="high"] body { background: #fff; }
html[data-a11y-contrast="high"] body, html[data-a11y-contrast="high"] p,
html[data-a11y-contrast="high"] li, html[data-a11y-contrast="high"] h1,
html[data-a11y-contrast="high"] h2, html[data-a11y-contrast="high"] h3,
html[data-a11y-contrast="high"] figcaption { color: #14171a !important; }
html[data-a11y-contrast="high"] a:not(.a11y-bar__toggle) { color: #1f3c88 !important; }
html[data-a11y-links="underline"] main a,
html[data-a11y-links="underline"] footer a { text-decoration: underline !important; }
html[data-a11y-motion="reduce"] *, html[data-a11y-motion="reduce"] *::before, html[data-a11y-motion="reduce"] *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}
/* WCAG 2.3.3 — honour the visitor's own operating-system setting too */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* 5. Cookie consent notice */
.cc-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #fff; color: #1a1a1a; border-top: 3px solid #425563; padding: 1.15em 1.3em; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; box-shadow: 0 -4px 20px rgba(0,0,0,.18); }
.cc-banner[hidden] { display: none; }
@media (max-width: 480px) {
  .cc-banner { font-size: 14px; line-height: 1.4; padding: .85em 1em; }
  .cc-banner__inner { gap: .7em; }
}
.cc-banner__inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1em; align-items: center; justify-content: space-between; }
.cc-banner__text { flex: 1 1 380px; margin: 0; }
.cc-banner__text a { color: #1f3c88; text-decoration: underline; }
.cc-banner__actions { display: flex; flex-wrap: wrap; gap: .6em; }
.cc-btn { font: inherit; font-weight: 600; padding: .6em 1.15em; border-radius: 4px; cursor: pointer; border: 2px solid #425563; }
.cc-btn--accept { background: #425563; color: #fff; }
.cc-btn--reject { background: #fff; color: #1f2a31; }
.cc-btn--prefs { background: #fff; color: #1f2a31; border-style: dashed; }
.cc-btn:hover { filter: brightness(.94); }
.cc-prefs { margin: .9em auto 0; max-width: 1100px; border-top: 1px solid #d8d3ca; padding-top: .9em; }
.cc-prefs[hidden] { display: none; }
.cc-prefs__row { display: flex; gap: .7em; align-items: flex-start; margin-bottom: .7em; }
.cc-prefs__row input { width: 17px; height: 17px; margin-top: .2em; }
.cc-prefs__row label { font-size: 14px; }
.cc-prefs__row .cc-desc { display: block; color: #4a4a4a; font-size: 13px; margin-top: .15em; }
@media (max-width: 640px) { .cc-banner__actions { width: 100%; } .cc-btn { flex: 1 1 auto; } }

/* 6. Visually hidden page headings
   The gallery and contact pages carry no heading at all, so a screen reader
   user arrives with nothing to orient by (WCAG 1.3.1 / 2.4.6). These headings
   reach assistive technology without changing the visual design. */
.a11y-sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   7. Legal and accessibility pages
   <code> inherits the theme's pink (#db99a3), which is 2.3:1 on white and
   fails AA. These pages list cookie names in <code>, so they need a readable
   colour of their own.
   -------------------------------------------------------------------------- */
.legal code {
  color: #2f3f4b;
  background: #f1eee8;
  padding: .1em .35em;
  border-radius: 3px;
  font-size: .92em;
}

/* --------------------------------------------------------------------------
   9. Map fallback
   Shown only when the Google map fails to draw. Carries the same information
   the map was there to give: where the building is and how to get to it.
   -------------------------------------------------------------------------- */
.map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45em;
  padding: 1em 1.5em;
  background: #f1eee8;
  text-align: center;
}
.map-fallback__title {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #2f3f4b;
}
.map-fallback__address {
  margin: 0;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #2f3f4b;
  max-width: 22em;
}
.map-fallback__phone a { color: #2f3f4b; text-decoration: underline; }
.map-fallback__link {
  display: inline-block;
  margin-top: .3em;
  padding: .7em 1.4em;
  background: #425563;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 3px;
}
/* the sites' own a:hover / a:focus colours must not reach the white-on-slate button text */
.map-fallback__link:hover, .map-fallback__link:focus { background: #2f3f4b; color: #ffffff; }

/* The Do Not Sell page reports the visitor's Global Privacy Control status */
#gpc-status { background: #f1eee8; color: #1f2a31; padding: .9em 1.1em; border-left: 4px solid #425563; }
.cc-gpc { color: #1f3c88 !important; font-weight: 600; }

/* A menu control converted from <div> to <button> keeps the theme's look:
   strip only the browser's default button chrome, never borders the theme
   uses to draw the icon. */
button.a11y-was-div { background: none; padding: 0; font: inherit; -webkit-appearance: none; appearance: none; color: inherit; }

/* Bedrock theme: the menu control is a real <button> now. Strip the browser's
   default button chrome but keep the theme's border-top, which draws the top
   bar of the hamburger icon. Matches nothing on sites without #menu-burger. */
button#menu-burger {
  background: none; padding: 0;
  border-left: 0; border-right: 0; border-bottom: 0;
  font: inherit; -webkit-appearance: none; appearance: none;
}

/* Sound toggle (The Purser) is a real <button> now: no browser button chrome. */
button#audio-holder { text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }

/* Footer legal line, added on sites whose footer had no legal links. Inherits the footer's type. */
.a11y-legal-links { margin: .4em 0 0; font-size: .85em; }
.a11y-legal-links a { color: inherit; text-decoration: underline; }

/* Styled dropdown over a native <select> (The Line Lofts interest form): the select is
   visually hidden but focusable; the styled box shows the focus ring. */
.dropdown-select-group .hidden { display: block !important; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.a11y-select-focus .dropdown-ui { outline: 3px solid #fff; box-shadow: 0 0 0 6px #1a1a1a; }

/* Some themes set html { font-size: 0 } and size every element in px; the panels this
   file adds carry their own size so they never inherit zero. */
.map-fallback { font-size: 16px; line-height: 1.5; }

/* Phone-number fields with a country picker (react-phone-number-input): the real <select>
   is invisible over the flag, so the flag box shows the focus ring. */
.PhoneInputCountry:focus-within { outline: 3px solid #fff; box-shadow: 0 0 0 6px #1a1a1a; border-radius: 2px; }

/* Policy links added as their own row under a site's footer menu */
.a11y-legal-row { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .35em 1.4em; margin: .8em auto 1.2em; padding: 0 1em; font-size: 14px; line-height: 1.5; }
.a11y-legal-row a { color: inherit; text-decoration: underline; }

/* Clickable points on an illustrated map: keyboard focus shows as a dark ring around the pin */
[data-a11y-hotspot]:focus { outline: none; }
[data-a11y-hotspot]:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }
[data-a11y-hotspot]:focus-visible circle { stroke: #1a1a1a; stroke-width: 8px; }
#lookup-caption #close-caption:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }

/* Embedded frames can take keyboard focus; show where it is */
iframe:focus-visible, iframe:focus-within, iframe.a11y-frame-focus { outline: 3px solid #ffffff; outline-offset: 2px; box-shadow: 0 0 0 6px #1a1a1a; }

/* --------------------------------------------------------------------------
   10. Skip link (added by a11y.js only where the theme has none) and the
   notice on reference copies of pages the fix replaces */
.a11y-skip { position: absolute; left: -9999px; top: 0; z-index: 2147483000; background: #1a1a1a; color: #ffffff; padding: .75em 1.25em; font: 600 16px/1.3 system-ui, -apple-system, sans-serif; text-decoration: underline; }
.a11y-skip:focus { left: 8px; top: 8px; outline: 3px solid #ffffff; outline-offset: 2px; box-shadow: 0 0 0 6px #1a1a1a; }
.a11y-skip-target:focus { outline: none; }
.a11y-prev-note { background: #fff3cd; color: #1a1a1a; border-bottom: 2px solid #b58100; padding: .8em 1.25em; font: 16px/1.5 system-ui, -apple-system, sans-serif; position: relative; z-index: 2147482000; }
.a11y-prev-note a { color: #1f3c88; text-decoration: underline; }

/* --------------------------------------------------------------------------
   11. Text versions of clippings and flyers that are pictures (The Line Lofts) */
.a11y-press-text { max-width: 960px; margin: 2.5em auto 3em; padding: 0 1.5em; font-size: 16px; line-height: 1.6; color: #1a1a1a; }
.a11y-press-text h2 { font-size: 1.4em; margin: 0 0 .5em; }
.a11y-press-text ul { padding-left: 1.2em; }
.a11y-press-text li { margin-bottom: .8em; }
.a11y-press-text a { color: #1f3c88; text-decoration: underline; }
.a11y-press-text .a11y-press-by { color: #4a4a4a; }

/* --------------------------------------------------------------------------
   12. Gallery "View Thumbnails" button sat as white text straight on the photo
   (Dahlia, Elizabeth, Villa Rebecca, Sofia): measured 1.5:1 to 1.9:1 against the
   pictures behind it. A dark backing keeps it readable on any photo. */
#view-thumbnails { background: rgba(26, 26, 26, .85) !important; color: #ffffff !important; padding: 0 .7em !important; border-radius: 2px; }
/* no taller than the live button (extra height grew the row upward over the slide dots), and the row
   around it never takes the clicks meant for the dots just above it */
.counter-holder { pointer-events: none; }
.counter-holder a, .counter-holder button, #view-thumbnails { pointer-events: auto; }
.a11y-press-text .a11y-press-item { border-top: 1px solid #cfc9c0; padding-top: 1em; margin-top: 1.4em; }
.a11y-press-text h3 { font-size: 1.1em; margin: 0 0 .3em; color: #1a1a1a; }
.a11y-press-text p { margin: 0 0 .7em; }
.a11y-press-text .a11y-press-photo, .a11y-press-text .a11y-press-end { color: #4a4a4a; }

/* Pause / play button on slideshows that move by themselves (WCAG 2.2.2) */
.a11y-slide-toggle { position: absolute; left: 12px; bottom: 12px; z-index: 30; width: 44px; height: 44px; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 50%;
  background: rgba(20, 20, 20, .82); color: #fff; font: 700 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -2px; cursor: pointer; }
.a11y-slide-toggle[data-paused="true"] { letter-spacing: 0; padding-left: 3px; }
.a11y-slide-toggle:hover { background: #141414; }
.a11y-slide-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 7px #141414; }
