/*
 * Custom CSS for Nexus Cart Orderform
 *
 * This file allows you to customize the theme colors and styles for the Nexus Cart orderform.
 *
 * To customize colors:
 * - Replace the var() references with your own hex colors or other CSS values.
 * - For example, instead of --vl-primary: var(--zinc-900); use --vl-primary: #your-color;
 * - You can also override any CSS properties here.
 *
 * Note: Changes here will apply to the orderform's Shadow DOM.
 */

/* Add you custom styles here */
:host, :root {
    /* Primary colors */
    --vl-primary: var(--primary);
    --vl-primary-lifted: var(--primary-lifted);
    --vl-primary-accented: var(--primary-accented);

    /* Secondary colors */
    --vl-secondary: var(--secondary);
    --vl-secondary-lifted: var(--secondary-lifted);
    --vl-secondary-accented: var(--secondary-accented);

    /* Success colors */
    --vl-success: var(--success);
    --vl-success-lifted: var(--success-lifted);
    --vl-success-accented: var(--success-accented);

    /* Info colors */
    --vl-info: var(--info);
    --vl-info-lifted: var(--info-lifted);
    --vl-info-accented: var(--info-accented);

    /* Notice colors */
    --vl-notice: var(--notice);
    --vl-notice-lifted: var(--notice-lifted);
    --vl-notice-accented: var(--notice-accented);

    /* Warning colors */
    --vl-warning: var(--warning);
    --vl-warning-lifted: var(--warning-lifted);
    --vl-warning-accented: var(--warning-accented);

    /* Error colors */
    --vl-error: var(--error);
    --vl-error-lifted: var(--error-lifted);
    --vl-error-accented: var(--error-accented);

    /* Grayscale colors */
    --vl-grayscale: var(--grayscale);
    --vl-grayscale-lifted: var(--grayscale-lifted);
    --vl-grayscale-accented: var(--grayscale-accented);

    /* Neutral colors */
    --vl-neutral: var(--neutral);
    --vl-neutral-lifted: var(--neutral-lifted);
    --vl-neutral-accented: var(--neutral-accented);

    /* Text neutral colors */
    --vl-text-inverted: var(--text-inverted);
    --vl-text-muted: var(--text-muted);
    --vl-text-lifted: var(--text-lifted);
    --vl-text-accented: var(--text-accented);
    --vl-text: var(--text);

    /* Border neutral colors */
    --vl-border-muted: var(--border-muted);
    --vl-border: var(--border);
    --vl-border-lifted: var(--border-lifted);
    --vl-border-accented: var(--border-accented);

    /* Background neutral colors */
    --vl-bg: var(--bg);
    --vl-bg-muted: var(--bg-muted);
    --vl-bg-lifted: var(--bg-lifted);
    --vl-bg-accented: var(--bg-accented);
    --vl-bg-inverted: var(--bg-inverted);

    /* Additional custom properties */
    /* Font Sizes */
    --vl-text-xs: var(--text-xs);
    --vl-text-sm: var(--text-sm);
    --vl-text-md: var(--text-md);
    --vl-text-lg: var(--text-lg);

    /* Spacing */
    --vl-outline-sm: var(--outline-sm);
    --vl-outline-md: var(--outline-md);
    --vl-outline-lg: var(--outline-lg);

    /* Rounding */
    --vl-rounding-sm: var(--rounding-sm);
    --vl-rounding-md: var(--rounding-md);
    --vl-rounding-lg: var(--rounding-lg);

    /* Other */
    --vl-letter-spacing: var(--letter-spacing);
    --vl-disabled-opacity: var(--disabled-opacity);
}

/* A2Hoster: compact Nexus SPA cart, using the native orderform custom.css
   loaded inside its open Shadow DOM. This is CSS-only; checkout, domain,
   totals, product configuration, security tokens and native Vue state stay owned
   by WHMCS. Scoped to cart-module; domain search retains its native layout. */
:host([data-app="cart-module"]) {
    --vl-primary: #0866ee;
    --vl-primary-lifted: #0758d8;
    --vl-primary-accented: #064ebc;
    --vl-bg-muted: #f3f7fd;
    --vl-border: #d4e2f5;
    --vl-border-muted: #e1eaf7;
    --vl-rounding-md: 0.625rem;
    --vl-rounding-lg: 0.875rem;
}
:host([data-app="cart-module"]) div:has(> [data-test="cart-header-browse-link"]) {
    display: none !important;
}
:host([data-app="cart-module"]) div:has(> [data-test="cart-header-browse-link"]) + div > div:first-child {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em;
}
:host([data-app="cart-module"]) [data-test="cart-order-summary"] {
    gap: 5px !important;
}
:host([data-app="cart-module"]) [data-test="cart-order-summary"] > div:first-child {
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 750 !important;
    letter-spacing: -0.025em;
}
:host([data-app="cart-module"]) [data-test="cart-order-summary"] > div:nth-child(2) {
    font-size: 12px !important;
    color: #60728d;
}
:host([data-app="cart-module"]) div:has(> div > [data-test="cart-order-summary"]) {
    border: 1px solid #d4e2f5;
    border-radius: 16px;
    background: linear-gradient(155deg,#f8fbff,#eff5ff) !important;
    box-shadow: 0 8px 24px rgba(16,53,104,.075);
    overflow: hidden;
}
:host([data-app="cart-module"]) div:has(> div > [data-test="cart-order-summary"]) > div {
    padding: 15px 18px !important;
    gap: 14px !important;
    background: transparent !important;
}
:host([data-app="cart-module"]) div:has(> div > [data-test="cart-order-summary"]) > div:has([data-test="cart-checkout-button"]) {
    padding-top: 8px !important;
    border-top: 1px solid #dde8f8;
}
:host([data-app="cart-module"]) [data-test="cart-checkout-button"] {
    min-height: 42px;
    padding: 9px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 5px 12px rgba(8,102,238,.16);
}
:host([data-app="cart-module"]) [data-test="cart-item"] {
    border: 1px solid #d5e2f4 !important;
    border-radius: 14px !important;
    background: linear-gradient(125deg,#fff,#fbfdff) !important;
    padding: 14px 17px !important;
    box-shadow: 0 3px 12px rgba(11,54,111,.05);
}
:host([data-app="cart-module"]) [data-test="cart-item"] [class*="text-xl"] {
    font-size: 16px !important;
}
:host([data-app="cart-module"]) div[class*="bg-accented"]:has([data-test="last-chance-billing-cycle-select-content"]) {
    border: 1px solid #cbdcf2 !important;
    border-radius: 15px !important;
    background: linear-gradient(125deg,#ecf3ff,#f7faff) !important;
    padding: 12px !important;
}
@media (min-width: 1024px) {
    /* The direct children use the native 3/5 + 2/5 proportions. */
    :host([data-app="cart-module"]) div:has(> div > div > [data-test="cart-item"]) {
        flex: 1 1 0% !important;
        width: auto !important;
        min-width: 0 !important;
        padding-top: 10px !important;
        padding-bottom: 14px !important;
    }
    :host([data-app="cart-module"]) div:has(> div > [data-test="cart-order-summary"]) {
        flex: 0 0 min(31%, 420px) !important;
        width: min(31%, 420px) !important;
        max-width: min(31%, 420px) !important;
        min-height: 0 !important;
        height: auto !important;
        position: sticky !important;
        top: 10px !important;
        align-self: flex-start !important;
    }
    :host([data-app="cart-module"]) div:has(> div > [data-test="cart-order-summary"]) > div:has([data-test="cart-checkout-button"]) {
        position: static !important;
    }
}
@media (max-width: 767px) {
    :host([data-app="cart-module"]) [data-test="cart-item"] {padding: 12px !important;}
    :host([data-app="cart-module"]) [data-test="cart-order-summary"] > div:first-child {font-size: 17px !important;}
    :host([data-app="cart-module"]) div:has(> div > [data-test="cart-order-summary"]) > div {padding: 12px 14px !important;}
}
