/* static/css/kanvex-notifications.css */

/* === TOASTS (NOTIFICAÇÕES) === */
.kanvex-toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.kanvex-toast.closing {
    animation: slideOutRight 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Barra de progresso (auto-dismiss) */
.kanvex-toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* Ícone do toast */
.kanvex-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Tipos de toast */
.kanvex-toast.success {
    border-left: 4px solid #10B981;
}

.kanvex-toast.success .kanvex-toast-icon {
    background: #D1FAE5;
    color: #059669;
}

.kanvex-toast.error {
    border-left: 4px solid #EF4444;
}

.kanvex-toast.error .kanvex-toast-icon {
    background: #FEE2E2;
    color: #DC2626;
}

.kanvex-toast.warning {
    border-left: 4px solid #F59E0B;
}

.kanvex-toast.warning .kanvex-toast-icon {
    background: #FEF3C7;
    color: #D97706;
}

.kanvex-toast.info {
    border-left: 4px solid #3B82F6;
}

.kanvex-toast.info .kanvex-toast-icon {
    background: #DBEAFE;
    color: #2563EB;
}

/* Conteúdo do toast */
.kanvex-toast-content {
    flex: 1;
    min-width: 0;
}

.kanvex-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.kanvex-toast-message {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.4;
}

/* Botão de fechar */
.kanvex-toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    transition: all 0.2s;
}

.kanvex-toast-close:hover {
    background: #F3F4F6;
    color: #374151;
}

/* === MODAL DE CONFIRMAÇÃO === */
#kanvex-modal-overlay {
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-out;
}

#kanvex-modal-overlay.closing {
    animation: fadeOut 0.15s ease-in forwards;
}

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

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

#kanvex-modal {
    animation: scaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#kanvex-modal-overlay.closing #kanvex-modal {
    animation: scaleOut 0.15s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.95);
        opacity: 0;
    }
}

.kanvex-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.kanvex-modal-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kanvex-modal-icon.success {
    background: #D1FAE5;
    color: #059669;
}

.kanvex-modal-icon.error {
    background: #FEE2E2;
    color: #DC2626;
}

.kanvex-modal-icon.warning {
    background: #FEF3C7;
    color: #D97706;
}

.kanvex-modal-icon.info {
    background: #DBEAFE;
    color: #2563EB;
}

.kanvex-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.kanvex-modal-message {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
}

.kanvex-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.kanvex-modal-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.kanvex-modal-btn-primary {
    background: #3B82F6;
    color: white;
}

.kanvex-modal-btn-primary:hover {
    background: #2563EB;
}

.kanvex-modal-btn-danger {
    background: #EF4444;
    color: white;
}

.kanvex-modal-btn-danger:hover {
    background: #DC2626;
}

.kanvex-modal-btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.kanvex-modal-btn-secondary:hover {
    background: #E5E7EB;
}

/* Input para prompt */
.kanvex-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
    transition: all 0.2s;
}

.kanvex-modal-input:focus {
    outline: none;
    border-color: #3B82F6;
    ring: 2px;
    ring-color: #DBEAFE;
}