/* Interactive Components Styles */

/* Pricing table header on checkout - simplify */
#brxe-56cb66,
#brxe-247cb1 {
    display: none;
}

/* Account Selection Styles (Simplified) */
.challenge-selector {
    position: relative;
}

/* Selected Product Header */
.osp-selected-product {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.osp-selected-product-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffffffe8;
    line-height: 1.3;
}

.osp-edit-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: var(--osp-primary-color);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.osp-edit-product-btn:hover {
    background: var(--osp-secondary-color);
    color: #fff;
}

.osp-edit-product-btn svg {
    flex-shrink: 0;
}

/* Hide edit button when selectors are expanded */
.challenge-selector.editing .osp-edit-product-btn {
    display: none;
}

/* Step sections container - hidden by default, shown on edit */
.challenge-selector .step-sections {
    position: relative;
    display: none;
}

.challenge-selector .step-sections.expanded {
    display: block;
}

.account-size-selector,
.challenge-step-selector {
    margin-bottom: 30px;
}

.addons-title,
.challenge-selector h4 {
    font-size: 18px;
    font-weight: 600;
    color: #fffffff0;
    margin-bottom: 15px;
}

.addons-title {
    border-top: 1px solid var(--osp-divider-color);
    padding-top: 30px;
    padding-bottom: 10px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    padding: 13px 28px;
    background: #19202e;
    border: 1px solid rgb(255 255 255 / 22%);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: fit-content;
    position: relative;
    margin-bottom: 0;
    color: #ffffffab;
}

.popular-badge,
.new-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 99px;
    white-space: nowrap;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popular-badge {
    background: var(--osp-primary-color);
}

.new-badge {
    background: #ffa806;
}

.radio-label:hover {
    border-color: white;
    color: white;
}

.radio-label.selected {
    border-color: #ffffff78;
    background: rgb(26 160 238);
    color: #ffffff;
}

.radio-label input {
    display: none;
}

.radio-text {
    font-weight: 600;
    color: inherit;
    font-size: 15px;
}

.selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(5 13 28 / 63%);
    z-index: 1000;
}

.selector-spinner {
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: selector-spin 0.6s linear infinite;
}

@keyframes selector-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Coupon Loading Overlay */
.osp-3sc-coupon-section {
    position: relative;
}

.coupon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(5 13 28 / 63%);
    z-index: 1000;
}

.coupon-spinner {
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: selector-spin 0.6s linear infinite;
}

/* Enhanced WooCommerce Native Overlay for Place Order */
body.osp-place-order-processing .woocommerce .blockUI.blockOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    background: rgb(5 13 28 / 80%) !important;
    backdrop-filter: blur(2px);
}

body.osp-place-order-processing .woocommerce .blockUI.blockOverlay:before {
    width: 50px !important;
    height: 50px !important;
    border: 3px solid transparent !important;
    border-top-color: #ffffff !important;
    border-radius: 50% !important;
    animation: selector-spin 0.8s linear infinite !important;
    margin-left: -25px !important;
    margin-top: -40px !important;
    background: none !important;
    font-size: 1em !important;
}

body.osp-place-order-processing .woocommerce .blockUI.blockOverlay:after {
    content: "Your order is being processed..." !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(20px) !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
}

/* Hide one-time fees for VIP products */
body.has-vip-product .osp-3sc-one-time-fee {
    display: none !important;
}

/* Hide cart subtotal and recurring totals for VIP products */
body.has-vip-product .cart-subtotal,
body.has-vip-product .recurring-totals,
body.has-vip-product tr.cart-subtotal,
body.has-vip-product tr.recurring-totals,
body.has-vip-product .woocommerce-checkout-review-order-table .cart-subtotal,
body.has-vip-product .woocommerce-checkout-review-order-table .recurring-totals {
    display: none !important;
}

/* VIP Sidebar Management - Hide sidebar for VIP products on step 1 initially */
body.has-vip-product .osp-3sc-sidebar {
    display: none;
}

/* VIP Sidebar - Show when not on step 1 (controlled by JavaScript) */
body.has-vip-product .osp-3sc-sidebar.osp-vip-sidebar-visible {
    display: flex;
}

/* VIP Content - Full width when sidebar is hidden */
body.has-vip-product .osp-3sc-checkout-container {
    gap: 30px;
}

body.has-vip-product .osp-3sc-sidebar:not(.osp-vip-sidebar-visible) + .osp-3sc-main-content,
body.has-vip-product .osp-3sc-main-content:only-child {
    max-width: 100%;
}

/* Checkout Add-ons Styling */
#wc_checkout_add_ons input[type="checkbox"] {
    position: relative;
    width: 28px;
    height: 28px;
    margin: 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 6px;
    background: rgb(25 32 46);
    transition: all 0.3s ease;
}

#wc_checkout_add_ons input[type="checkbox"]:checked {
    background: rgb(26 160 238);
    border-color: rgb(255 255 255 / 67%);
}

#wc_checkout_add_ons input[type="checkbox"]:checked::after {
    content: url("data:image/svg+xml,%3Csvg%20width=%2211%22%20height=%228%22%20viewBox=%220%200%2011%208%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M3.79862%205.95955C3.56125%206.1967%203.17661%206.19661%202.93935%205.95935L1.23284%204.25284C0.992563%204.01256%200.603211%204.01188%200.362087%204.2513V4.2513C0.119756%204.49193%200.119063%204.88366%200.360543%205.12514L2.79623%207.56083C3.1125%207.87709%203.62527%207.87709%203.94153%207.56083L10.3317%201.17062C10.5718%200.930539%2010.5718%200.541287%2010.3317%200.301203V0.301203C10.0917%200.0612002%209.70264%200.0611083%209.46252%200.300998L3.79862%205.95955Z%22%20fill=%22white%22/%3E%3C/svg%3E");
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#wc_checkout_add_ons input[type="checkbox"]:hover {
    border-color: rgb(255, 255, 255);
}

#wc_checkout_add_ons .woocommerce-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.woocommerce form #wc_checkout_add_ons .form-row {
    margin: 0 0 10px;
    padding: 0;
}

#wc_checkout_add_ons .checkbox {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #ffffffb5;
    font-weight: 500;
}


/* Desktop styles: Price next to title */
#wc_checkout_add_ons .form-row label.checkbox {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /* Changed from flex-start to center */
}

#wc_checkout_add_ons .form-row label.checkbox .woocommerce-input-wrapper {
    margin-right: 10px;
    flex-shrink: 0;
}

#wc_checkout_add_ons .form-row label.checkbox .addon-content {
    display: flex;
    flex-grow: 1;
}

#wc_checkout_add_ons .addon-price {
    white-space: nowrap;
    margin-left: 10px;
    color: white;
}

/* Mobile styles: Price floats to the right */
@media (max-width: 767px) {

    /* Adjust breakpoint as needed */
    #wc_checkout_add_ons .form-row label.checkbox .addon-content {
        justify-content: space-between;
        /* Pushes title and price apart on mobile */
    }

    #wc_checkout_add_ons .addon-title {
        flex-grow: 1;
        /* Allows title to take available space, pushing price */
        line-height: 20px;
        /* Added line-height for mobile */
        display: flex;
        align-items: center;
    }

    #wc_checkout_add_ons .addon-price {
        text-align: right;
        margin-left: 20px;
        display: flex;
        align-items: center;
    }
}

/* VIP Functionality Styles */

/* VIP Logged-in Message Styles */
.osp-3sc-logged-in-message {
    background-color: #f8f9fa;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
}

.osp-3sc-logged-in-message p {
    margin: 0 0 10px 0;
    color: #495057;
    line-height: 1.5;
}

.osp-3sc-logged-in-message p:last-child {
    margin-bottom: 0;
}

.osp-3sc-logged-in-message p strong {
    color: #28a745;
}

.osp-3sc-logged-in-icon {
    display: inline-block;
    margin-bottom: 15px;
}

/* VIP Login Section Styles */
.osp-3sc-login-section {
    text-align: center;
    margin: 20px 0;
}

.osp-3sc-vip-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.osp-3sc-continue-btn {
    background-color: var(--osp-primary-color);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    order: 1;
}

.osp-3sc-continue-btn:hover {
    background-color: var(--osp-secondary-color);
    transform: translateY(-1px);
}

.osp-3sc-login-popup-btn {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    order: 2;
    height: auto;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.osp-3sc-login-popup-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.osp-3sc-first-time-text {
    color: #ffffff;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 0;
    line-height: 1.4;
    font-weight: 500;
}

/* VIP Login Popup Styles */
.osp-3sc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 13, 28, 0.85);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.osp-3sc-popup-content {
    background: #061225;
    border: var(--osp-border-width) solid var(--osp-border-color);
    border-radius: var(--osp-border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.osp-3sc-popup-header {
    padding: 35px 40px 20px 40px;
    border-bottom: 1px solid var(--osp-divider-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    position: relative;
}

.osp-3sc-popup-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    flex: 1;
    text-align: center;
    line-height: 1.3;
}

.osp-3sc-popup-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.osp-3sc-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.osp-3sc-popup-body {
    padding: 30px 40px 40px 40px;
}

/* Responsive adjustments for VIP actions */
@media (max-width: 767px) {
    .osp-3sc-vip-actions {
        gap: 12px;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .osp-3sc-continue-btn,
    .osp-3sc-login-popup-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* VIP content adjustments when sidebar is hidden */
    body.has-vip-product .osp-3sc-sidebar:not(.osp-vip-sidebar-visible) ~ .osp-3sc-main-content {
        padding: 30px 20px;
    }

    /* VIP popup mobile adjustments */
    .osp-3sc-popup-overlay {
        padding: 15px;
    }
    
    .osp-3sc-popup-header {
        padding: 25px 25px 15px 25px;
    }
    
    .osp-3sc-popup-header h3 {
        font-size: 20px;
    }
    
    .osp-3sc-popup-close {
        right: 25px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .osp-3sc-popup-body {
        padding: 20px 25px 30px 25px;
    }
}

/* Checkout Error Page Styles */
.osp-checkout-error-wrapper {
    text-align: center;
    padding: 60px 30px;
    max-width: 600px;
    margin: 0 auto;
}

.osp-checkout-error-wrapper p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 35px;
}

.osp-checkout-error-wrapper .button {
    font-size: 16px;
    padding: 15px 30px;
    background-color: var(--osp-primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.osp-checkout-error-wrapper .button:hover {
    background-color: var(--osp-secondary-color);
    transform: translateY(-1px);
    color: white;
}

@media (max-width: 767px) {
    .osp-checkout-error-wrapper {
        padding: 40px 20px;
    }
    
    .osp-checkout-error-wrapper p {
        font-size: 18px;
        margin-bottom: 30px;
    }
    
    .osp-checkout-error-wrapper .button {
        font-size: 15px;
        padding: 12px 24px;
    }
}

/* Special Offer Banner Styles */
.osp-special-offer-banner {
    margin: 40px auto 30px auto;
    padding: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--osp-primary-color) 0%, var(--osp-secondary-color) 100%);
    position: relative;
    overflow: hidden;
    max-width: 1340px;
    width: 100%;
}

.osp-special-offer-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.osp-banner-content {
    padding: 25px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.osp-offer-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.osp-banner-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.osp-banner-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

.highlight-free {
    font-weight: 700;
}

.highlight-account {
    font-weight: 700;
}

/* Responsive adjustments for banner */
@media (max-width: 767px) {
    .osp-special-offer-banner {
        margin: 30px 20px 20px 20px;
        max-width: calc(100% - 40px);
    }
    
    .osp-banner-content {
        padding: 20px 20px;
    }
    
    .osp-offer-badge {
        font-size: 11px;
        padding: 5px 10px;
        margin-bottom: 12px;
    }
    
    .osp-banner-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .osp-banner-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .osp-special-offer-banner {
        margin: 25px 15px 15px 15px;
        max-width: calc(100% - 30px);
    }
    
    .osp-banner-content {
        padding: 18px 15px;
    }
    
    .osp-offer-badge {
        font-size: 10px;
        padding: 4px 8px;
        margin-bottom: 10px;
    }
    
    .osp-banner-title {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .osp-banner-description {
        font-size: 13px;
    }
}

/* Policy Modal Overrides (extends .osp-3sc-popup-*) */
.osp-3sc-popup-overlay--policy .osp-3sc-popup-content {
    max-width: 680px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-header {
    padding: 16px 24px;
    flex-shrink: 0;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-header h3 {
    font-size: 18px;
    text-align: left;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-close {
    position: static;
    transform: none;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-body h1,
.osp-3sc-popup-overlay--policy .osp-3sc-popup-body h2,
.osp-3sc-popup-overlay--policy .osp-3sc-popup-body h3,
.osp-3sc-popup-overlay--policy .osp-3sc-popup-body h4 {
    color: #fff;
    margin: 20px 0 10px;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-body h1:first-child,
.osp-3sc-popup-overlay--policy .osp-3sc-popup-body h2:first-child {
    margin-top: 0;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-body p {
    margin: 0 0 12px;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-body a {
    color: #62cbff;
}

.osp-3sc-popup-overlay--policy .osp-3sc-popup-body ul,
.osp-3sc-popup-overlay--policy .osp-3sc-popup-body ol {
    padding-left: 20px;
    margin: 0 0 12px;
}

@media (max-width: 600px) {
    .osp-3sc-popup-overlay--policy .osp-3sc-popup-content {
        width: 95%;
        max-height: 85vh;
    }

    .osp-3sc-popup-overlay--policy .osp-3sc-popup-header {
        padding: 14px 18px;
    }

    .osp-3sc-popup-overlay--policy .osp-3sc-popup-header h3 {
        font-size: 16px;
    }

    .osp-3sc-popup-overlay--policy .osp-3sc-popup-body {
        padding: 18px;
        font-size: 13px;
    }
}
