/* WC LP Helper Frontend Styles - VERSION 2.0 */
/* Modern 2-Column Checkout with Custom Radio Buttons */

.wc-lp-combo-container {
    max-width: 100%;
    margin: 0 auto;
}

/* ========================================
   PRODUCT CARD - CUSTOM RADIO/CHECKBOX
======================================== */

.wc-lp-product-card {
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

/* Hide default radio/checkbox but keep accessible and visible for pseudo-elements */
.wc-lp-product-card input[type="radio"],
.wc-lp-product-card input[type="checkbox"] {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    opacity: 1;
    z-index: 2;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    outline: none;
    background: transparent;
}

/* Custom radio/checkbox container - no longer needed as we style input directly */
.wc-lp-product-card input[type="radio"]+*,
.wc-lp-product-card input[type="checkbox"]+* {
    position: relative;
}

/* Create custom radio button */
.wc-lp-product-card input[type="radio"]::after,
.wc-lp-product-card input[type="checkbox"]::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #aaa;
    background: #fff;
    transition: all 0.2s ease;
    pointer-events: none;
    box-sizing: border-box;
}

/* Radio button is round */
.wc-lp-product-card input[type="radio"]::after {
    border-radius: 50%;
}

/* Checkbox is ALSO round now for modern look */
.wc-lp-product-card input[type="checkbox"]::after {
    border-radius: 50%;
}

/* Checked state - border color & background for stronger highlight */
.wc-lp-product-card input[type="radio"]:checked::after,
.wc-lp-product-card input[type="checkbox"]:checked::after {
    border-color: #7AB547;
    border-width: 6px;
    /* Create the 'dot' effect using border width */
}

/* Inner dot for radio - hidden as we use border-width trick */
/* Remove inner dot/checkmark as we use the border trick */
.wc-lp-product-card input[type="radio"]:checked::before,
.wc-lp-product-card input[type="checkbox"]:checked::before {
    display: none;
}

/* Hover effect for radio/checkbox */
.wc-lp-product-card:hover input[type="radio"]::after,
.wc-lp-product-card:hover input[type="checkbox"]::after {
    border-color: #7AB547;
    box-shadow: 0 0 0 4px rgba(122, 181, 71, 0.1);
}

/* Selected card highlighting */
.wc-lp-product-card.selected {
    border-color: #7AB547 !important;
    background: #f8fdf5 !important;
    box-shadow: 0 4px 12px rgba(122, 181, 71, 0.15);
}

/* ========================================
   CHECKOUT WRAPPER - 2 COLUMN LAYOUT
======================================== */

.wc-lp-checkout-wrapper {
    margin-top: 40px;
}

.wc-lp-checkout-main-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2D5016;
    text-align: center;
}

.wc-lp-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

/* ========================================
   LEFT COLUMN - CHECKOUT FORM
======================================== */

.wc-lp-checkout-form-column {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wc-lp-form-section {
    /* margin-bottom: 30px; */
}

.wc-lp-form-section:last-child {
    margin-bottom: 0;
}

.wc-lp-form-section-title {
    font-size: 18px;
    font-weight: 500;
    /* margin-bottom: 20px; */
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    /* padding-bottom: 12px; */
    /* border-bottom: 2px solid #f0f0f0; */
}

.checkout-form-title {
    margin-bottom: 20px;
}


.wc-lp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: 20px; */
}

.wc-lp-form-field {
    margin-bottom: 20px;
}

.wc-lp-form-field.wc-lp-field-full {
    grid-column: 1 / -1;
}

.wc-lp-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wc-lp-required {
    color: #e74c3c;
    margin-left: 3px;
}

.wc-lp-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.wc-lp-input:focus {
    outline: none;
    border-color: #7AB547;
    box-shadow: 0 0 0 4px rgba(122, 181, 71, 0.1);
}

.wc-lp-input.error {
    border-color: #e74c3c;
}

textarea.wc-lp-input {
    resize: vertical;
    min-height: 100px;
}

select.wc-lp-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ========================================
   RIGHT COLUMN - ORDER SUMMARY
======================================== */

.wc-lp-order-summary-column {
    position: relative;
}

.wc-lp-order-summary-sticky {
    position: sticky;
    top: 20px;
}

.wc-lp-order-summary {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
}

.wc-lp-summary-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #2D5016;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Selected Products Display */
.wc-lp-summary-products {
    margin-bottom: 20px;
    min-height: 80px;
}

.wc-lp-summary-products-empty {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}



.wc-lp-summary-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.wc-lp-summary-product-item:last-child {
    margin-bottom: 0;
}

.wc-lp-summary-product-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.wc-lp-summary-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wc-lp-summary-product-info {
    flex: 1;
    min-width: 0;
}

.wc-lp-summary-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-lp-summary-product-price {
    font-size: 13px;
    color: #7AB547;
    font-weight: 600;
}

/* Coupon Section */
.wc-lp-summary-coupon {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.wc-lp-coupon-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}



.wc-lp-coupon-input-wrapper {
    display: flex;
    gap: 8px;
}

.wc-lp-coupon-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wc-lp-coupon-input:focus {
    outline: none;
    border-color: #7AB547;
}

.wc-lp-apply-coupon-btn {
    padding: 10px 20px;
    background: #7AB547;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.wc-lp-apply-coupon-btn:hover {
    background: #5A8F35;
}

.wc-lp-coupon-message {
    margin-top: 8px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
}

.wc-lp-coupon-message.success {
    background: #d4edda;
    color: #155724;
}

.wc-lp-coupon-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Price Breakdown */
.wc-lp-summary-totals {
    margin-bottom: 20px;
}

.wc-lp-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 15px;
}

.wc-lp-summary-row.wc-lp-total-row {
    border-top: 2px solid #e0e0e0;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 700;
}

.wc-lp-summary-label {
    color: #666;
}

.wc-lp-summary-value {
    font-weight: 600;
    color: #333;
}

.wc-lp-total-row .wc-lp-summary-label,
.wc-lp-total-row .wc-lp-summary-value {
    color: #2D5016;
}

.wc-lp-discount-amount {
    color: #e74c3c !important;
}

.wc-lp-shipping-amount {
    font-size: 13px;
    font-style: italic;
    color: #999;
}

/* Submit Button */
.wc-lp-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: #7AB547;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(122, 181, 71, 0.3);
}

.wc-lp-submit-btn:hover {
    background: #5A8F35;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(122, 181, 71, 0.4);
}

.wc-lp-submit-btn:active {
    transform: translateY(0);
}

.wc-lp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}





/* ========================================
   MESSAGES
======================================== */

.wc-lp-form-messages {
    /* margin-bottom: 20px; */
}

.wc-lp-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-lp-message::before {
    font-size: 18px;
}

.wc-lp-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-lp-message.success::before {
    content: '✓';
}

.wc-lp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wc-lp-message.error::before {
    content: '⚠';
}

.wc-lp-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.wc-lp-message.info::before {
    content: 'ℹ';
}

.wc-lp-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* ========================================
   LOADING STATE
======================================== */

.wc-lp-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.wc-lp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7AB547;
    border-radius: 50%;
    animation: wc-lp-spin 1s linear infinite;
    z-index: 100;
}

@keyframes wc-lp-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes wc-lp-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-lp-fade-in {
    animation: wc-lp-fade-in 0.3s ease;
}

@keyframes wc-lp-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wc-lp-summary-product-item {
    animation: wc-lp-slide-in 0.3s ease;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
    .wc-lp-checkout-grid {
        grid-template-columns: 1fr 350px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .wc-lp-checkout-grid {
        grid-template-columns: 1fr;
    }

    .wc-lp-order-summary-column {
        order: 1;
        /* Show summary first on mobile */
    }

    .wc-lp-order-summary-sticky {
        position: static;
    }

    .wc-lp-form-row {
        grid-template-columns: 1fr;
        /* gap: 15px; */
    }

    .wc-lp-checkout-form-column {
        padding: 20px;
    }

    .wc-lp-order-summary {
        padding: 20px;
    }

    .wc-lp-product-card input[type="radio"]::after,
    .wc-lp-product-card input[type="checkbox"]::after {
        right: 15px;
    }

    .wc-lp-product-card input[type="radio"]:checked::before {
        right: 21px;
    }

    .wc-lp-product-card input[type="checkbox"]:checked::before {
        right: 19px;
    }

    .wc-lp-product-card input[type="checkbox"] {
        left: 10px;
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .wc-lp-checkout-main-title {
        font-size: 24px;
    }

    .wc-lp-form-section-title {
        font-size: 16px;
    }

    .wc-lp-input {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .wc-lp-coupon-input-wrapper {
        flex-direction: column;
    }

    .wc-lp-apply-coupon-btn {
        width: 100%;
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {

    .wc-lp-submit-btn,
    .wc-lp-summary-coupon {
        display: none;
    }

    .wc-lp-order-summary {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   BADGE STYLES (Modern Top-Right)
======================================== */

.wc-lp-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF6B35;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    transform: rotate(0deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}