/**
 * Estilos para notificações toast (popups) de agendamentos
 */

/* Container de toasts fixo no canto superior direito */
.toast-container {
    z-index: 9999 !important;
}

/* Estilo base do toast de notificação */
.notification-toast {
    min-width: 300px;
    max-width: 400px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

/* Toast header customizado */
.notification-toast .toast-header {
    padding: 0.75rem 1rem;
}

.notification-toast .toast-header strong {
    font-size: 1rem;
    font-weight: 600;
}

.notification-toast .toast-header .btn-close {
    margin-left: 1rem;
    padding: 0;
}

/* Toast body com padding adequado */
.notification-toast .toast-body {
    padding: 0.5rem 1rem 1rem 1rem;
}

.notification-toast .toast-body p {
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.95;
    margin-bottom: 0.5rem;
}

/* Botão de fechar customizado */
.notification-toast .btn-close {
    opacity: 0.8;
}

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

/* Botão de ação dentro do toast */
.notification-toast .btn-light {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    transition: all 0.2s ease;
}

.notification-toast .btn-light:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Cores específicas por prioridade */
.notification-toast.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.notification-toast.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #212529 !important;
}

.notification-toast.bg-warning .btn-close {
    filter: invert(1);
}

.notification-toast.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

.notification-toast.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
}

.notification-toast.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

/* Animação de entrada */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

/* Efeito de pulsação para notificações de alta prioridade */
.notification-toast.bg-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Badge de prioridade (opcional) */
.notification-toast .priority-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsividade para mobile */
@media (max-width: 576px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
        padding: 0 !important;
    }

    .notification-toast {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Múltiplos toasts empilhados */
.toast-container .notification-toast:not(:last-child) {
    margin-bottom: 0.75rem;
}

/* Hover effect */
.notification-toast:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

/* Link dentro do toast */
.notification-toast a:not(.btn) {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

.notification-toast a:not(.btn):hover {
    opacity: 0.8;
}

/* Toast de alta prioridade - fica visível até ser fechado manualmente */
.notification-toast.toast-alta-prioridade {
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 48px rgba(220, 53, 69, 0.4);
}

/* Animação de pulso para alta prioridade */
.notification-toast.animate-pulse {
    animation: slideInRight 0.3s ease-out, toastPulse 0.5s ease-in-out 0.3s 2;
}

@keyframes toastPulse {
    0%, 100% {
        transform: translateX(0) scale(1);
    }
    50% {
        transform: translateX(0) scale(1.02);
    }
}

/* Ícone de notificação com animação */
.notification-toast .fa-exclamation-circle {
    animation: iconShake 0.5s ease-in-out;
}

@keyframes iconShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Estilo aprimorado para o botão "Ver Detalhes" */
.notification-toast .btn-light .fa-external-link-alt {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.notification-toast .btn-light:hover .fa-external-link-alt {
    transform: translateX(2px);
}

/* Container width para melhor visualização */
.toast-container {
    max-width: 420px;
    min-width: 320px;
}
