/*
 * Owner staging review + visual browser audit, 2026-11-04. Loaded after style.css (functions.php), in its own file so it
 * merges cleanly with the open widescreen (#18) and related-images (#19/#20) branches, which both edit style.css. Fold it into
 * style.css when those have landed. Fixes only: tokens, fonts and layout redesign are a separate work order.
 */

/* ---- Form controls: theme font and colours, never the browser's Arial on white ---- */
input, select, textarea, button{ font-family:inherit; }
input:where(:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=range]):not([type=color])),
select, textarea{
  background-color:var(--wp--preset--color--surface);
  color:var(--wp--preset--color--contrast);
  border:1px solid color-mix(in srgb, var(--wp--preset--color--dim) 55%, transparent);
}
/* WooCommerce block checkout paints its fields white; the floating label inherited the cream text (about 1.2:1 on white). */
.wc-block-components-text-input input, .wc-block-components-text-input textarea,
.wc-block-components-textarea, .wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{
  background-color:var(--wp--preset--color--surface) !important;
  color:var(--wp--preset--color--contrast) !important;
  border-color:color-mix(in srgb, var(--wp--preset--color--dim) 55%, transparent);
  font-family:inherit;
}
/* WooCommerce's invalid-field state stays visible (a red that reads on the dark surface). */
.wc-block-components-text-input.has-error input, .wc-block-components-text-input.has-error textarea,
.wc-blocks-components-select.has-error .wc-blocks-components-select__select,
.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input{
  border-color:#E5675C !important;
}
.wc-block-components-text-input.has-error label, .wc-block-components-validation-error{ color:#E5675C !important; }
.wc-block-components-text-input label, .wc-blocks-components-select .wc-blocks-components-select__label,
.wc-block-components-combobox .wc-block-components-combobox-control label{
  color:var(--wp--preset--color--dim) !important; /* #8E9186 on #141813: about 5.9:1 */
}
/* The amber focus ring on every control (selects and inputs showed a near-black ring on dark green). */
:where(select, input, textarea):focus-visible,
.wc-block-components-text-input input:focus, .wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wc-block-components-combobox .wc-block-components-combobox-control input:focus{
  outline:2px solid var(--wp--preset--color--accent) !important;
  outline-offset:2px;
}

/* ---- Print tables: a size a file cannot fill is information, not an error ---- */
.eb-print-table__unavailable th{ text-decoration:none; }
.eb-print-table__na{ font-style:normal; }

/* ---- Photograph page: the whole photograph on screen; the title never breaks mid-word ---- */
.eb-photo__plate .eb-photo__image{ margin:0; }
.eb-photo__plate .eb-photo__image img{
  width:auto; max-width:100%; height:auto;
  max-height:calc(100vh - 7rem); max-height:calc(100svh - 7rem); /* the header */
  object-fit:contain; margin-inline:auto; display:block;
}
.eb-photo__meta h1.wp-block-post-title{
  font-size:clamp(1.7rem, 1.1rem + 2vw, 2.6rem);
  overflow-wrap:normal; word-break:normal; hyphens:auto;
}
/* /photographs/ title overflowed a 360px screen by 13px. */
.post-type-archive-eb_photo main h1.has-display-font-size{ font-size:clamp(2.2rem, 11vw, 7rem); overflow-wrap:normal; hyphens:auto; }

/* ---- /photographs/: the title under each thumbnail ---- */
.eb-plate__title{ margin-block:.5rem 0; font-size:var(--wp--preset--font-size--small); font-family:var(--wp--preset--font-family--body); font-weight:500; }
.eb-plate__title a{ text-decoration:none; color:var(--wp--preset--color--contrast); }
.eb-plate__title a:hover, .eb-plate__title a:focus-visible{ color:var(--wp--preset--color--accent); }

/* ---- Prose: about 70 characters a line (it was about 100) ---- */
.wp-block-post-content.is-layout-constrained > :where(p, ul, ol, blockquote, h2, h3, h4){ max-width:min(var(--wp--style--global--content-size, 760px), 70ch); }

/* ---- /prints/sizes/: every bar starts at the same x ---- */
.eb-size-chart__label{ flex:0 0 5.2rem; }

/* ---- Collection hero ---- */
/* The title sat about 25px outside the page gutter: the cover's own 1em padding instead of the root padding the content uses. */
.wp-block-cover.eb-collection__hero{
  padding-left:var(--wp--style--root--padding-left, 1em);
  padding-right:var(--wp--style--root--padding-right, 1em);
}
/* Most of these are birds and animals shot head-high: keep the upper part when the cover crops (a turkey lost its head). */
.eb-collection__hero .wp-block-cover__image-background{ object-position:50% 30%; }
/* Ultrawide: the hero upscaled 1.3-2x with a dark band; stop at 2560 and centre it. */
@media (min-width:2561px){
  .wp-block-cover.eb-collection__hero{ max-width:2560px; margin-left:auto !important; margin-right:auto !important; }
}

/* ---- Header: the cart stays on row 1; the hamburger takes over below 900px (the cart wrapped at 768) ---- */
header .eb-minicart .wc-block-mini-cart__button{ min-width:44px; min-height:44px; display:flex; align-items:center; justify-content:center; }
header .eb-minicart .wc-block-mini-cart__icon{ width:28px; height:28px; }
@media (min-width:600px) and (max-width:899.98px){
  header .wp-block-group.alignwide{ flex-wrap:nowrap; align-items:center; }
  header .eb-minicart{ order:2; margin-left:auto; }
  header .wp-block-navigation{ order:3; }
  header .wp-block-navigation__responsive-container-open:not(.always-shown){ display:flex; min-width:44px; min-height:44px; align-items:center; justify-content:center; }
  header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){ display:none; }
}

/* ---- Footer: no dangling separator when the links wrap; the policy row ---- */
.eb-footer__policy{ flex-basis:100%; }
@media (max-width:600px){
  footer .eb-links{ display:flex; flex-wrap:wrap; column-gap:1.1rem; }
  footer .eb-links .eb-sep{ display:none; }
}

/* ---- Cart and checkout: the whole photograph, not a square crop (functions.php serves an uncropped image) ---- */
.wc-block-cart-item__image img, .wc-block-components-order-summary-item__image img{ aspect-ratio:auto; height:auto; object-fit:contain; }

/* ---- The closed mini-cart drawer sits just off the right edge (WooCommerce parks it at inset-inline-start:100%), which made
   the page scroll sideways (+15px at 820x1180). clip, not hidden: no scroll container, so sticky and the drawer's own
   slide-in/out (it is position:fixed inside the viewport when open) are untouched. The closed drawer is also hidden from
   view and from assistive tech once its fade-out has finished. ---- */
html, body{ overflow-x:clip; }
.wc-block-components-drawer__screen-overlay--is-hidden{ visibility:hidden; transition:opacity .3s, visibility 0s linear .3s; }
