/**
 * Custom Checkout Styles - Mindvalley Design
 * 
 * Save this file as: your-child-theme/assets/css/custom-checkout.css
 */

/* ===================================
   RESET & BASE STYLES
   =================================== */

.woocommerce-checkout .custom-checkout-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
}



/* ===================================
   CHECKOUT CONTAINER
   =================================== */

.checkout-container {
    max-width: 1400px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 0px;
}

/* ===================================
   ORDER REVIEW COLUMN (LEFT)
   =================================== */

.order-review-column {
    position: relative;
}

.order-review-box {
    padding: 40px;
    position: sticky;
    top: 20px;
}

.order-review-title {
    font-size: 24px !important;
    margin-bottom: 30px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* ===================================
   PRODUCT CARD
   =================================== */

.checkout-product-card {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.checkout-product-card .product-image {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6b46c1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-product-card .product-info {
    flex: 1;
}

.checkout-product-card .product-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #333 !important;
}

.checkout-product-card .product-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ===================================
   ORDER DETAILS
   =================================== */

.order-details-section {
    margin-bottom: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.detail-value.discount {
    color: #10b981;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid #e5e5e5;
    margin-bottom: 30px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.total-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* ===================================
   CONFIDENCE SECTION
   =================================== */

.confidence-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.confidence-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    color: #333 !important;
}

.confidence-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.confidence-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6b46c1;
}

.confidence-text h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 0px !important;
    color: #333 !important;
}

.confidence-text p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* ===================================
   CHECKOUT FORM COLUMN (RIGHT)
   =================================== */

.checkout-form-column {
    position: relative;
}

.checkout-form-box {
    background-color: white;
    padding: 45px 36px;
    border-radius: 0px;
    box-shadow: none;
    margin: -40px 0px;
}

/* ===================================
   BILLING FIELDS
   =================================== */

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
    display: none;
}

.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row {
    margin-bottom: 12px;
}

.woocommerce-billing-fields label,
.woocommerce-shipping-fields label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.woocommerce-billing-fields input[type="text"],
.woocommerce-billing-fields input[type="email"],
.woocommerce-billing-fields input[type="tel"],
.woocommerce-billing-fields select,
.woocommerce-shipping-fields input[type="text"],
.woocommerce-shipping-fields select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    background-color: white;
}

.woocommerce-billing-fields input:focus,
.woocommerce-billing-fields select:focus,
.woocommerce-shipping-fields input:focus,
.woocommerce-shipping-fields select:focus {
    outline: none;
    border-color: #6b46c1;
}

.woocommerce-billing-fields select:not(.select2-hidden-accessible),
.woocommerce-shipping-fields select:not(.select2-hidden-accessible) {
    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='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Two column layout for certain fields */
.woocommerce-billing-fields .form-row-first,
.woocommerce-billing-fields .form-row-last {
    width: 48%;
    float: left;
}

.woocommerce-billing-fields .form-row-last {
    float: right;
}

.woocommerce-billing-fields .form-row-wide {
    width: 100%;
    float: none;
    clear: both;
}

.woocommerce-billing-fields::after {
    content: "";
    display: table;
    clear: both;
}

/* Specific styling for remaining fields */


#billing_country_field,
#billing_postcode_field {
    width: 48%;
    float: left;
    clear:none;
}

#billing_postcode_field {
    float: right;
}

/* Clear floats after country/postcode row */
#billing_postcode_field::after {
    content: "";
    display: table;
    clear: both;
}

/* ===================================
   PAYMENT SECTION
   =================================== */

.checkout-payment-section {
    margin-top: 30px;
}

#payment {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 0px 0 !important;
    display: flex;
    gap: 15px;
}

.wc_payment_method {
    flex: 1;
    /*padding: 15px;
    border: 2px solid #e5e5e5;*/
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}
/*
.wc_payment_method.active,
.wc_payment_method input[type="radio"]:checked + label {
    border-color: #6b46c1;
    background-color: #faf5ff;
}*/

.wc_payment_method label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0 !important;
    font-weight: 500 !important;
}

.wc_payment_method input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #6b46c1;
}

/* Hide radio button when only one payment method is available */
.wc_payment_method.single-payment-method input[type="radio"],
.wc_payment_methods li:only-child input[type="radio"] {
    display: none;
}

/* Adjust label padding when radio is hidden */
.wc_payment_method.single-payment-method label,
.wc_payment_methods li:only-child label {
    padding-left: 0;
}

/*
.payment_box {
    background-color: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}*/

/* ===================================
   PLACE ORDER BUTTON
   =================================== */

.form-row.place-order {
    margin: 0;
    padding: 0;
}

.subscribe-button,
#place_order {
width: 100% !important;
    /*background: linear-gradient(135deg, #6b46c1 0%, #8b5cf6 100%) !important;*/
    background: #7f3f98 !important;
    background: #f87a3a !important;
    color: white !important;
    padding: 5px !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.2s !important;
    text-align: center;
    margin-top: 0px;
}

.subscribe-button:hover,
#place_order:hover {
    transform: translateY(-1px) !important;
    opacity: 0.95;
}

.subscribe-button.processing,
#place_order.processing {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none !important;
}

.subscribe-button:disabled,
#place_order:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* ===================================
   TERMS & CONDITIONS
   =================================== */

.woocommerce-terms-and-conditions-wrapper {
    margin: 20px 0;
}

.woocommerce-terms-and-conditions-wrapper label {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #6b46c1;
}

.woocommerce-privacy-policy-text {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
}

/* ===================================
   NOTICES & MESSAGES
   =================================== */

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-radius: 8px !important;
    border-left: 4px solid;
}

.woocommerce-error {
    background-color: #fef2f2 !important;
    border-left-color: #ef4444 !important;
    color: #991b1b !important;
}

.woocommerce-message {
    background-color: #f0fdf4 !important;
    border-left-color: #22c55e !important;
    color: #166534 !important;
}

.woocommerce-info {
    background-color: #eff6ff !important;
    border-left-color: #3b82f6 !important;
    color: #1e40af !important;
}

/* ===================================
   LOADING OVERLAY
   =================================== */

.woocommerce .blockUI.blockOverlay {
    background: rgba(255, 255, 255, 0.8) !important;
}

.woocommerce .loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6b46c1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   SELECT2 DROPDOWN STYLING
   =================================== */

/* Select2 Container */
.woocommerce-billing-fields .select2-container,
.woocommerce-shipping-fields .select2-container {
    width: 100% !important;
}

/* Select2 Selection Box */
.woocommerce-billing-fields .select2-container--default .select2-selection--single,
.woocommerce-shipping-fields .select2-container--default .select2-selection--single {
    height: auto !important;
    padding: 10px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background-color: white !important;
    transition: border-color 0.3s !important;
}

/* Select2 Selection Arrow */
.woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__arrow,
.woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 16px !important;
}

/* Select2 Selected Text */
.woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__rendered,
.woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    line-height: normal !important;
    color: #333 !important;
    font-size: 15px !important;
}

/* Select2 Placeholder */
.woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__placeholder,
.woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999 !important;
}

/* Select2 Focus State */
.woocommerce-billing-fields .select2-container--default.select2-container--focus .select2-selection--single,
.woocommerce-shipping-fields .select2-container--default.select2-container--focus .select2-selection--single,
.woocommerce-billing-fields .select2-container--default.select2-container--open .select2-selection--single,
.woocommerce-shipping-fields .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #6b46c1 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Select2 Dropdown */
.select2-container--default .select2-dropdown {
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    margin-top: 4px !important;
}

/* Select2 Search Box */
.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 10px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin: 8px !important;
    width: calc(100% - 16px) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #6b46c1 !important;
    outline: none !important;
}

/* Select2 Results */
.select2-container--default .select2-results__option {
    padding: 10px 12px !important;
    font-size: 14px !important;
}

/* Select2 Highlighted Option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #faf5ff !important;
    color: #6b46c1 !important;
}

/* Select2 Selected Option */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f3f4f6 !important;
    color: #333 !important;
}

/* Select2 No Results */
.select2-container--default .select2-results__option.select2-results__message {
    color: #999 !important;
}

/* Select2 Disabled State */
.woocommerce-billing-fields .select2-container--default.select2-container--disabled .select2-selection--single,
.woocommerce-shipping-fields .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Ensure Select2 works in 2-column layout */
#billing_country_field .select2-container,
#billing_postcode_field .select2-container,
#shipping_country_field .select2-container,
#shipping_postcode_field .select2-container {
    width: 100% !important;
}

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

@media (max-width: 1024px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    .order-review-box {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .checkout-container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .order-review-box,
    .checkout-form-box {
        padding: 25px;
    }

    .checkout-product-card {
        flex-direction: column;
        text-align: center;
    }

    .checkout-product-card .product-image {
        margin: 0 auto;
    }

    .wc_payment_methods {
        flex-direction: column;
    }

    .woocommerce-billing-fields .form-row-first,
    .woocommerce-billing-fields .form-row-last {
        width: 100% !important;
        float: none;
    }
}

@media (max-width: 480px) {
    .order-review-title {
        font-size: 20px !important;
        text-align: center;
    }

    .confidence-title
    {
        text-align: center;
    }

    .order-review-box,
    .checkout-form-box {
        padding: 20px;
    }

        .confidence-item {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .confidence-icon {
        margin: 0 auto;
    }


.checkout-form-box {
    margin: -35px 0px;
}

}

/* ===================================
   STRIPE ELEMENTS CUSTOM STYLING
   =================================== */

.wc-stripe-elements-field,
.wc-stripe-iban-element-field {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
}

/* ===================================
   ADDITIONAL CUSTOM CLASSES
   =================================== */

.custom-card-icons {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
}

.card-brand-icon {
    width: 32px;
    height: 20px;
    background-color: #f3f4f6;
    border-radius: 3px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Hide WooCommerce default styling that conflicts */
.woocommerce-checkout .woocommerce {
    background: transparent;
}

/*
.woocommerce-checkout #payment div.payment_box {
    background-color: #f9fafb;
    color: #666;
}
*/

.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #f9fafb;
}


.payment_method_stripe>fieldset, fieldset.wc-upe-form.wc-payment-form
{
    border-radius:10px !important;
    margin:0px !important;;
}


.content-area
{
    padding:0 !important;
}

.no-distraction-footer
{
    margin-top:0px !important;
}

.woocommerce .woocommerce-error li
{
	list-style:none;
}

ul.woocommerce-error {
    display: flex;
    gap: 10px;
    align-items: center;
}
.woocommerce .woocommerce-error
{
border: 2px solid #ab2b30 !important;
}

.woocommerce .woocommerce-error::before
{
	color:#ab2b30;
}






/* icons css */

.product-icon-boxes-wrapper {
    margin: 30px 0;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 8px;
}

.icon-boxes-heading {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.product-icon-boxes {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.icon-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: transform 0.2s ease;
}

.icon-box:hover {
    transform: translateX(5px);
}

.icon-box-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5b47fb;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.icon-box:hover .icon-box-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(91, 71, 251, 0.3);
}

.icon-box-content {
    flex: 1;
}

.icon-box-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.icon-box-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Alternative Layout - Horizontal Grid */
.product-icon-boxes.horizontal-layout {
    flex-direction: row;
    flex-wrap: wrap;
}

.horizontal-layout .icon-box {
    flex: 1;
    min-width: 250px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Alternative Icon Styles */
.icon-box-icon.style-square {
    border-radius: 8px;
}

.icon-box-icon.style-outlined {
    background: transparent;
    border: 2px solid #5b47fb;
    color: #5b47fb;
}

.icon-box-icon.style-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Color Variations */
.icon-box-icon.color-blue {
    background: #3498db;
}

.icon-box-icon.color-green {
    background: #2ecc71;
}

.icon-box-icon.color-orange {
    background: #e67e22;
}

.icon-box-icon.color-red {
    background: #e74c3c;
}

.icon-box-icon.color-purple {
    background: #9b59b6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-icon-boxes-wrapper {
        padding: 20px;
        margin: 20px 0;
    }
    
    .icon-boxes-heading {
        font-size: 20px;
    }
    
    .icon-box-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .icon-box-title {
        font-size: 15px;
    }
    
    .icon-box-description {
        font-size: 13px;
    }
    
    .horizontal-layout .icon-box {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .product-icon-boxes-wrapper {
        padding: 15px;
    }
    
    .icon-boxes-heading {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .product-icon-boxes {
        gap: 15px;
    }
    
    .icon-box {
        gap: 12px;
    }
}

/* Print Styles */
@media print {
    .product-icon-boxes-wrapper {
        background: white;
        border: 1px solid #ddd;
    }
    
    .icon-box-icon {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}