/**
 * Styles pour l'historique des joueurs et les invitations
 * Design moderne cohérent avec le reste du site STRKR
 * Optimisé pour mobile et desktop
 */

/* Bouton d'invitation dans le formulaire */
.invite-players-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Oswald', 'Arial', sans-serif;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.invite-players-btn.hidden {
    display: none;
}

.invite-players-btn:hover {
    background: linear-gradient(135deg, #ff9500, #ff7b00);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.invite-players-btn:active {
    transform: translateY(0);
}

.invite-players-btn .btn-icon {
    font-size: 1.2rem;
}

/* Overlay d'invitation */
.invitation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.invitation-overlay.hidden {
    display: none;
}

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

/* Modale d'invitation */
.invitation-modal {
    background: #1a1a1a;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header de la modale */
.invitation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid rgba(255, 140, 0, 0.3);
}

.invitation-header h2 {
    margin: 0;
    color: #ff8c00;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    letter-spacing: 1px;
}

.close-invitation {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-invitation:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff4444;
}

/* Corps de la modale */
.invitation-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.invitation-subtitle {
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
}

/* Liste des joueurs */
.player-history-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
    padding-right: 0.5rem;
}

/* Scrollbar personnalisée */
.player-history-list::-webkit-scrollbar {
    width: 8px;
}

.player-history-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.player-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 140, 0, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.player-history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 140, 0, 0.7);
}

/* Élément joueur */
.history-player {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-player:hover {
    background: rgba(255, 140, 0, 0.1);
    transform: translateX(2px);
}

.history-player:last-child {
    margin-bottom: 0;
}

/* Checkbox */
.player-checkbox {
    margin: 0 0.75rem 0 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #ff8c00;
}

/* Label */
.history-player label {
    flex: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    user-select: none;
}

/* Nom du joueur */
.player-name {
    font-weight: 600;
    color: #ff8c00;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

/* Email du joueur */
.player-email {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Bouton supprimer */
.remove-player {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.remove-player:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    transform: scale(1.1);
}

.remove-player:active {
    transform: scale(0.95);
}

/* Footer de la modale */
.invitation-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.invitation-count {
    text-align: center;
    color: #ff8c00;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding: 0.75rem;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 4px;
    font-size: 0.95rem;
}

.invitation-count span {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-confirm-invite {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Oswald', 'Arial', sans-serif;
    letter-spacing: 0.5px;
}

.btn-confirm-invite:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-confirm-invite:active {
    transform: translateY(0);
}

.btn-confirm-invite:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* État vide */
.history-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.history-empty p {
    margin: 0 0 0.5rem 0;
}

.history-empty-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* État de chargement */
.history-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.history-loading::after {
    content: '...';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive */
@media (max-width: 600px) {
    .invitation-section {
        padding: 1rem;
    }

    .invitation-section h3 {
        font-size: 1.1rem;
    }

    .player-history-list {
        max-height: 250px;
    }

    .history-player {
        padding: 0.6rem;
    }

    .player-name {
        font-size: 0.95rem;
    }

    .player-email {
        font-size: 0.8rem;
    }

    .remove-player {
        font-size: 1.3rem;
    }
}

/* Animation d'entrée */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.invitation-section {
    animation: slideIn 0.3s ease-out;
}

/* Badge MAX */
.max-only-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Message de succès/erreur */
.invitation-message {
    padding: 0.75rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.invitation-message.success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.invitation-message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Bouton d'action */
.send-invitations-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    letter-spacing: 1px;
}

.send-invitations-btn:hover {
    background: linear-gradient(135deg, #ff9500, #ff7b00);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.send-invitations-btn:active {
    transform: translateY(0);
}

.send-invitations-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
