/**
 * Giveaway Entries Block - Cart & Checkout Pages
 * Designed to work with Elementor WooCommerce widgets
 */

/* ==================== CSS Variables ==================== */
:root {
    --giveaway-bg: linear-gradient(135deg, rgba(254, 203, 0, 0.08) 0%, rgba(254, 203, 0, 0.03) 100%);
    --giveaway-border: rgba(254, 203, 0, 0.25);
    --giveaway-accent: #fecb00;
    --giveaway-text: #ffffff;
    --giveaway-text-muted: rgba(255, 255, 255, 0.7);
    --giveaway-radius: 16px;
}

/* ==================== Giveaway Entries Block ==================== */

.hello-giveaway-entries-block {
    background: var(--giveaway-bg);
    border: 1px solid var(--giveaway-border);
    border-radius: var(--giveaway-radius);
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}

.hello-giveaway-entries-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--giveaway-accent), rgba(254, 203, 0, 0.3));
}

.hello-giveaway-entries-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* Image Section */
.hello-giveaway-entries-image {
    flex-shrink: 0;
    width: 120px;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

.hello-giveaway-entries-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Content Section */
.hello-giveaway-entries-content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    align-items: center;
}

.hello-giveaway-entries-text {
    width: 100%;
}

/* Badge */
.hello-giveaway-entries-badge {
    display: inline-block;
    background: var(--giveaway-accent);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Title */
.hello-giveaway-entries-title {
    color: var(--giveaway-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px 0 !important;
}

.hello-giveaway-entries-count {
    color: var(--giveaway-accent);
    font-weight: 700;
    font-size: 18px;
}

/* Description */
.hello-giveaway-entries-description {
    color: var(--giveaway-text-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

.hello-giveaway-entries-description strong {
    color: var(--giveaway-accent);
    font-weight: 600;
}

/* ==================== Cart Page - Elementor Widget ==================== */

/* Position in cart sidebar - Elementor uses e-cart__column-end for sidebar */
.e-cart__column-end .hello-giveaway-entries-block {
    margin-bottom: 20px;
}

/* Inside cart_totals div */
.cart_totals .hello-giveaway-entries-block {
    margin-bottom: 20px;
}

/* ==================== Checkout Page - Elementor Widget ==================== */

/* Position in checkout sidebar */
.e-checkout__column-end .hello-giveaway-entries-block {
    margin-bottom: 20px;
}

.e-checkout__column-inner .hello-giveaway-entries-block {
    margin-bottom: 20px;
}

/* ==================== Responsive ==================== */

@media (max-width: 768px) {
    .hello-giveaway-entries-inner {
        flex-direction: column;
    }

    .hello-giveaway-entries-image {
        width: 100%;
        height: 200px;
        min-height: 200px;
        position: relative;
    }

    .hello-giveaway-entries-image img {
        position: relative;
        height: 200px;
    }

    .hello-giveaway-entries-content {
        padding: 16px 20px;
    }

    .hello-giveaway-entries-title {
        font-size: 15px;
    }

    .hello-giveaway-entries-count {
        font-size: 16px;
    }
}

/* ==================== Small Screen Adjustments ==================== */

@media (max-width: 480px) {
    .hello-giveaway-entries-image {
        height: 200px;
        min-height: 200px;
    }

    .hello-giveaway-entries-image img {
        height: 200px;
    }

    .hello-giveaway-entries-content {
        padding: 14px 16px;
    }

    .hello-giveaway-entries-badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .hello-giveaway-entries-title {
        font-size: 14px;
    }

    #customer_details .col-1 {
        padding: 0 !important;
    }
}

/* ==================== Modern Checkout Fields ==================== */

/* Container Spacing & Layout */
.woocommerce-checkout .form-row {
    margin-bottom: 24px;
}

/* Labels */
.woocommerce-checkout label {
    color: var(--giveaway-text, #ffffff);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
    letter-spacing: 0.5px;
    line-height: 1.5;
    opacity: 0.9;
}

.woocommerce-checkout label .required {
    color: var(--giveaway-accent, #fecb00);
    text-decoration: none;
    margin-left: 4px;
}

/* Inputs & Textareas */
.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none !important;
    width: 100%;
}

/* Input Focus State */
.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout textarea:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--giveaway-accent, #fecb00) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(254, 203, 0, 0.1) !important;
}

/* Input Placeholders */
.woocommerce-checkout input.input-text::placeholder,
.woocommerce-checkout textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Select2 (Standard Woo Dropdowns) Customization */
.woocommerce-checkout .select2-container .select2-selection--single {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    height: 56px !important;
    display: flex;
    align-items: center;
    outline: none !important;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    padding-left: 20px !important;
    font-size: 15px;
    line-height: normal !important;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
    height: 54px !important;
    top: 1px !important;
    right: 14px !important;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: #ffffff transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
    opacity: 0.5;
}

/* Select2 Dropdown */
.select2-dropdown {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.select2-results__option {
    padding: 12px 16px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 14px;
}

.select2-results__option--highlighted {
    background-color: var(--giveaway-accent, #fecb00) !important;
    color: #000000 !important;
}

/* Order Notes */
.woocommerce-checkout textarea {
    min-height: 120px;
    resize: vertical;
}

/* Payment Method Box Adjustment */
.woocommerce-checkout #payment {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
}

.woocommerce-checkout #payment .payment_methods>li .payment_box {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== Hide Default Coupon Widget ==================== */

/* Hide coupon on cart page */
.woocommerce-cart .coupon,
.woocommerce-cart .woocommerce-form-coupon-toggle,
.woocommerce-cart .woocommerce-form-coupon,
/* Hide coupon on checkout page */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .woocommerce-form-coupon,
.woocommerce-checkout .e-coupon-box,
.woocommerce-checkout .e-woocommerce-coupon-nudge,
.woocommerce-checkout .e-coupon-anchor,
/* Elementor checkout coupon */
.e-checkout .e-coupon-box {
    display: none !important;
}