/* Checkout Auth Modal */
.checkout-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 16000;
    display: none;
    align-items: center;
    justify-content: center;
}

.checkout-auth-modal.is-visible {
    display: flex;
}

.checkout-auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 15, 28, 0.65);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkout-auth-modal.is-visible .checkout-auth-overlay {
    opacity: 1;
}

.checkout-auth-dialog {
    position: relative;
    width: min(480px, calc(100vw - 32px));
    max-height: min(740px, calc(100vh - 32px));
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow-y: auto;
}

.checkout-auth-modal.is-visible .checkout-auth-dialog {
    transform: translateY(0);
    opacity: 1;
}

.checkout-auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(99, 102, 241, 0.08);
    color: #4C1D95;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.checkout-auth-close:hover {
    background: rgba(99, 102, 241, 0.2);
}

.checkout-auth-content {
    position: relative;
}

.checkout-auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.checkout-auth-eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #818CF8;
    margin: 0 0 8px;
    display:none;
}

.checkout-auth-header h2 {
    font-size: 20px;
    margin: 0 0 6px;
    color: #111827;
}

.checkout-auth-header p {
    margin: 0;
    color: #6B7280;
    font-size: 15px;
}

.checkout-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: #F3F4F6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.checkout-auth-tab {
    border: none;
    background: transparent;
    border-radius: 10px;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-auth-tab.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.checkout-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-auth-field label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
    display: block;
}

.checkout-auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    font-size: 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.checkout-auth-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.checkout-auth-password-field {
    position: relative;
}

.checkout-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-auth-password-toggle .icon-eye-off {
    display: none;
}

.checkout-auth-password-toggle.is-visible .icon-eye {
    display: none;
}

.checkout-auth-password-toggle.is-visible .icon-eye-off {
    display: block;
}

.checkout-auth-alert {
    display: none;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.checkout-auth-submit {
    position: relative;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--button-color);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.checkout-auth-submit:hover:not(:disabled) {
    transform: translateY(-2px);
}

.checkout-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
    color: #9CA3AF;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.checkout-auth-divider::before,
.checkout-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.checkout-auth-divider span {
    white-space: nowrap;
}

.checkout-auth-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkout-auth-social-btn {
    flex: 1 1 calc(50% - 5px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    background: #fff;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.checkout-auth-social-btn svg {
    flex-shrink: 0;
}

.checkout-auth-social-btn:hover {
    border-color: #6366F1;
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.12);
}

.checkout-auth-social-btn.is-google {
    color: #111827;
}

.checkout-auth-social-btn.is-facebook {
    color: #111827;
}

@keyframes checkoutAuthSpin {
    to { transform: rotate(360deg); }
}

.checkout-auth-link {
    background: none;
    border: none;
    color: var(--link-color);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.checkout-auth-switch-row {
    text-align: center;
    font-size: 14px;
    color: #6B7280;
}

.checkout-auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.checkout-auth-status {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    text-align: center;
}

.checkout-auth-status.is-visible {
    display: flex;
}

.checkout-auth-status .status-card {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.checkout-auth-status .status-indicator {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #EEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-auth-status .status-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #C7D2FE;
    border-top-color: #6366F1;
    animation: checkoutAuthSpin 0.9s linear infinite;
}

.checkout-auth-status .status-check {
    display: none;
    color: #10B981;
}

.checkout-auth-status.is-success .status-indicator {
    background: #DCFCE7;
}

.checkout-auth-status.is-success .status-spinner {
    display: none;
}

.checkout-auth-status.is-success .status-check {
    display: inline-flex;
}

.checkout-auth-status .status-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 8px 0 0;
}

.checkout-auth-status .status-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

body.checkout-auth-open {
    overflow: hidden;
    padding-right: var(--checkout-scrollbar-comp, 0px);
}

body.checkout-auth-open .etinion-custom-header {
    margin-right: calc(-1 * var(--checkout-scrollbar-comp, 0px));
}

@media (max-width: 520px) {
    .checkout-auth-dialog {
        margin: 0 16px;
        padding: 24px 20px;
        border-radius: 18px;
        max-height: calc(70vh - 24px);
    }
}
