/**
 * Styles pour la modale de connexion lors des achats
 * Utilise exactement les mêmes styles que la modale de réservation des stages
 */

/* Empêcher le scroll du body quand la modale est ouverte */
body.waka-modal-open {
    overflow: hidden !important;
}

/* Modale principale - identique à waka-avatar-modal */
.waka-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.waka-checkout-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Overlay avec blur - identique à waka-avatar-modal-overlay */
.waka-checkout-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
}

/* Contenu de la modale - identique à waka-avatar-modal-content */
.waka-checkout-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.waka-checkout-modal.show .waka-checkout-modal-content {
    transform: scale(1);
}

/* Header de la modale */
.waka-checkout-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.waka-checkout-modal-header h3 {
    margin: 0;
    color: #3D3D3D;
    font-size: 24px;
    font-weight: 600;
}

/* Bouton de fermeture - identique à waka-avatar-modal-close */
.waka-checkout-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.waka-checkout-modal-close:hover {
    color: #C48738;
}

/* Corps de la modale */
.waka-checkout-modal-body {
    padding: 40px 30px;
}

/* Champs de formulaire */
.waka-checkout-form-group {
    margin-bottom: 20px;
}

.waka-checkout-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.waka-checkout-form-group input[type="email"],
.waka-checkout-form-group input[type="password"],
.waka-checkout-form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.waka-checkout-form-group input:focus {
    outline: none;
    border-color: #C48738;
    box-shadow: 0 0 0 2px rgba(196, 135, 56, 0.2);
}

/* Lien mot de passe oublié */
.waka-checkout-forgot-password {
    margin-top: 8px;
    text-align: right;
}

.waka-checkout-forgot-password a {
    color: #C48738;
    text-decoration: none;
    font-size: 13px;
}

.waka-checkout-forgot-password a:hover {
    text-decoration: underline;
}

/* Actions du formulaire */
.waka-checkout-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.waka-checkout-submit-btn,
.waka-checkout-cancel-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Bouton primaire (Se connecter / S'inscrire) */
.waka-checkout-submit-btn {
    background-color: #C48738;
    color: #fff;
}

.waka-checkout-submit-btn:hover:not(:disabled) {
    background-color: #a06d2e;
}

.waka-checkout-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Bouton secondaire / Annuler (beige clair) */
.waka-checkout-cancel-btn {
    background-color: #F6F1EB !important;
    color: #333 !important;
    border: 1px solid #EAE2D7 !important;
}

.waka-checkout-cancel-btn:hover {
    background-color: #EBE2D7 !important;
    border-color: #ddd !important;
    color: #333 !important;
}

/* Messages de formulaire */
.waka-checkout-form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.waka-checkout-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.waka-checkout-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Lien en bas de modale */
.waka-checkout-modal-footer-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.waka-checkout-modal-footer-link p {
    margin: 0;
}

.waka-checkout-modal-footer-link a {
    color: #C48738;
    text-decoration: none;
    cursor: pointer;
}

.waka-checkout-modal-footer-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 767px) {
    .waka-checkout-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .waka-checkout-modal-body {
        padding: 30px 20px;
    }
    
    .waka-checkout-form-actions {
        flex-direction: column;
    }
    
    .waka-checkout-submit-btn,
    .waka-checkout-cancel-btn {
        width: 100%;
    }
}
