/*
Theme Name: Anti Photography System
Description: Independent Monument presentation layer for Anti Photography Studio and native WooCommerce.
Version: 1.0.1
Author: Anti Soosaar
Text Domain: anti-photography-system
Requires at least: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
*/

/* APS documents own their styles; these rules complete native Woo templates. */
body.aps-system-theme { margin: 0; }
body.aps-system-theme *, body.aps-system-theme *::before, body.aps-system-theme *::after { box-sizing: border-box; }
body.aps-system-theme .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce:has(> .woocommerce-cart-form) {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 32px; align-items: start;
}
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce:has(> .woocommerce-cart-form)::before,
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce:has(> .woocommerce-cart-form)::after { display: none; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce:has(> .woocommerce-cart-form) > :not(.woocommerce-cart-form):not(.cart-collaterals) { grid-column: 1 / -1; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-cart-form,
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .cart-collaterals,
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .cart-collaterals .cart_totals { float: none; width: 100%; min-width: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .cart_totals h2 { margin-top: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-cart-form .coupon {
  display: flex; gap: 12px; flex-wrap: wrap; float: none; width: 100%; margin-bottom: 16px;
}
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-cart-form .coupon input.input-text { float: none; width: auto; min-width: 0; flex: 1 1 160px; margin: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-cart-form .coupon button { flex: 1 1 160px; margin: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content form.checkout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1fr); column-gap: 48px; align-items: start;
}
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; width: 100%; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content form.checkout #order_review_heading { grid-column: 2; margin-top: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content form.checkout #order_review { grid-column: 2; min-width: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content form.checkout > :not(#customer_details):not(#order_review):not(#order_review_heading) { grid-column: 1 / -1; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content #customer_details > .col-1,
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content #customer_details > .col-2 { float: none; width: 100%; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content #payment .place-order { padding: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-checkout-payment ul { list-style: none; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce a.remove { color: var(--monument-white) !important; background: transparent; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce a.remove:hover { color: var(--monument-black) !important; background: var(--monument-white); }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce form.checkout h3 { font-size: 24px; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-NoticeGroup { min-width: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-NoticeGroup ul { margin: 0 0 24px; list-style: none; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce form.checkout .form-row label .required { text-decoration: none; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce .wc-proceed-to-checkout a.checkout-button { font-size: 15px; letter-spacing: 0; width: 100%; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce ul.order_details { display: flex; gap: 24px; flex-wrap: wrap; padding: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce ul.order_details li { float: none; margin: 0; }
body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce ul.order_details strong { font-size: 16px; }

/* Native fallback is for WordPress pages not claimed by the Studio renderer. */
body.aps-system-native { background: #050505; color: #f2f1eb; font: 16px/1.6 Arial, sans-serif; }
.aps-system-native a { color: inherit; text-underline-offset: 4px; }
.aps-system-native img { max-width: 100%; height: auto; }
.aps-system-native :focus-visible { outline: 2px solid #f2f1eb; outline-offset: 5px; }
.aps-system-skip { position: fixed; top: -100px; left: 20px; z-index: 999999; padding: 12px; background: #f2f1eb; color: #050505 !important; }
.aps-system-skip:focus { top: 12px; }
.aps-system-header, .aps-system-footer { padding: 28px 32px; border-bottom: 1px solid #333; display: flex; gap: 32px; align-items: center; justify-content: space-between; }
.aps-system-brand { display: inline-flex; width: 190px; flex-shrink: 0; }
.aps-system-header nav, .aps-system-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.aps-system-header nav a, .aps-system-footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.aps-system-content { max-width: 1200px; padding: 48px 32px 80px; margin: auto; min-height: 55vh; }
.aps-system-content h1 { font-size: 40px; line-height: 1.2; overflow-wrap: anywhere; }
.aps-system-content h2 { font-size: 28px; }
.aps-system-content article + article { margin-top: 40px; }
.aps-system-footer { border-top: 1px solid #333; border-bottom: 0; flex-wrap: wrap; }
@media (max-width: 900px) {
  body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce:has(> .woocommerce-cart-form),
  body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content form.checkout { display: block; }
  body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .cart-collaterals,
  body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content form.checkout #order_review_heading { margin-top: 36px; }
}
@media (max-width: 600px) {
  .aps-system-header, .aps-system-footer { padding: 20px; align-items: flex-start; flex-direction: column; gap: 20px; }
  .aps-system-content { padding: 32px 20px 60px; }
  .aps-system-content h1 { font-size: 30px; }
  body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce form.checkout h3 { font-size: 21px; }
  body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content .woocommerce-cart-form .coupon button { width: 100%; }
  body.aps-system-theme.aps-commerce-transaction .aps-shop-commerce-content table.cart tr.cart_item td { text-align: left !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.aps-system-theme *, body.aps-system-theme *::before, body.aps-system-theme *::after { scroll-behavior: auto !important; }
}
