/**
 * Styles pour le modal HelloAsso Checkout
 * 
 * @version 1.0.0
 * @date 2025-12-13
 */

/* Overlay de chargement */
.checkout-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.checkout-loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.checkout-loading-overlay p {
    margin-top: 1rem;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Overlay de statut (succès, vérification) */
.checkout-status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.checkout-status-content {
    text-align: center;
    padding: 2rem;
}

.checkout-status-content .spinner-border {
    width: 3rem;
    height: 3rem;
}

.checkout-status-content h5 {
    margin-top: 1rem;
    font-weight: 600;
}

.checkout-status-content .bi-check-circle {
    animation: scaleIn 0.5s ease-out;
}

/* Loader d'initialisation */
.helloasso-init-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.helloasso-init-loader .spinner-border {
    width: 3rem;
    height: 3rem;
}

.helloasso-init-loader p {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Animations */
@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Bouton de paiement HelloAsso (style amélioré) */
.btn-helloasso-pay {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.btn-helloasso-pay:hover {
    background: linear-gradient(135deg, #0096c7 0%, #005f8e 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 119, 182, 0.4);
    transform: translateY(-2px);
}

.btn-helloasso-pay:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.3);
}

.btn-helloasso-pay i {
    margin-right: 0.5rem;
}

/* Badge HelloAsso */
.badge-helloasso {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card de paiement */
.helloasso-payment-card {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.helloasso-payment-card:hover {
    border-color: #00b4d8;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.15);
    transform: translateY(-2px);
}

.helloasso-payment-card .payment-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0077b6;
    margin-bottom: 0.5rem;
}

.helloasso-payment-card .payment-description {
    color: #6c757d;
    margin-bottom: 1rem;
}

.helloasso-payment-card .payment-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.helloasso-payment-card .payment-status.pending {
    background: #fff3cd;
    color: #856404;
}

.helloasso-payment-card .payment-status.completed {
    background: #d1e7dd;
    color: #0f5132;
}

/* Responsive */
@media (max-width: 768px) {
    #helloassoCheckoutModal .modal-dialog {
        max-width: 100%;
        height: 100vh;
        margin: 0;
    }

    #helloassoCheckoutModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }

    #helloassoCheckoutModal .modal-header {
        border-radius: 0;
    }

    .helloasso-payment-card {
        padding: 1rem;
    }

    .helloasso-payment-card .payment-amount {
        font-size: 1.25rem;
    }
}

/* Dark mode support (optionnel) */
@media (prefers-color-scheme: dark) {
    #helloassoCheckoutModal .modal-content {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    #helloassoCheckoutModal .modal-header {
        background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    }

    #helloassoCheckoutModal .modal-footer {
        background-color: #2a2a2a;
        border-top-color: #3a3a3a;
    }

    .checkout-loading-overlay,
    .checkout-status-overlay {
        background: rgba(26, 26, 26, 0.95);
        color: #e0e0e0;
    }

    .helloasso-payment-card {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
    }

    .helloasso-payment-card:hover {
        border-color: #00b4d8;
        background-color: #2f2f2f;
    }
}

/* Accessibilité */
.btn-helloasso-pay:focus,
#helloassoCheckoutModal .btn-close:focus {
    outline: 2px solid #00b4d8;
    outline-offset: 2px;
}

/* Animation de pulse pour attirer l'attention */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 180, 216, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 180, 216, 0);
    }
}

.btn-helloasso-pay.pulse {
    animation: pulse 2s infinite;
}
