/*
 * Sitting Room Gallery: component rules that theme.json cannot express.
 * Every colour, size and weight here is a theme.json preset or a value from
 * design/portal-reference/design-tokens.json (store.moma.org live read, 2026-10-07).
 */

/* ---------- links: the gallery's own signal is the underline colour ---------- */
.wp-site-blocks a:not(.wp-element-button):not(.wp-block-site-title a):not(.wp-block-navigation-item__content) {
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 3px;
}
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 6px;
}

/* ---------- buttons: filled primary from theme.json; outline = MoMA's .btn--primary; on dark = .btn--secondary ---------- */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 2px solid var(--wp--preset--color--ink);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--canvas);
}
.wp-block-button.srg-on-dark .wp-block-button__link {
	color: var(--wp--preset--color--canvas);
	border-color: var(--wp--preset--color--canvas);
}
.wp-block-button.srg-on-dark .wp-block-button__link:hover,
.wp-block-button.srg-on-dark .wp-block-button__link:focus {
	background: var(--wp--preset--color--canvas);
	color: var(--wp--preset--color--ink);
}
.wp-element-button:disabled,
.wp-block-button__link:disabled,
.wc-block-components-button:disabled {
	opacity: .75;
	cursor: not-allowed;
}
.wp-element-button:focus-visible,
a:focus-visible,
button:focus-visible {
	outline: .2rem solid var(--wp--preset--color--ink);
	outline-offset: 2px;
}

/* ---------- type: display section titles at weight 200 (regular until the face is licensed) ---------- */
.srg-display-light,
h2.srg-display-light {
	font-weight: 200;
	line-height: 1.2;
}
.wp-block-post-title a {
	text-decoration: none;
}

/* ---------- top banner (store: black, 12px, links in the display face at 600) ---------- */
.srg-top-banner p {
	margin: 0;
	font-weight: 200;
	line-height: 1.15;
}
.srg-top-banner a {
	color: var(--wp--preset--color--canvas);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.srg-top-banner a:hover {
	text-decoration: underline;
	color: var(--wp--preset--color--canvas);
}

/* ---------- header ---------- */
.srg-header {
	position: sticky;
	top: 0;
	z-index: 20;
}
.srg-tools {
	align-items: center;
}
.srg-tools .wc-block-mini-cart__button,
.srg-tools .wc-block-customer-account__account-link {
	color: var(--wp--preset--color--ink);
	font-weight: 400;
}
.wc-block-mini-cart__badge {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--canvas);
	border: 0;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

/* ---------- the work grid (store product card: no border, no radius, no shadow; title 16/18.4; price 14/22) ---------- */
.srg-works .wp-block-post-template {
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
}
.srg-works .wp-block-post {
	position: relative;
	display: grid;
	gap: 10px;
	min-width: 0;
}
.srg-works .wp-block-post-featured-image {
	background: var(--wp--preset--color--surface-2);
	margin: 0;
}
.srg-works .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.srg-works .wp-block-post-title {
	margin: 0;
}
.srg-works .wp-block-woocommerce-product-price,
.srg-works .wc-block-components-product-price {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.571;
}
.srg-works .wc-block-components-product-price del {
	color: var(--wp--preset--color--muted);
	margin-right: 6px;
}
.srg-works .wc-block-components-product-price ins {
	text-decoration: none;
	color: var(--wp--preset--color--sale);
}
@media (max-width: 1023px) { .srg-works .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 767px)  { .srg-works .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 420px)  { .srg-works .wp-block-post-template.is-layout-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- badges (store: the display face 11px uppercase, colour by kind, no background) ---------- */
.srg-badge,
.is-style-badge,
.wc-block-components-product-sale-badge,
.wc-block-grid__product-onsale,
.onsale {
	display: inline-block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 11px;
	line-height: 12.65px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: uppercase;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	color: var(--wp--preset--color--ink);
}
.srg-works .srg-badge {
	order: 10;
}
.srg-badge--new { color: var(--wp--preset--color--badge-new); }
.srg-badge--sold,
.wc-block-components-product-sale-badge,
.wc-block-grid__product-onsale,
.onsale { color: var(--wp--preset--color--sale); position: static; }

/* ---------- forms and WooCommerce inputs (store .input: 1px #464545, 15px sides; 16px type) ---------- */
.wp-block-search__input,
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-select select,
.wc-block-components-form input[type="text"],
.wc-block-components-form input[type="email"],
.wc-block-components-form input[type="tel"],
.woocommerce .input-text,
.woocommerce select,
.wc-block-components-quantity-selector input {
	border: 1px solid var(--wp--preset--color--ink-2);
	color: var(--wp--preset--color--ink-2);
	border-radius: 0;
	background: transparent;
	padding: 16px 15px;
	font-size: 16px;
	line-height: 1.15;
	box-shadow: none;
}
.wc-block-components-text-input label,
.wc-block-components-select label,
.wc-block-components-form label {
	color: var(--wp--preset--color--ink);
}
.wc-block-components-text-input.has-error input,
.wc-block-components-validation-error,
.woocommerce-error {
	color: var(--wp--preset--color--error);
	border-color: var(--wp--preset--color--error);
}
.wc-block-components-text-input input:focus,
.wc-block-components-text-input textarea:focus,
.wp-block-search__input:focus,
.woocommerce .input-text:focus {
	outline: 0;
	box-shadow: rgb(94, 158, 214) 0px 0px 8px;
}
.wp-block-search__button,
.wc-block-components-button,
.woocommerce button.button,
.woocommerce a.button,
.single_add_to_cart_button {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--canvas);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	min-height: 48px;
	padding: 14px 20px;
	text-transform: none;
	box-shadow: none;
}
.wp-block-search__button:hover,
.wc-block-components-button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.single_add_to_cart_button:hover {
	background: var(--wp--preset--color--canvas);
	color: var(--wp--preset--color--ink);
}
.wc-block-components-button.outlined,
.wc-block-components-button.contained.is-secondary {
	background: transparent;
	color: var(--wp--preset--color--ink);
}

/* ---------- product page (store: title display 30/36, price 18, option chips square, details tabs 14/500) ---------- */
.srg-product .wp-block-post-title,
.srg-product h1.wp-block-post-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--heading-lg);
	line-height: 36px;
	font-weight: 400;
}
.srg-product .wp-block-woocommerce-product-price,
.srg-product .wc-block-components-product-price {
	font-size: var(--wp--preset--font-size--heading-sm);
	line-height: 1;
}
.srg-product .wc-block-add-to-cart-form .quantity .input-text,
.srg-product .wc-block-components-quantity-selector {
	min-height: 48px;
}
.srg-product .single_add_to_cart_button,
.srg-product .wc-block-components-product-button .wp-block-button__link {
	width: 100%;
	min-height: 48px;
}
.srg-product .wc-block-components-product-details summary,
.srg-product .wc-block-components-accordion-item summary,
.srg-product details > summary {
	font-size: 14px;
	line-height: 16px;
	font-weight: 500;
	padding: 14px 0;
	border-bottom: 1px solid var(--wp--preset--color--divider);
	cursor: pointer;
}
.srg-product .wc-block-components-product-details,
.srg-product details > :not(summary) {
	color: var(--wp--preset--color--muted);
	font-size: 14px;
	line-height: 22px;
}
.srg-product .wc-block-components-product-image-gallery .wc-block-product-gallery-large-image img {
	background: var(--wp--preset--color--surface-2);
}
.srg-product .variations .swatch,
.srg-product .wc-block-components-chip {
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-size: 14px;
	line-height: 18px;
	min-height: 36px;
	padding: 0 12px;
}
.srg-product .wc-block-components-chip.is-active,
.srg-product .wc-block-components-chip[aria-pressed="true"] {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--canvas);
}
.srg-product .srg-specs td:first-child {
	color: var(--wp--preset--color--muted);
}
/* related products: cards, not CTAs; their add-to-cart buttons are outline so the page keeps one filled button */
.srg-product .related .button,
.srg-product .wc-block-grid__product-add-to-cart .wp-block-button__link,
.srg-product .wp-block-woocommerce-product-button .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
}
.srg-product .related .button:hover,
.srg-product .wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--canvas);
}
.srg-product .related h2 {
	font-size: var(--wp--preset--font-size--heading-lg);
}
.srg-product .related .woocommerce-loop-product__title {
	font-size: var(--wp--preset--font-size--body);
	font-weight: 400;
	text-align: left;
}

/* ---------- spec tables (Visit, product details): two columns, muted keys, no borders ---------- */
.srg-specs table {
	border-collapse: collapse;
	width: auto;
}
.srg-specs td {
	border: 0;
	padding: 3px 24px 3px 0;
	text-align: left;
	font-size: 14px;
	line-height: 22px;
	vertical-align: top;
}
.srg-specs td:first-child {
	color: var(--wp--preset--color--muted);
}

/* ---------- cart and checkout (store cart summary: 1px #d4d4d4 box, 14px totals, 16px/500 estimated total) ---------- */
.wc-block-components-sidebar .wc-block-components-totals-wrapper,
.wc-block-cart__sidebar .wc-block-components-totals-wrapper {
	border-color: var(--wp--preset--color--divider);
}
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	border: 1px solid var(--wp--preset--color--divider);
	padding: 20px;
	font-size: 14px;
	line-height: 22px;
}
.wc-block-components-totals-item,
.wc-block-components-totals-footer-item {
	font-size: 14px;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.15;
}
.wc-block-cart-items__header,
.wc-block-cart-item__product .wc-block-components-product-name {
	font-weight: 400;
}
.wc-block-cart-items .wc-block-cart-item__image img {
	border-radius: 0;
	background: var(--wp--preset--color--surface-2);
}
.wc-block-components-checkout-step__title,
.wc-block-components-title {
	font-weight: 400;
	font-family: var(--wp--preset--font-family--display);
}
.wc-block-components-radio-control__option,
.wc-block-components-checkbox {
	border-color: var(--wp--preset--color--divider);
}
.wc-block-components-radio-control .wc-block-components-radio-control__input:checked {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
}
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
}
.wc-block-components-order-summary__button-text,
.wc-block-components-panel__button {
	font-weight: 500;
}
.wc-block-components-notice-banner {
	border-radius: 0;
	box-shadow: none;
}
.wc-block-components-notice-banner.is-error {
	border-color: var(--wp--preset--color--error);
	color: var(--wp--preset--color--error);
}

/* ---------- footer (store: #ededed, 18px/20.7px headings, 16px/26px links) ---------- */
.srg-footer h4 {
	margin-bottom: 10px;
}
.srg-footer p {
	line-height: 26px;
}
.srg-footer a {
	text-decoration: none;
}
.srg-footer a:hover {
	text-decoration: underline;
}
.srg-footer .wp-block-separator {
	border-color: var(--wp--preset--color--divider);
	margin: var(--wp--preset--spacing--30) 0 var(--wp--preset--spacing--20);
}

/* ---------- raised panels (store mini-cart: 1px #e5e5e5 + the one shadow) ---------- */
.wc-block-mini-cart__drawer,
.wc-block-components-drawer {
	border-left: 1px solid var(--wp--preset--color--divider-drawer);
	box-shadow: var(--wp--preset--shadow--drawer);
	border-radius: 0;
}

/* ---------- motion (store: .3s on controls, .4s ease-in-out on chrome), only when allowed ---------- */
@media (prefers-reduced-motion: no-preference) {
	.wp-element-button,
	.wp-block-button__link,
	.wc-block-components-button,
	.wc-block-components-chip,
	a {
		transition: background-color .3s, color .3s, border-color .3s, text-decoration-color .3s;
	}
	.srg-header {
		transition: padding .4s ease-in-out;
	}
	html {
		scroll-behavior: smooth;
	}
}

/* ---------- screen-reader helper ---------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
