/**
 * TPG Addons for WooCommerce — Empty Cart Page Styles
 *
 * Figma-matched: Centered white card on #F0F4F7 background
 * with cart icon, heading, description, and two CTAs.
 * No course recommendations on this page.
 *
 * Dependencies: variables.css, grid.css, checkout-flow.css
 *
 * @package TPG_Addons_WooCommerce
 * @since   3.2.0
 */

/* ==========================================================================
   1. EMPTY CART CONTAINER
   ========================================================================== */

.tpg-empty-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 20px 20px 50px;
}


/* ==========================================================================
   2. EMPTY CART CARD
   ==========================================================================
   Figma B5: 796×301px, white bg, box-shadow 0px 50px 58px rgba(0,0,0,0.01)
   ========================================================================== */

.tpg-empty-cart__content {
    background: var(--tpg-card-bg);
    box-shadow: 0px 50px 58px rgba(0, 0, 0, 0.01);
    width: 100%;
    max-width: 796px;
    padding: var(--tpg-spacing-xl) var(--tpg-spacing-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ==========================================================================
   3. CART ICON
   ==========================================================================
   Figma: 64×64px circle, bg #F0F4F7, cart SVG 38×38px inside
   ========================================================================== */

.tpg-empty-cart__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--tpg-page-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.tpg-empty-cart__icon svg {
    width: 38px;
    height: 38px;
    stroke: #4A4B4C;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================================================
   4. HEADING
   ==========================================================================
   Figma: Lora 700 28px/54px, capitalize, #212529, centered
   ========================================================================== */

.tpg-empty-cart__title {
    font-family: var(--tpg-font-heading) !important;
    font-weight: 700;
    font-size: 28px !important;
    line-height: 1.93 !important;
    text-transform: capitalize;
    color: var(--tpg-black) !important;
    margin-bottom: 0px !important;
}


/* ==========================================================================
   5. DESCRIPTION TEXT
   ==========================================================================
   Figma: Source Sans Pro 400 16px/140%, #666666, centered, max-width 564px
   ========================================================================== */

.tpg-empty-cart__message {
    font-family: var(--tpg-font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #666666;
    text-align: center;
    max-width: 564px;
    margin-bottom: 25px !important;
}


/* ==========================================================================
   6. CTA BUTTONS GROUP
   ==========================================================================
   Figma: Two CTAs side-by-side — "BROWSE COURSES" (orange gradient button)
   + "RETURN TO HOMEPAGE" (orange text link)
   ========================================================================== */

.tpg-empty-cart__actions {
    display: flex;
    align-items: center;
    gap: var(--tpg-spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
}

/* Primary CTA — "BROWSE COURSES" */
.tpg-empty-cart__actions .tpg-button--primary {
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
}

.tpg-empty-cart__actions .tpg-button--primary:hover {
    background: linear-gradient(180deg, var(--tpg-cta-gradient-end) 0%, var(--tpg-cta-gradient-start) 100%);
    transform: translateY(-1px);
    box-shadow: var(--tpg-shadow-md);
}

/* Secondary CTA — "RETURN TO HOMEPAGE" text link */
.tpg-empty-cart__link {
    font-size: 16px;
    font-weight: 600;
    color: var(--tpg-orange-primary);
}

.tpg-empty-cart__link:hover {
    color: var(--tpg-cta-gradient-end);
}


/* ==========================================================================
   7. HIDE RECOMMENDATIONS (removed from empty cart per Figma)
   ========================================================================== */

.tpg-empty-cart__recommendations {
    display: none !important;
}


/* ==========================================================================
   8. CLIENT-SIDE EMPTY CART (WC Blocks re-render)
   ==========================================================================
   When the last item is removed client-side, JS injects the TPG empty cart
   HTML inside .wp-block-woocommerce-empty-cart-block. These rules ensure
   the injected content renders correctly inside the WC Blocks container,
   and that WC's default "New in store" products grid is hidden.
   ========================================================================== */

/* Hide any remaining WC default empty cart elements when TPG content is present */
.wp-block-woocommerce-empty-cart-block .tpg-empty-cart ~ * {
    display: none !important;
}

/* Reset WC Blocks empty cart container padding to avoid double-spacing */
.wp-block-woocommerce-empty-cart-block:has(.tpg-empty-cart) {
    padding: 0 !important;
}


/* ==========================================================================
   9. MOBILE (B1-B3)
   ========================================================================== */

@media (max-width: 599px) {
    .tpg-empty-cart {
        padding: var(--tpg-spacing-lg) var(--tpg-spacing-md);
        min-height: 40vh;
    }

    .tpg-empty-cart__content {
        padding: var(--tpg-spacing-lg) var(--tpg-spacing-md);
    }

    .tpg-empty-cart__title {
        font-size: 24px;
        line-height: 1.4;
    }

    .tpg-empty-cart__actions {
        gap: var(--tpg-spacing-md);
    }
}
