/**
 * Estilos para el Modal de Autenticación de Checkout
 */

.checkout-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.checkout-auth-modal--active {
    opacity: 1;
    visibility: visible;
}

.checkout-auth-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.checkout-auth-modal__content {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    padding: 2rem;
    z-index: 1;
}

.checkout-auth-modal--active .checkout-auth-modal__content {
    transform: scale(1);
}

.checkout-auth-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-light);
    border: none;
    border-radius: 50%;
    color: var(--color-gray-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.125rem;
    z-index: 2;
}

.checkout-auth-modal__close:hover {
    background: var(--color-gray-medium);
    color: var(--color-secondary);
    transform: scale(1.1);
}

.checkout-auth-modal__header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.checkout-auth-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 0.5rem 0;
}

.checkout-auth-modal__subtitle {
    font-size: 0.9375rem;
    color: var(--color-gray-dark);
    margin: 0;
}

.checkout-auth-modal__tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-gray-light);
}

.checkout-auth-modal__tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-gray-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.checkout-auth-modal__tab:hover {
    color: var(--color-primary);
}

.checkout-auth-modal__tab--active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.checkout-auth-modal__message {
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

.checkout-auth-modal__message--error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.checkout-auth-modal__message--success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.checkout-auth-modal__form {
    margin-top: 1rem;
}

.checkout-auth-modal__form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.checkout-auth-modal__form-group--password {
    position: relative;
}

.checkout-auth-modal__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    margin-bottom: 0.5rem;
}

.checkout-auth-modal__input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font-primary);
    border: 2px solid var(--color-gray-light);
    border-radius: var(--border-radius-md);
    transition: border-color var(--transition-base);
    box-sizing: border-box;
}

.checkout-auth-modal__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkout-auth-modal__input::placeholder {
    color: var(--color-gray-medium);
}

.checkout-auth-modal__password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-medium);
    padding: 0.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.checkout-auth-modal__password-toggle:hover {
    color: var(--color-primary);
}

.checkout-auth-modal__submit {
    margin-top: 1.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.checkout-auth-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-auth-modal__content {
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
    }

    .checkout-auth-modal__title {
        font-size: 1.25rem;
    }

    .checkout-auth-modal__subtitle {
        font-size: 0.875rem;
    }

    .checkout-auth-modal__tabs {
        gap: 0.25rem;
    }

    .checkout-auth-modal__tab {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
}

