/* =============================================================================
   Digi Clinicaid Multivendor — WooCommerce Core Page Theme
   Restyles WooCommerce's own cart/checkout/my-account templates (not our
   plugin's own dca-mv-* templates — those are themed in frontend.css) to
   match the Next.js headless frontend's design system. Loaded only on
   those three page types — see class-dca-mv-headless-theme.php.

   Scoped by the body classes WooCommerce itself adds automatically
   (woocommerce-cart / woocommerce-checkout / woocommerce-account), not by
   guessing template structure — those classes are core WooCommerce
   behavior and have been stable for years, unlike theme-specific markup.
   ============================================================================= */

:root {
    --dca-wc-navy:      #102359;
    --dca-wc-navy-dark: #0a1440;
    --dca-wc-teal:      #00a9c0;
    --dca-wc-teal-dark: #007e90;
    --dca-wc-ink:       #1b2430;
    --dca-wc-muted:     #64707c;
    --dca-wc-border:    #e3e8ee;
    --dca-wc-bg:        #f6f8fa;
    --dca-wc-radius:    12px;
    --dca-wc-radius-pill: 999px;
    --dca-wc-font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --dca-wc-font-display: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
}

/* ---------------------------------------------------------------------------
   Hide the theme's own header/nav/footer chrome on these pages. Visitors
   reach these pages via the Next.js site's own header/footer wrapping them
   (proxied same-origin) — GeneratePress's default header/nav underneath
   would be a second, conflicting navigation bar stacked on top of content
   the visitor already navigated to from the real site header.

   .dca-mv-headless is added via the body_class filter in
   class-dca-mv-headless-theme.php — covers cart/checkout/account AND
   vendor-dashboard/vendor-register with one class, since the latter two
   don't get WooCommerce's own body classes.
   --------------------------------------------------------------------------- */
body.dca-mv-headless .site-header,
body.dca-mv-headless #masthead,
body.dca-mv-headless .main-navigation,
body.dca-mv-headless .site-footer,
body.dca-mv-headless #colophon {
    display: none !important;
}

/* Minimal replacement bar — injected via wp_body_open in
   class-dca-mv-headless-theme.php, not part of the theme's own markup. */
.dca-wc-minibar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--dca-wc-border);
    font-family: var(--dca-wc-font-body);
}
.dca-wc-minibar img {
    height: 36px;
    width: auto;
    display: block;
}
.dca-wc-minibar a.dca-wc-minibar__back {
    color: var(--dca-wc-teal-dark);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}
.dca-wc-minibar a.dca-wc-minibar__back:hover {
    color: var(--dca-wc-teal);
}

/* ---------------------------------------------------------------------------
   Page shell
   --------------------------------------------------------------------------- */
body.dca-mv-headless {
    background: #ffffff;
    font-family: var(--dca-wc-font-body);
    color: var(--dca-wc-ink);
}
body.dca-mv-headless .content-area,
body.dca-mv-headless #content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    float: none;
    width: 100%;
}
body.dca-mv-headless h1.entry-title,
body.dca-mv-headless .page-title {
    font-family: var(--dca-wc-font-display);
    font-weight: 800;
    color: var(--dca-wc-navy);
    font-size: 1.75rem;
}

/* ---------------------------------------------------------------------------
   Tables (cart contents, order history)
   --------------------------------------------------------------------------- */
.woocommerce table.shop_table {
    border: 1px solid var(--dca-wc-border);
    border-radius: var(--dca-wc-radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.woocommerce table.shop_table th {
    background: var(--dca-wc-bg);
    color: var(--dca-wc-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    border-bottom: 1px solid var(--dca-wc-border);
}
.woocommerce table.shop_table td {
    border-top: 1px solid var(--dca-wc-border);
}
.woocommerce td.product-name a,
.woocommerce td.product-name {
    color: var(--dca-wc-ink);
    font-weight: 600;
}
.woocommerce .cart_totals,
.woocommerce-cart-form {
    background: #ffffff;
}
.woocommerce .cart_totals h2 {
    font-family: var(--dca-wc-font-display);
    color: var(--dca-wc-navy);
}

/* ---------------------------------------------------------------------------
   Buttons — pill-shaped teal, matching the Next.js frontend's
   AddToCartButton/checkout-button treatment exactly.
   --------------------------------------------------------------------------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order,
.woocommerce .checkout-button {
    background: var(--dca-wc-teal) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--dca-wc-radius-pill) !important;
    padding: 12px 28px !important;
    font-weight: 700 !important;
    font-family: var(--dca-wc-font-body) !important;
    font-size: 0.9375rem !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background 0.15s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover {
    background: var(--dca-wc-teal-dark) !important;
    color: #ffffff !important;
}
.woocommerce a.button.alt,
.woocommerce #place_order {
    background: var(--dca-wc-navy) !important;
}
.woocommerce a.button.alt:hover,
.woocommerce #place_order:hover {
    background: var(--dca-wc-navy-dark) !important;
}
.woocommerce a.remove {
    color: #d1453b !important;
    border-radius: 50% !important;
}

/* ---------------------------------------------------------------------------
   Forms (checkout fields, login/register, edit account)
   --------------------------------------------------------------------------- */
.woocommerce form .form-row label {
    font-weight: 600;
    color: var(--dca-wc-ink);
    font-size: 0.875rem;
}
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea,
.woocommerce-account form input.input-text {
    border: 1px solid var(--dca-wc-border) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-family: var(--dca-wc-font-body) !important;
    font-size: 0.9375rem !important;
    background: #ffffff !important;
}
.woocommerce form .input-text:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
    border-color: var(--dca-wc-teal) !important;
    outline: 2px solid var(--dca-wc-teal) !important;
    outline-offset: 1px;
}
#payment {
    background: var(--dca-wc-bg) !important;
    border-radius: var(--dca-wc-radius) !important;
    border: 1px solid var(--dca-wc-border) !important;
}
#order_review_heading,
.woocommerce-checkout h3 {
    font-family: var(--dca-wc-font-display);
    color: var(--dca-wc-navy);
}

/* ---------------------------------------------------------------------------
   My Account
   --------------------------------------------------------------------------- */
.woocommerce-MyAccount-navigation ul {
    border: 1px solid var(--dca-wc-border);
    border-radius: var(--dca-wc-radius);
    overflow: hidden;
    padding: 0;
}
.woocommerce-MyAccount-navigation li {
    border-bottom: 1px solid var(--dca-wc-border);
}
.woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}
.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 12px 16px;
    color: var(--dca-wc-ink);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
}
.woocommerce-MyAccount-navigation li.is-active a {
    background: var(--dca-wc-bg);
    color: var(--dca-wc-teal-dark);
}
.woocommerce-MyAccount-navigation li a:hover {
    background: var(--dca-wc-bg);
}

/* ---------------------------------------------------------------------------
   Notices (order success, form errors)
   --------------------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--dca-wc-teal) !important;
    background: #e3f7fa !important;
}
.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--dca-wc-teal-dark) !important;
}
.woocommerce-error {
    border-top-color: #d1453b !important;
}
