/* ==========================================================================
   SugarPilots B2B
   Frontend styling
   ========================================================================== */


/* --------------------------------------------------------------------------
   Design variables
   -------------------------------------------------------------------------- */

:root {
    --spb2b-primary: #6B5E57;
    --spb2b-primary-hover: #85756D;
    --spb2b-background: #FFFBF6;
    --spb2b-text: #6B5E57;
    --spb2b-white: #FFFFFF;
    --spb2b-border: rgba(107, 94, 87, 0.18);
    --spb2b-shadow: 0 8px 24px rgba(107, 94, 87, 0.08);
}


/* --------------------------------------------------------------------------
   General B2B typography
   -------------------------------------------------------------------------- */

.spb2b-dashboard,
.spb2b-login,
.spb2b-register,
.spb2b-error,
.spb2b-success {
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-text);
}

.spb2b-dashboard h1,
.spb2b-dashboard h2,
.spb2b-dashboard h3,
.spb2b-login h1,
.spb2b-login h2,
.spb2b-login h3,
.spb2b-register h1,
.spb2b-register h2,
.spb2b-register h3 {
    font-family: 'Playfair Display', serif;
    color: var(--spb2b-primary);
}


/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.spb2b-dashboard {
    width: 100%;
    box-sizing: border-box;
}

.spb2b-dashboard h2 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 500;
}

.spb2b-dashboard > p {
    margin: 0 0 30px;
    font-size: 15px;
    line-height: 1.7;
}


/* --------------------------------------------------------------------------
   Customer information table
   -------------------------------------------------------------------------- */

.spb2b-account-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0;
    background: var(--spb2b-background);
    border: 1px solid var(--spb2b-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--spb2b-shadow);
}

.spb2b-account-table tbody {
    width: 100%;
}

.spb2b-account-table tr {
    border-bottom: 1px solid var(--spb2b-border);
}

.spb2b-account-table tr:last-child {
    border-bottom: 0;
}

.spb2b-account-table th,
.spb2b-account-table td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: middle;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.spb2b-account-table th {
    width: 35%;
    color: var(--spb2b-primary);
    font-weight: 600;
}

.spb2b-account-table td {
    color: var(--spb2b-text);
    font-weight: 400;
}


/* --------------------------------------------------------------------------
   B2B price labels
   -------------------------------------------------------------------------- */

.spb2b-price-label,
.spb2b-excl-vat {
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-primary);
    font-size: 0.85em;
    font-weight: 400;
}


/* --------------------------------------------------------------------------
   WooCommerce B2B price labels
   -------------------------------------------------------------------------- */

.woocommerce .price small,
.woocommerce .woocommerce-Price-amount + small {
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-primary);
    font-size: 0.72em;
    font-weight: 400;
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Cart / checkout VAT information
   -------------------------------------------------------------------------- */

.spb2b-vat-row th,
.spb2b-vat-row td,
.spb2b-checkout-vat th,
.spb2b-checkout-vat td {
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-text);
}

.spb2b-vat-row th,
.spb2b-checkout-vat th {
    font-weight: 500;
}

.spb2b-vat-row td,
.spb2b-checkout-vat td {
    font-weight: 400;
}


/* --------------------------------------------------------------------------
   Cart / checkout "ekskl. moms"
   -------------------------------------------------------------------------- */

.woocommerce-cart .product-price small,
.woocommerce-cart .product-subtotal small,
.woocommerce-cart .cart-subtotal small,
.woocommerce-checkout .product-price small,
.woocommerce-checkout .product-subtotal small,
.woocommerce-checkout .cart-subtotal small {
    display: block;
    margin-top: 2px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 400;
    color: var(--spb2b-primary);
}


/* --------------------------------------------------------------------------
   Total including VAT
   -------------------------------------------------------------------------- */

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td,
.woocommerce-checkout .order-total th,
.woocommerce-checkout .order-total td {
    color: var(--spb2b-primary);
}

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-checkout .order-total th {
    font-weight: 600;
}


/* ==========================================================================
   Elementor mini cart
   ========================================================================== */


/* Mini cart subtotal container */

.elementor-menu-cart__subtotal {
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-text);
}


/* "Subtotal:" */

.elementor-menu-cart__subtotal strong {
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-primary);
    font-size: 14px;
    font-weight: 600;
}


/* Price in mini cart */

.elementor-menu-cart__subtotal .woocommerce-Price-amount {
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-primary);
    font-size: 14px;
    font-weight: 400;
}


/* "ekskl. moms" in mini cart */

.elementor-menu-cart__subtotal small {
    display: block;
    margin-top: 3px;
    font-family: 'Poppins', sans-serif;
    color: var(--spb2b-primary);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 400;
}


/* --------------------------------------------------------------------------
   Registration / login forms
   -------------------------------------------------------------------------- */

.spb2b-login,
.spb2b-register {
    width: 100%;
    box-sizing: border-box;
}


/* Registration heading */

.spb2b-register h2 {
    margin: 0 0 28px;
    font-family: 'Playfair Display', serif;
    color: var(--spb2b-primary);
    font-size: 34px;
    line-height: 1.2;
    font-weight: 500;
}


/* Form paragraphs */

.spb2b-login p,
.spb2b-register p {
    margin: 0 0 20px;
}


/* Labels */

.spb2b-login label,
.spb2b-register label {
    display: block;
    margin-bottom: 7px;
    color: var(--spb2b-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}


/* Input fields */

.spb2b-login input,
.spb2b-register input,
.spb2b-login select,
.spb2b-register select,
.spb2b-login textarea,
.spb2b-register textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 15px;
    border: 1px solid var(--spb2b-border);
    border-radius: 4px;
    background: var(--spb2b-background);
    color: var(--spb2b-text);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


/* Input focus */

.spb2b-login input:focus,
.spb2b-register input:focus,
.spb2b-login select:focus,
.spb2b-register select:focus,
.spb2b-login textarea:focus,
.spb2b-register textarea:focus {
    border-color: var(--spb2b-primary);
    box-shadow: 0 0 0 2px rgba(107, 94, 87, 0.08);
    background: var(--spb2b-white);
}


/* --------------------------------------------------------------------------
   Registration / login buttons
   -------------------------------------------------------------------------- */

.spb2b-login button,
.spb2b-login input[type="submit"],
.spb2b-register button,
.spb2b-register input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid var(--spb2b-primary);
    border-radius: 4px;
    background: var(--spb2b-primary);
    color: var(--spb2b-background);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


/* Button hover */

.spb2b-login button:hover,
.spb2b-login input[type="submit"]:hover,
.spb2b-register button:hover,
.spb2b-register input[type="submit"]:hover {
    background: var(--spb2b-primary-hover);
    border-color: var(--spb2b-primary-hover);
}


/* --------------------------------------------------------------------------
   Error / success messages
   -------------------------------------------------------------------------- */

.spb2b-error,
.spb2b-success {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 20px;
    padding: 14px 18px;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.spb2b-error {
    border: 1px solid rgba(180, 70, 70, 0.25);
    background: rgba(180, 70, 70, 0.06);
}

.spb2b-success {
    border: 1px solid rgba(70, 130, 90, 0.25);
    background: rgba(70, 130, 90, 0.06);
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {

    /* Dashboard */

    .spb2b-dashboard h2 {
        font-size: 28px;
    }


    /* Dashboard table */

    .spb2b-account-table th,
    .spb2b-account-table td {
        padding: 13px 14px;
        font-size: 13px;
    }

    .spb2b-account-table th {
        width: 40%;
    }


    /* Registration heading */

    .spb2b-register h2 {
        font-size: 28px;
    }


    /* Mini cart */

    .elementor-menu-cart__subtotal strong,
    .elementor-menu-cart__subtotal .woocommerce-Price-amount {
        font-size: 13px;
    }

}