/* Libre Attention Drip - Frontend Styles */

/* WooCommerce Cart & Checkout: fix button text colors */
.wc-proceed-to-checkout .checkout-button,
.woocommerce .cart-collaterals .checkout-button,
.woocommerce a.checkout-button,
a.checkout-button,
.wc-proceed-to-checkout a.checkout-button,
.woocommerce .wc-proceed-to-checkout a.checkout-button,
body .wc-proceed-to-checkout a,
.woocommerce #respond input#submit,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #place_order,
#place_order,
/* WooCommerce Blocks cart button */
.wc-block-cart__submit-container a,
.wc-block-cart__submit-container a.wc-block-cart__submit-button,
.wp-block-woocommerce-proceed-to-checkout-block a,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit a {
    color: #fff !important;
    text-decoration: none !important;
}

/* ========== WooCommerce Checkout: enhanced layout ========== */

/* Page title - prevent overflow */
.woocommerce-checkout h1,
.wp-block-woocommerce-checkout h1,
.page-title,
.entry-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 20px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Email field line height fix */
.wc-block-components-text-input input[type="email"],
.woocommerce-checkout input#billing_email,
.wc-block-components-address-form input,
.wc-block-components-text-input input {
    line-height: 1.4 !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
}

.wc-block-components-text-input label,
.wc-block-components-address-form label {
    font-size: 12px !important;
    line-height: 1.2 !important;
}

/* Checkout main container */
.woocommerce-checkout .woocommerce,
.wp-block-woocommerce-checkout {
    max-width: 1100px;
    margin: 0 auto;
}

/* Sections styling */
.woocommerce-checkout #customer_details,
.wp-block-woocommerce-checkout-fields-block {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

/* Section headings - colored header bars (checkout form only, NOT sidebar) */
.wp-block-woocommerce-checkout-fields-block .wc-block-components-checkout-step__title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #443DE0 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
    display: block !important;
}

/* Classic checkout headings */
.woocommerce-checkout #customer_details h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #443DE0 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
}

/* Reset: prevent purple leaking into sidebar product names */
.wc-block-components-order-summary-item__description h3,
.wc-block-components-order-summary-item__description .wc-block-components-product-name,
.wp-block-woocommerce-checkout-order-summary-block h3,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-title {
    background: none !important;
    color: #1a1a2e !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Order summary sidebar */
.woocommerce-checkout-review-order,
.wp-block-woocommerce-checkout-order-summary-block {
    background: #faf8f5 !important;
    border-radius: 12px !important;
    padding: 25px !important;
    border: 1px solid #e8ddd3 !important;
}

/* Order summary title */
.woocommerce-checkout-review-order h3,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
}

/* Total row */
.woocommerce-checkout .order-total td,
.woocommerce-checkout .order-total th,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
}

/* Place order / Commander button */
.woocommerce-checkout #place_order,
.wc-block-components-checkout-place-order-button {
    background: #1a1a2e !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 16px 40px !important;
    border-radius: 8px !important;
    border: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: background 0.2s !important;
    width: 100% !important;
    margin-top: 15px !important;
}

.woocommerce-checkout #place_order:hover,
.wc-block-components-checkout-place-order-button:hover {
    background: #2a2a4e !important;
}

/* Express checkout box */
.wc-block-components-express-payment,
.woocommerce-checkout .wc-block-components-express-payment {
    background: #f5f0eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    border: 1px solid #e8ddd3 !important;
}

/* Payment methods section */
.wc-block-components-payment-method-label,
.payment_methods label {
    font-weight: 500 !important;
}

/* Coupon/promo section */
.wc-block-components-totals-coupon,
.woocommerce-checkout .coupon {
    border-top: 1px solid #e8ddd3 !important;
    padding-top: 15px !important;
    margin-top: 15px !important;
}

/* Return to cart link */
.wc-block-components-checkout-return-to-cart-button,
.woocommerce-checkout a.woocommerce-remove-coupon {
    color: #d4a373 !important;
}

/* Privacy text */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper,
.wc-block-checkout__actions .wc-block-components-checkout-policies {
    font-size: 12px !important;
    color: #999 !important;
}

/* Form inputs */
.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.wc-block-components-text-input input {
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
    padding: 10px 12px !important;
}

.woocommerce-checkout input.input-text:focus,
.wc-block-components-text-input input:focus {
    border-color: #d4a373 !important;
    box-shadow: 0 0 0 2px rgba(212,163,115,0.2) !important;
}

/* WooCommerce Checkout: fix product title size in sidebar (Blocks) */
.wc-block-components-order-summary-item__description h3,
.wc-block-components-order-summary-item__description .wc-block-components-product-name {
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
}

/* WooCommerce Checkout: fix product title overflow in sidebar */
.woocommerce-checkout-review-order-table .product-name {
    font-size: 14px !important;
    word-break: break-word;
    max-width: 250px;
}
.woocommerce-checkout-review-order-table .product-name .product-quantity {
    display: block;
}
.woocommerce-checkout-review-order-table td.product-name {
    max-width: 300px;
    overflow-wrap: break-word;
}

/* Checkout Motivation Box */
.lad-checkout-motivation-box {
    background: linear-gradient(135deg, #f5f0eb, #fff);
    border: 1px solid #e8ddd3;
    border-radius: 12px;
    padding: 25px 30px;
    margin: 0 0 30px;
    text-align: center;
    font-family: sans-serif;
}

.lad-checkout-motivation-headline {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px;
}

.lad-checkout-motivation-subtitle {
    font-size: 15px;
    color: #555;
    margin: 0 0 8px;
}

.lad-checkout-motivation-badges {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* Library Grid */
.lad-library {
    padding: 20px 0;
}

.lad-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.lad-library-header h3 {
    margin: 0;
    font-size: 24px;
}

.lad-library-progress {
    background: #f5f0eb;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.lad-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.lad-library-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lad-library-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.lad-library-cover {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f0eb;
}

.lad-library-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lad-library-no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #f5f0eb, #e8ddd3);
}

.lad-library-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #1a1a2e;
    color: #d4a373;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.lad-library-details {
    padding: 16px;
}

.lad-library-details h4 {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.4;
}

.lad-download-btn {
    display: inline-block;
    background: #1a1a2e;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.lad-download-btn:hover {
    background: #2a2a4e;
    color: #d4a373 !important;
}

/* Subscription Panel */
.lad-subscription-panel {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.lad-subscription-panel h3 {
    margin-top: 0;
}

.lad-sub-info p {
    margin: 6px 0;
}

.lad-status {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.lad-status-active { background: #e6f4ea; color: #137333; }
.lad-status-paused { background: #fef7e0; color: #b45309; }
.lad-status-cancelled { background: #fce8e6; color: #c5221f; }
.lad-status-none { color: #999; }

.lad-sub-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.lad-sub-form-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lad-sub-form select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.lad-btn-pause {
    background: #f59e0b !important;
    color: #fff !important;
    border: none !important;
}

.lad-btn-cancel {
    background: #ef4444 !important;
    color: #fff !important;
    border: none !important;
}

.lad-btn-resume {
    background: #10b981 !important;
    color: #fff !important;
    border: none !important;
}

.lad-subscribe-btn {
    background: #1a1a2e !important;
    color: #d4a373 !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
}

/* Library Login / Empty */
.lad-library-login,
.lad-library-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f5f0eb;
    border-radius: 12px;
}

.lad-library-empty h3 {
    margin-bottom: 10px;
}

/* Account Section */
.lad-account-section {
    max-width: 900px;
}

/* Responsive */
@media (max-width: 600px) {
    .lad-library-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .lad-sub-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .lad-sub-form-inline {
        flex-direction: column;
    }
}
