/* Sistema de Notificações Personalizadas */

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast-notification {
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.toast-notification.success::before {
    background-color: #28a745;
}

.toast-notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.toast-notification.error::before {
    background-color: #dc3545;
}

.toast-notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.toast-notification.warning::before {
    background-color: #ffc107;
}

.toast-notification.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.toast-notification.info::before {
    background-color: #17a2b8;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.2);
    animation: progressBar 3s linear forwards;
}

/* Modal de Confirmação Personalizada */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.custom-confirm-modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s ease-out;
}

.custom-confirm-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.custom-confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.custom-confirm-icon.danger {
    background-color: #fee;
    color: #dc3545;
}

.custom-confirm-icon.warning {
    background-color: #fff8e1;
    color: #ffc107;
}

.custom-confirm-icon.info {
    background-color: #e3f2fd;
    color: #2196f3;
}

.custom-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.custom-confirm-body {
    padding: 0 24px 24px;
}

.custom-confirm-message {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
}

.custom-confirm-footer {
    padding: 16px 24px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-radius: 0 0 12px 12px;
}

.custom-confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.custom-confirm-btn.btn-cancel {
    background-color: #fff;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.custom-confirm-btn.btn-cancel:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.custom-confirm-btn.btn-confirm {
    background-color: #dc3545;
    color: white;
}

.custom-confirm-btn.btn-confirm:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.custom-confirm-btn.btn-confirm.warning {
    background-color: #ffc107;
    color: #000;
}

.custom-confirm-btn.btn-confirm.warning:hover {
    background-color: #e0a800;
}

.custom-confirm-btn.btn-confirm.info {
    background-color: #0d6efd;
}

.custom-confirm-btn.btn-confirm.info:hover {
    background-color: #0b5ed7;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease-out;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
}

/* Animações */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* Animação de saída */
.toast-notification.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

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

.custom-confirm-overlay.removing {
    animation: fadeOut 0.2s ease-out forwards;
}

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

/* Responsividade */
@media (max-width: 576px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast-notification {
        min-width: auto;
        max-width: 100%;
    }
    
    .custom-confirm-modal {
        width: 95%;
    }
}