/* the blur background */
body.active-modal {
    overflow: hidden;
}

.blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 999;
    backdrop-filter: blur(5px);

    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
    overflow-y: auto;
    
    /* Hide scrollbar for webkit browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers */
.blur::-webkit-scrollbar {
    display: none;
}


/* Popup box */
.popup-box {
    max-width: 500px;
    margin: auto;
    border-radius: 20px;
    background-color: #1a2b56;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    font-family: 'Segoe UI', sans-serif;
    color: white;
    overflow: visible;
    position: relative;
    margin-bottom: 5vh;
}

.popup-box .header-image {
    height: 281px;
    overflow: hidden;
    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
.label-image {
    position: absolute;
    top: 200px;
    width: 68%;
}

.popup-main-content {
    padding: 40px 60px 10px 60px;
}

.promo-text .title {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    letter-spacing: 1px;
}

.promo-text .subtitle {
    font-size: 16px;
    font-style: italic;
    margin: 4px 0;
    color: #555;
}

.promo-text .date {
    font-size: 14px;
    color: #777;
    margin-bottom: 16px;
}

.access-message {
    font-size: 24px;
    margin-bottom: 20px;
}

.continue-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #f4313d;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    transition: background-color 0.3s ease;
}

/* lighter color when hovering */
.continue-btn:hover {
    background-color: #ae0f16;
}

.code-section {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background-color: #055aaa;
    padding: 20px 40px;
    /* border-radius: 20px; */
    input {
        color: #000000;
    }
}

.payment-note {
    font-size: 16px;
    color: #ddd;
    margin-bottom: 12px;
}

.code-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

/* .code-section input {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    font-family: 'Courier New', monospace;
    text-align: center;
    letter-spacing: 2px;
    border: 2px solid #0078D4;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
} */

/* loading */
.access-code-wrapper {
    position: relative;
}

.icon-container {
    position: absolute;
    right: 10px;
    top: calc(50% - 10px);
    display: none;
}
.loader {
    position: relative;
    height: 20px;
    width: 20px;
    display: inline-block;
    animation: around 5.4s infinite;
}

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

.loader::after, .loader::before {
    content: "";
    background: white;
    position: absolute;
    display: inline-block;
    width: 100%;
    height: 100%;
    border-width: 2px;
    border-color: #333 #333 transparent transparent;
    border-style: solid;
    border-radius: 20px;
    box-sizing: border-box;
    top: 0;
    left: 0;
    animation: around 0.7s ease-in-out infinite;
}

.loader::after {
    animation: around 0.7s ease-in-out 0.1s infinite;
    background: transparent;
}
.code-section .code-error-message {
    color: #fa3f3f;
    font-size: 12px;
    font-weight:bold;
}
.wta-video-click-gate > div {
    margin-right: 0 !important;
}

.sign-in-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sign-in-form input {
    border-radius: 50px !important;
    background-color: #fff;
    color: #292a2e !important;
    padding: 12px 24px !important;
}

.sign-in-form button {
    border-radius: 50px !important;
    background-color: transparent;
    color: #292a2e !important;
    border: 1px solid #fff;
    color: #fff !important;
    padding: 12px 24px;
}

.circle-checkbox {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 24px;
    vertical-align: middle;
}
.circle-checkbox input[type="checkbox"] {
    opacity: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    cursor: pointer;
}
.circle-checkbox .custom-circle {
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.circle-checkbox input[type="checkbox"]:checked + .custom-circle {
    background: #055aaa;
    border-color: #fff;
}
.circle-checkbox .checkmark {
    display: none;
    width: 14px !important;
    height: 14px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    color: #fff !important;
    line-height: 1 !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
}
.circle-checkbox input[type="checkbox"]:checked + .custom-circle .checkmark {
    display: flex !important;
}

.opt-out {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.opt-out-label {
    font-size: 12px !important;
    color: #fff !important;
    text-align: left;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body.active-modal {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .blur {
        padding: 20px;
        align-items: flex-start;
        padding-top: 5vh;
        overflow-y: auto;
        
        /* Hide scrollbar for webkit browsers */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* Hide scrollbar for webkit browsers */
    .blur::-webkit-scrollbar {
        display: none;
    }
    
    .popup-box {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 15px;
        overflow: visible;
        margin-bottom: 5vh;
    }
    
    .popup-box .header-image {
        height: 200px;
    }
    
    .label-image {
        top: 140px;
        width: 60%;
    }
    
    .popup-main-content {
        padding: 25px 20px 10px 20px;
    }
    
    .promo-text .title {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .promo-text .subtitle {
        font-size: 14px;
    }
    
    .promo-text .date {
        font-size: 12px;
    }
    
    .access-message {
        font-size: 18px;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .continue-btn {
        padding: 14px;
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .code-section {
        padding: 20px 20px;
    }
    
    .payment-note {
        font-size: 14px;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .code-section label {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .sign-in-form input {
        padding: 14px 20px !important;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 25px !important;
    }
    
    .sign-in-form button {
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 25px !important;
    }
    
    .opt-out {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .opt-out-label {
        font-size: 11px !important;
        line-height: 1.4;
        text-align: left;
    }
    
    .circle-checkbox {
        width: 20px;
        height: 20px;
    }
    
    .circle-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .circle-checkbox .custom-circle {
        width: 20px;
        height: 20px;
    }
    
    .circle-checkbox .checkmark {
        width: 12px;
        height: 12px;
        font-size: 8px !important;
        font-weight: bold !important;
        color: #fff !important;
        line-height: 1 !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    body.active-modal {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .blur {
        padding: 15px;
        padding-top: 3vh;
        overflow-y: auto;
        
        /* Hide scrollbar for webkit browsers */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* Hide scrollbar for webkit browsers */
    .blur::-webkit-scrollbar {
        display: none;
    }
    
    .popup-box {
        border-radius: 12px;
        overflow: visible;
        margin-bottom: 5vh;
    }
    
    .popup-box .header-image {
        height: 160px;
    }
    
    .label-image {
        top: 110px;
        width: 55%;
    }
    
    .popup-main-content {
        padding: 20px 15px 10px 15px;
    }
    
    .promo-text .title {
        font-size: 20px;
    }
    
    .access-message {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .continue-btn {
        padding: 12px;
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    .code-section {
        padding: 15px 15px;
    }
    
    .payment-note {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .sign-in-form input {
        padding: 12px 16px !important;
        font-size: 16px;
    }
    
    .sign-in-form button {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .opt-out-label {
        font-size: 10px !important;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body.active-modal {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .blur {
        padding: 10px;
        align-items: flex-start;
        padding-top: 2vh;
        overflow-y: auto;
        
        /* Hide scrollbar for webkit browsers */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* Hide scrollbar for webkit browsers */
    .blur::-webkit-scrollbar {
        display: none;
    }
    
    .popup-box {
        overflow: visible;
        margin-bottom: 5vh;
    }
    
    .popup-box .header-image {
        height: 120px;
    }
    
    .label-image {
        top: 80px;
        width: 50%;
    }
    
    .popup-main-content {
        padding: 15px 20px 5px 20px;
    }
    
    .access-message {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .continue-btn {
        padding: 10px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .code-section {
        padding: 15px 20px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .continue-btn {
        min-height: 48px; /* Minimum touch target size */
    }
    
    .sign-in-form input,
    .sign-in-form button {
        min-height: 48px;
    }
    
    .circle-checkbox {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .circle-checkbox input[type="checkbox"] {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .popup-box {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .popup-box {
        background-color: #1a2b56;
    }
    
    .code-section {
        background-color: #055aaa;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .continue-btn {
        transition: none;
    }
    
    .loader {
        animation: none;
    }
    
    .loader::after,
    .loader::before {
        animation: none;
    }
}

/* Donation Amount Styles */
.donation-amounts {
    margin: 20px 0;
    text-align: center;
}

.donation-amounts h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.donation-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.donation-option {
    position: relative;
    cursor: pointer;
}

.donation-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.donation-amount {
    display: block;
    background: #f4313d;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 50px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    min-width: 60px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.donation-option:hover .donation-amount {
    background: #e02d37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 49, 61, 0.3);
}

.donation-option input[type="radio"]:checked + .donation-amount {
    background: #e02d37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 49, 61, 0.4);
}

/* Loading state for donation buttons */
.donation-amount.loading {
    cursor: not-allowed !important;
    position: relative;
    color: transparent !important;
}

.donation-amount.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hide radio button completely */
.donation-option input[type="radio"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    clip: rect(0, 0, 0, 0) !important;
}


/* Mobile responsive for donation options */
@media (max-width: 768px) {
    .donation-options {
        gap: 10px;
    }
    
    .donation-amount {
        font-size: 18px;
        padding: 12px 25px;
        min-width: 100px;
    }
    
}

@media (max-width: 480px) {
    .donation-options {
        gap: 8px;
    }
    
    .donation-amount {
        font-size: 16px;
        padding: 10px 20px;
        min-width: 80px;
    }
    
}