.modal-payment {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #00000071;
    backdrop-filter: blur(7px);
    z-index: 10000;
    display: flex;
    justify-content: center; 
    align-items: center;
    overscroll-behavior: contain;
    overflow-y: auto; /* Allow modal to scroll if content is tall */
}

.modal-payment .modal-payment-content {
    width: 100%;
    max-width: 400px;
    height: max-content;
    border-radius: 12px;
    background-color: #fff; 
    border: none; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.modal-payment .modal-payment-content .header-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.modal-payment .modal-payment-content .header-modal .checkout-title {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    background: none;
    transform: none;
}

.modal-payment .modal-payment-content .header-modal span{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 10px;
}

.modal-payment .modal-payment-content .header-modal span h3{
    font-size: 1em;
    font-weight: 400;
}

.modal-payment .modal-payment-content .header-modal span i{
    font-size: 1.5em;
    cursor: pointer;
}

.cancel-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.cancel-link:hover {
    color: #374151;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .modal-payment .modal-payment-content {
        width: 95%;
        margin: 0 auto;
        max-height: 85vh; 
        overflow-y: auto; 
    }
    
    .modal-payment .modal-payment-content .upsell-container {
        margin-bottom: 10px; 
        padding: 5px 0;
    }

    .phone-input-group.floating-label-group label, 
    .floating-label-group label {
        font-size: 0.85em; 
    }
}

.modal-payment .modal-payment-content .header-modal .target-quantity{
    padding: 10px 15px;
    border: none;
}

.modal-payment .modal-payment-content .header-modal .target-quantity p{
    width: 100%;
    display: flex;
    font-size: .8em;
    padding: 7px;
    border: solid 1px #9eeaf9;
    border-radius: 7px;
    background-color: #cff4fc;
    color: #055160;
    font-weight: 300;
}

.modal-payment .modal-payment-content .header-modal .target-quantity p .quantity-selected{
    border: none;
    margin-right: -9px;
}

.modal-payment .modal-payment-content .form-1{
    padding: 0 20px 0px 20px;
}

.modal-payment .modal-payment-content .form-1 label{
    font-size: .9em;
    font-weight: 500;
    color: #1f1f1f;
    display: block;
    margin: -3px 0 7px 0;
}

.modal-payment .modal-payment-content .form-1 #phone{
    width: 100%;
    border-radius: 8px;
    font-size: .9em;
    font-weight: 400;
    padding: 9px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .05);
}

.modal-payment .modal-payment-content .form-1 .order-bump{
    border-radius: 10px;
    margin-top: 7px;
    background-color: #fff3cd;
    border: solid 1px #ffe69c;
    padding: 8px 15px 0 15px;
}

.modal-payment .modal-payment-content .form-1 .order-bump span{
    display: flex;
    width: 100%;
}

.modal-payment .modal-payment-content .form-1 .order-bump span input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border: 1px solid #664d03; 
    border-radius: 50%;
    padding: 6px;
    cursor: pointer;
    position: relative;
}

.modal-payment .modal-payment-content .form-1 .order-bump span input[type="checkbox"]:checked {
    background-color: #664d03; 
    border-radius: 50%; 
}

.modal-payment .modal-payment-content .form-1 .order-bump span input[type="checkbox"]:checked::after {
    content: '\2714'; 
    color: #fff; 
    font-size: .9em; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-payment .modal-payment-content .form-1 .order-bump span label{
    display: flex;
    margin-top: -3px;
    font-size: .8em;
    font-weight: 300;
    color: #664d03;
    padding-left: 5px;
    cursor: pointer;
}

.modal-payment .modal-payment-content .form-1 .order-bump span label .target-order-bump{
    padding: 1px 3px;
    margin-left: 3px;
    font-weight: 400;
    font-size: 1.1em;
    margin-bottom: -10px;

}

.modal-payment .modal-payment-content .form-1 .order-bump span label .target-order-bump .quantity-order-bump{
    padding: 0 3px 0 3px;
}

.modal-payment .modal-payment-content .form-1 button{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: none;
    border-radius: 7px;
    background-color: #0d6efd;
    color: #fff;
    font-size: 1em;
    font-weight: 500;
    padding: 10px 0;
    cursor: pointer;
    margin-top: 7px;
    outline: none;
}

.modal-payment .modal-payment-content .form-1 button i{
    padding-left: 7px;
}

.modal-payment .modal-payment-content .form-1 h4{
    font-size: .85em;
    font-weight: 300;
    color: #0000008c;
    margin-top: 7px;
    line-height: 1.2em;
    padding-bottom: 10px;
}

.modal-payment .modal-payment-content .form-2{
    padding: 0 20px 20px 20px;
    max-height: 70vh;
    overflow: auto;
}

.modal-payment .modal-payment-content .form-2 p{
    background-color: #fff3cd;
    border: solid 1px #ffe69c;
    border-radius: 7px;
    padding: 7px;
    font-size: .8em;
    color: #664d03;
    margin: 0 0 9px 0;
}

.modal-payment .modal-payment-content .form-2 label{
    font-size: .8em;
    font-weight: 400;
    color: #9ca3af;
    display: block;
    margin: 0;
}

.modal-payment .modal-payment-content .form-2 input{
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 400;
    color: #6b7280;
    padding: 10px;
}

.modal-payment .modal-payment-content .form-2 fieldset {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 10px;
    margin-bottom: 15px;
}

.modal-payment .modal-payment-content .form-2 legend {
    font-size: 0.8em;
    color: #9ca3af;
    padding: 0 5px;
    margin-left: 10px;
}

.modal-payment .modal-payment-content .form-2 #cpf-register[readonly]{
    pointer-events: none;
    opacity: 0.7;
}

.phone-input-group:focus-within {
    border-color: #3b82f6 !important;
    transition: border-color .15s ease-in-out;
}

.password-container:focus-within {
    border-color: #3b82f6 !important;
    transition: border-color .15s ease-in-out;
}

.modal-payment .modal-payment-content .form-2 fieldset:focus-within {
    border-color: #3b82f6;
}

.modal-payment .modal-payment-content .form-2 input {
    outline: none;
    height: auto !important;
    line-height: normal !important;
    display: flex;
    align-items: center;
    margin: 0;
    
    padding: 12px;
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    .modal-payment .modal-payment-content .form-2 input {
        padding: 12px;
        font-size: 1.1rem;
    }
}

.phone-input-group input:focus,
.password-container input:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

.floating-label-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-label-group input {
    height: 48px;
    padding: 12px 10px;
}

.floating-label-group label {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background-color: transparent;
    padding: 0 4px;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    font-size: 0.9em;
    z-index: 10;
}

.floating-label-group input:focus + label,
.floating-label-group input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%) scale(0.9);
    font-size: 0.85em;
    padding: 0 5px;
    height: auto;
    line-height: 1;
}
.floating-label-group input:focus + label {
    color: #0d6efd !important;
}

.modal-payment .modal-payment-content .form-2 button{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: none;
    border-radius: 8px;
    background-color: #9ca3af;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 15px 0;
    cursor: pointer;
    margin-top: 7px;
    transition: background-color 0.2s ease;
}

.modal-payment .modal-payment-content .form-2 button:hover {
    background-color: #6b7280;
}

.modal-payment .modal-payment-content .form-2 .btn-register {
    width: 100%;
    background-color: #9ca3af;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    outline: none;
    transition: background-color 0.2s ease;
}

.modal-payment .modal-payment-content .form-2 .btn-register:hover {
    background-color: #6b7280;
}

.modal-payment .modal-payment-content .form-2 button i{
    padding-left: 7px;
}

.modal-payment .modal-payment-content .form-3{
    padding: 0 20px 20px 20px;
}

.modal-payment .modal-payment-content .form-3 .target-user-registered{
    background-color: #d4edda;
    color: #155724;
    font-size: .8em;
    margin: 0 0 7px 0;
    padding: 7px 0 7px 20px;
    border-radius: 7px;
    border: solid 1px #1557245e;
    font-weight: 300;
}

.modal-payment .modal-payment-content .form-3 label{
    font-size: .9em;
    font-weight: 500;
    display: block;
    margin: -3px 0 7px 0;
}

.modal-payment .modal-payment-content .form-3 #phone3{
    width: 100%;
    border: solid 1px #0000003b;
    border-radius: 8px;
    font-size: .9em;
    font-weight: 400;
    padding: 9px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .05);
    pointer-events: none;
}

.modal-payment .modal-payment-content .form-3 button{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: none;
    border-radius: 7px;
    background-color: #0d6efd;
    color: #fff;
    font-size: 1em;
    font-weight: 500;
    padding: 10px 0;
    cursor: pointer;
    margin-top: 7px;
}

.modal-payment .modal-payment-content .form-3 button i{
    padding-left: 7px;
}

@media only screen and (max-width: 789px) {
    .modal-payment .modal-payment-content {
        width: 95%;
    }

    .modal-payment .modal-payment-content .header-modal .target-quantity p{
        padding: 7px 0;

    }

    .modal-payment .modal-payment-content .header-modal .target-quantity p{
        font-size: .7em;
    }

    .modal-payment .modal-payment-content .form-3 .target-user-registered{
        font-size: .7em;
    }

    .modal-payment .modal-payment-content .form-1 button{
        margin-top: 0;
    }
}

.modal-payment .modal-payment-content .upsell-container {
    padding: 5px 0;
    text-align: center;
    margin-bottom: 15px;
}

.modal-payment .modal-payment-content .upsell-header h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: #333;
}

.modal-payment .modal-payment-content .upsell-header p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.upsell-header-gradient {
    background: -webkit-gradient(linear,left top,right top,from(#a13838),to(#e25a8b)) !important;
    background: linear-gradient(to right, #a13838, #e25a8b) !important;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

.blink-animation {
    animation: blink-text 2s infinite;
}

@keyframes blink-text {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.modal-payment .modal-payment-content .upsell-options {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modal-payment .modal-payment-content .upsell-option {
    position: relative;
    box-shadow:rgba(0, 0, 0, 0.2) 0px 0px 2px 0px, rgba(0, 0, 0, 0.12) 0px 12px 24px -4px;
    z-index: 0;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 100%;
    margin-bottom: 4px;
    color: rgba(0, 0, 0, 0.87);
    display: flex;
    flex-direction: row;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(to right, rgb(253, 169, 45) 45%, rgb(254, 214, 128));
    border-radius: 12px;
    padding: 6px 10px; 
    border: 1px solid transparent;
    animation: pulse-upsell 2s ease-in-out infinite;
}

@keyframes pulse-upsell {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


.modal-payment .modal-payment-content .upsell-option.selected {
    background: linear-gradient(to right, rgb(121, 57, 8) 45%, rgb(254, 214, 128));
    color: #fff !important;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 2px 0px, rgba(0, 0, 0, 0.12) 0px 12px 24px -4px;
}

.modal-payment .modal-payment-content .upsell-option.selected .option-info {
    color: #fff;
}

.modal-payment .modal-payment-content .upsell-option:hover {
    box-shadow: rgba(145, 158, 171, 0.25) 0px 0px 3px 0px, rgba(145, 158, 171, 0.15) 0px 16px 32px -4px;
}

.modal-payment .modal-payment-content .option-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.modal-payment .modal-payment-content .option-info {
    flex: 1;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0 6px;
}

.modal-payment .modal-payment-content .option-info strong {
    font-weight: 700;
}

.modal-payment .modal-payment-content .option-discount {
    flex-shrink: 0;
    background: #10b981;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 6px;
}

.modal-payment .modal-payment-content .badge-discount {
    background-color: #008000;
}

.modal-payment .modal-payment-content .switch-upsell {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.modal-payment .modal-payment-content .switch-upsell input {
    opacity: 0;
    width: 0;
    height: 0;
}

.modal-payment .modal-payment-content .slider-upsell {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #9ca3af;
    transition: .3s;
    border-radius: 34px;
    border: none;
}

.modal-payment .modal-payment-content .slider-upsell:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    top: auto;
    transform: none;
}

.modal-payment .modal-payment-content input:checked + .slider-upsell {
    background-color: #fff;
    opacity: 0.9;
}

.modal-payment .modal-payment-content input:checked + .slider-upsell:before {
    transform: translateX(20px);
    background-color: #333;
    width: 18px;
    height: 18px;
}

.floating-input-wrapper fieldset {
    position: relative;
}

.floating-input-wrapper .floating-label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.2s ease;
    background: white;
    padding: 0 6px;
    z-index: 2;
}

.floating-input-wrapper input:focus ~ .floating-label,
.floating-input-wrapper input:not(:placeholder-shown) ~ .floating-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #9ca3af;
    left: 15px;
}

.floating-input-wrapper div:has(input:focus) ~ .floating-label,
.floating-input-wrapper div:has(input:not(:placeholder-shown)) ~ .floating-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #9ca3af;
    left: 15px;
}

.floating-input-wrapper fieldset:focus-within {
    border-color: #3b82f6;
}

.secure-purchase-badge {
    border-top: 1px solid #e5e7eb;
    padding: 7px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.secure-purchase-badge .font-semibold {
    font-weight: 700;
    color: #000;
    margin-left: 4px;
    margin-right: 5px;
}

.secure-purchase-badge svg {
    color: #22c55e;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

/* Nuclear option for scroll locking */
html.no-scroll {
    overflow: hidden !important;
    height: 100% !important;
}

body.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    /* Height must NOT be 100% or it clips content when shifted up */
}
