/*
 * Oasis detail system
 * Final, shared precision layer for public pages and WooCommerce surfaces.
 */

:root {
  --ol-control-height: 48px;
  --ol-touch-target: 44px;
  --ol-radius-panel: var(--ol-radius-lg);
  --ol-radius-field: var(--ol-radius-control);
  --ol-focus-ring: 0 0 0 3px color-mix(in oklab, var(--ol-forest-700) 24%, transparent);
}

body.oasis-redesign *,
body.oasis-redesign *::before,
body.oasis-redesign *::after {
  box-sizing: border-box;
}

body.oasis-redesign :is(main, section, article, aside, form, fieldset, table, ul.products) {
  min-width: 0;
}

body.oasis-redesign :is(img, svg, video, iframe) {
  max-width: 100%;
}

/* Body type owns every utility-sized control. Cormorant remains display-only. */
body.oasis-redesign :is(
  button,
  input,
  select,
  textarea,
  label,
  legend,
  .button,
  .ol-btn,
  .ol-page-eyebrow,
  .ol-section-kicker,
  .ol-stock-pill,
  .onsale,
  [class*="badge"],
  [class*="pill"]
) {
  font-family: var(--ol-font-body) !important;
}

body.oasis-redesign :is(.ol-account-page, .ol-cart-shell, .ol-checkout-shell, .ol-registration-gate__account) :is(h2, h3),
body.oasis-redesign .ol-faq-item summary,
body.oasis-redesign :is(.ol-coa-shell, .ol-coa-library) :is(.oasis-library-product-name, .oasis-lot-number) {
  font-family: var(--ol-font-body) !important;
}

/* True actions share the 48px/10px button silhouette; filters remain pills. */
body.oasis-redesign .ol-btn,
body.oasis-redesign:not(.home) main .button,
body.oasis-redesign:not(.home) main input[type="submit"],
body.oasis-redesign:not(.home) .wc-block-components-button {
  min-height: var(--ol-control-height);
  border-radius: var(--ol-radius-control) !important;
}

/* Shared fields: one height, one curve, one focus language. */
body.oasis-redesign :is(
  .ol-contact-page,
  .ol-account-page,
  .ol-cart-shell,
  .ol-checkout-shell,
  .ol-registration-gate__account,
  .woocommerce-Reviews
) :is(input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="url"], select),
body.oasis-redesign :is(.ol-contact-page, .ol-account-page, .ol-checkout-shell, .ol-registration-gate__account) .select2-selection--single {
  width: 100%;
  min-height: var(--ol-control-height) !important;
  padding: .72rem .9rem !important;
  border: 1px solid color-mix(in oklab, var(--ol-forest-900) 17%, transparent) !important;
  border-radius: var(--ol-radius-field) !important;
  background: color-mix(in oklab, var(--ol-cream-50) 95%, white) !important;
  color: var(--ol-ink-900) !important;
  font-size: .95rem !important;
  line-height: 1.25 !important;
  box-shadow: none !important;
}

body.oasis-redesign :is(
  .ol-contact-page,
  .ol-account-page,
  .ol-checkout-shell,
  .ol-registration-gate__account,
  .woocommerce-Reviews
) textarea {
  width: 100%;
  min-height: 9rem;
  padding: .8rem .9rem !important;
  border: 1px solid color-mix(in oklab, var(--ol-forest-900) 17%, transparent) !important;
  border-radius: var(--ol-radius-field) !important;
  background: color-mix(in oklab, var(--ol-cream-50) 95%, white) !important;
  color: var(--ol-ink-900) !important;
  font: .95rem/1.55 var(--ol-font-body) !important;
  resize: vertical;
}

body.oasis-redesign :is(input, select, textarea, button, a, summary):focus-visible {
  outline: 3px solid color-mix(in oklab, var(--ol-forest-700) 32%, transparent) !important;
  outline-offset: 3px !important;
}

body.oasis-redesign :is(input, select, textarea):focus {
  border-color: var(--ol-forest-700) !important;
  outline: 0 !important;
  box-shadow: var(--ol-focus-ring) !important;
}

/* Panel geometry: outer 20px, nested controls 10px. */
body.oasis-redesign :is(
  .ol-info-card,
  .ol-about-process__step,
  .ol-about-why__card,
  .ol-coa-finds__card,
  .ol-faq-item,
  .ol-contact-form,
  .woocommerce-cart-form,
  .cart_totals,
  .woocommerce-checkout-review-order,
  .woocommerce-MyAccount-navigation,
  .woocommerce-MyAccount-content,
  .woocommerce-form-login,
  .woocommerce-form-register,
  .ol-registration-gate__account,
  .error-404 .ol-info-card
) {
  border-radius: var(--ol-radius-panel) !important;
}

body.oasis-redesign :is(
  .ol-info-card,
  .ol-about-process__step,
  .ol-about-why__card,
  .ol-coa-finds__card,
  .ol-faq-item,
  .ol-contact-form,
  .woocommerce-cart-form,
  .cart_totals,
  .woocommerce-checkout-review-order,
  .woocommerce-MyAccount-navigation,
  .woocommerce-MyAccount-content
) :is(input, select, textarea, .button, button) {
  border-radius: var(--ol-radius-field);
}

body.oasis-redesign .ol-registration-gate__account :is(.woocommerce-form-login, .woocommerce-form-register) {
  border-radius: var(--ol-radius-control) !important;
}

/* Keep utility controls out of the broad dark primary-button rule. */
body.oasis-redesign :is(
  button.show-password-input,
  button.wp-hide-pw,
  button.ol-qty-btn,
  button.ol-shop-drawer-close,
  button.oasis-coa-arrow,
  button.oasis-coa-dot,
  button.oasis-co-edit-toggle,
  button.oasis-co-notes-toggle,
  button.oasis-co-coupon-toggle
) {
  box-shadow: none !important;
  text-transform: none !important;
}

body.oasis-redesign :is(button.show-password-input, button.wp-hide-pw) {
  width: var(--ol-touch-target) !important;
  min-width: var(--ol-touch-target) !important;
  height: var(--ol-touch-target) !important;
  min-height: var(--ol-touch-target) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--ol-radius-control) !important;
  background: transparent !important;
  color: var(--ol-forest-900) !important;
}

/* Pills never break a phrase or develop mismatched line boxes. */
body.oasis-redesign :is(
  .ol-page-proofline span,
  .ol-shop-cat,
  .ol-tab,
  .ol-stock-pill,
  .ol-savings-pill,
  .brief-shipping-details,
  .oasis-lot-badge
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1 !important;
  white-space: nowrap;
}

/* COA library and editorial cards use the same nested radius logic. */
body.oasis-redesign .ol-coa-shell :is(.oasis-library-product, .oasis-coa-card),
body.oasis-redesign .ol-coa-library :is(.oasis-library-product, .oasis-coa-card) {
  border-radius: var(--ol-radius-card) !important;
}

body.oasis-redesign .ol-coa-shell .oasis-coa-download-btn,
body.oasis-redesign .ol-coa-library .oasis-coa-download-btn {
  min-height: var(--ol-touch-target);
  border-radius: var(--ol-radius-control) !important;
  white-space: nowrap;
}

/* No generated WooCommerce clearfix nodes may become grid children. */
body.oasis-redesign ul.products::before,
body.oasis-redesign ul.products::after {
  content: none !important;
  display: none !important;
}

@media (hover: hover) {
  body.oasis-redesign :is(a, button, .button) {
    transition-duration: .32s;
    transition-timing-function: var(--ol-ease);
  }
}

@media (max-width: 700px) {
  body.oasis-redesign :is(
    .ol-contact-form,
    .woocommerce-cart-form,
    .cart_totals,
    .woocommerce-checkout-review-order,
    .woocommerce-MyAccount-navigation,
    .woocommerce-MyAccount-content,
    .ol-registration-gate__account
  ) {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.oasis-redesign *,
  body.oasis-redesign *::before,
  body.oasis-redesign *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
