/**
 * Styles SellAuth Integration
 * Styles professionnels pour l'intégration SellAuth
 */

/* Animation de rotation pour le spinner */
@keyframes sellauth-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* État de chargement des boutons */
.shop__card__purchase.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.shop__card__purchase.loading .spinner {
    animation: sellauth-spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.shop__card__purchase:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Notifications SellAuth */
.sellauth-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background: rgba(26, 26, 26, 0.98);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    transform: translateX(calc(100% + 40px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.sellauth-notification--visible {
    transform: translateX(0);
    opacity: 1;
}

.sellauth-notification__content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sellauth-notification__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

.sellauth-notification__message {
    flex: 1;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

/* Types de notifications */
.sellauth-notification--success {
    border-left: 4px solid #28a745;
}

.sellauth-notification--success .sellauth-notification__icon {
    background: #28a745;
    color: #ffffff;
}

.sellauth-notification--error {
    border-left: 4px solid #dc3545;
}

.sellauth-notification--error .sellauth-notification__icon {
    background: #dc3545;
    color: #ffffff;
}

.sellauth-notification--info {
    border-left: 4px solid #cf9816;
}

.sellauth-notification--info .sellauth-notification__icon {
    background: #cf9816;
    color: #ffffff;
}

/* Animation d'entrée */
@keyframes sellauth-slide-in {
    from {
        transform: translateX(calc(100% + 40px));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sellauth-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Amélioration des boutons d'achat */
.shop__card__purchase {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shop__card__purchase:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.shop__card__purchase:active:not(:disabled) {
    transform: translateY(0);
}

/* Badge de statut pour les produits indisponibles */
.shop__card__purchase[data-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop__card__purchase[data-disabled="true"]::after {
    content: "Indisponible";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Style pour l'état de chargement du script SellAuth */
.sellauth-loading {
    position: relative;
}

.sellauth-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sellauth-loading::after {
    content: "Chargement du système de paiement...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    z-index: 10000;
    background: rgba(26, 26, 26, 0.9);
    padding: 16px 24px;
    border-radius: 8px;
}

/* Animation pulse pour les boutons en attente */
@keyframes sellauth-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.shop__card__purchase.waiting {
    animation: sellauth-pulse 2s ease-in-out infinite;
}

/* Style pour la modale SellAuth (personnalisation si nécessaire) */
.sellauth-modal-overlay {
    backdrop-filter: blur(8px);
}

/* Amélioration du feedback visuel */
.shop__card__purchase:focus:not(:disabled) {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Style pour les messages d'erreur inline */
.sellauth-error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
    border-radius: 4px;
}

/* Style pour les messages de succès inline */
.sellauth-success-message {
    display: block;
    color: #28a745;
    font-size: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
    border-radius: 4px;
}

/* Focus outline changé de jaune à blanc */
.shop__card__purchase:focus:not(:disabled) {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

