/**
 * Styles pour les alertes de crédits TCF
 * 
 * @package TCF_Writing_Simulator
 */

/* Overlay de la popup */
.tcf-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tcf-popup-overlay.tcf-popup-show {
    opacity: 1;
    visibility: visible;
}

/* Container de la popup */
.tcf-popup-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    position: relative;
}

.tcf-popup-overlay.tcf-popup-show .tcf-popup-container {
    transform: scale(1) translateY(0);
}

/* Header de la popup */
.tcf-popup-header {
    display: flex;
    align-items: center;
    padding: 24px 24px 0 24px;
    position: relative;
}

.tcf-popup-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.tcf-popup-icon i {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Couleurs des icônes selon le type */
.tcf-popup-container:has([data-lucide="alert-circle"]) .tcf-popup-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* .tcf-popup-container:has([data-lucide="alert-triangle"]) .tcf-popup-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
} */

.tcf-popup-container:has([data-lucide="info"]) .tcf-popup-icon,
.tcf-popup-container:has([data-lucide="alert-triangle"]) .tcf-popup-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    color: #d97706;
}

.task__name_title {
    text-align: left;
    font-size: 14px;
    font-weight: 500;
}

.task__name_value {
    font-size: 14px;
}

.tcf-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    flex-grow: 1;
}

.tcf-popup-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tcf-popup-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.tcf-popup-close i {
    width: 18px;
    height: 18px;
}

/* Contenu de la popup */
.tcf-popup-content {
    padding: 20px 24px;
}

.tcf-popup-message {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.tcf-popup-details {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* Checkbox "Ne plus me le rappeler" */
.tcf-popup-checkbox {
    margin-top: 16px;
}

.tcf-popup-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    user-select: none;
}

.tcf-popup-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

/* Actions de la popup */
.tcf-popup-actions {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px 24px;
    justify-content: flex-end;
}

.tcf-popup-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.tcf-popup-btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.tcf-popup-btn-secondary:hover {
    background-color: #e5e7eb;
}

.tcf-popup-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.tcf-popup-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Blocage du scroll */
body.tcf-popup-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 640px) {
    .tcf-popup-container {
        width: 95%;
        margin: 20px;
    }

    .tcf-popup-header {
        padding: 20px 20px 0 20px;
    }

    .tcf-popup-content {
        padding: 16px 20px;
    }

    .tcf-popup-actions {
        padding: 0 20px 20px 20px;
        flex-direction: column;
    }

    .tcf-popup-btn {
        width: 100%;
    }

    .tcf-popup-header h3 {
        font-size: 18px;
    }

    .tcf-popup-icon {
        width: 38px;
        height: 38px;
        margin-right: 0;
    }

    .tcf-popup-icon i {
        width: 20px;
        height: 20px;
    }
}

/* Animation d'entrée */
@keyframes tcf-popup-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes tcf-overlay-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Styles spécifiques pour la popup de confirmation */
.tcf-confirmation-popup .tcf-popup-content {
    text-align: center;
}

.tcf-confirmation-popup .tcf-popup-message {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.tcf-confirmation-popup .tcf-popup-details {
    font-size: 15px;
    color: #4b5563;
    margin-bottom: 24px;
}

/* Styles pour les icônes Lucide */
.tcf-popup-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* États de focus pour l'accessibilité */
.tcf-popup-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.tcf-popup-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Animation de pulsation pour les icônes d'alerte */
@keyframes tcf-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.tcf-popup-container:has([data-lucide="sparkles"]) .tcf-popup-icon,
.tcf-popup-container:has([data-lucide="alert-triangle"]) .tcf-popup-icon {
    animation: tcf-pulse 2s infinite;
}