/* Estilos para Notificações */

/* Animação do badge de notificação */
#notification-badge {
    animation: pulse-badge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background-color: #dc2626 !important;
    color: #ffffff !important;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-weight: 700;
    font-size: 0.65rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
        transform: translate(25%, -25%) scale(1.05);
    }
}

/* Dropdown de notificações */
.notifications-dropdown {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 
                0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Item de notificação não lida com animação suave */
.notification-item-unread {
    position: relative;
    overflow: hidden;
}

.notification-item-unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
}

/* Animação de entrada de nova notificação */
@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-new {
    animation: slideInNotification 0.3s ease-out;
}

/* Line clamp para limitar linhas de texto */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Scrollbar customizada para lista de notificações */
#notifications-list::-webkit-scrollbar {
    width: 6px;
}

#notifications-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#notifications-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#notifications-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Efeito hover no botão de notificação */
.notification-button {
    transition: all 0.2s ease;
}

.notification-button:hover {
    transform: scale(1.05);
}

.notification-button:active {
    transform: scale(0.95);
}

/* Efeito de brilho no sino quando há notificações */
@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.notification-button.has-notifications {
    animation: bellShake 0.5s ease-in-out;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 640px) {
    .notifications-dropdown {
        position: fixed !important;
        top: 60px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
    }
}

/* Loading spinner para notificações */
.notification-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 0.8s linear infinite;
}

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

/* Transição suave para marcar como lida */
.notification-item {
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.notification-item.marking-read {
    opacity: 0.5;
}

/* Badge do tipo de notificação */
.notification-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.notification-type-badge.ticket-created {
    background-color: #d1fae5;
    color: #065f46;
}

.notification-type-badge.ticket-updated {
    background-color: #dbeafe;
    color: #1e40af;
}

.notification-type-badge.ticket-response {
    background-color: #fef3c7;
    color: #92400e;
}

.notification-type-badge.ticket-assigned {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Efeito hover nos itens de notificação */
.notification-item:hover {
    transform: translateX(2px);
    transition: transform 0.2s ease;
}

/* Indicador visual de notificação não lida */
.notification-unread-dot {
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Estilo para notificação vazia */
.notification-empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.notification-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: #cbd5e1;
}

/* Hover effect no dropdown */
.notification-dropdown-item:hover {
    background: linear-gradient(to right, #eff6ff, #f0f9ff);
}

/* ================================================
   NOTIFICAÇÕES IN-PAGE (TOAST)
   ================================================ */

/* Toast Container */
#notification-toast-container {
    pointer-events: none;
    z-index: 9999;
}

#notification-toast-container > * {
    pointer-events: auto;
}

/* Toast Animation */
.notification-toast {
    animation: slideInRight 0.3s ease-out forwards;
    margin-bottom: 0.75rem;
}

.notification-toast.show {
    transform: translateX(0) !important;
}

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

/* Toast hover effect */
.notification-toast:hover {
    transform: translateY(-2px) !important;
    transition: transform 0.2s ease;
}

/* Shadow Utility */
.shadow-3xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Notification Bell Ring Animation */
@keyframes ring {
    0% { transform: rotate(0); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0); }
    100% { transform: rotate(0); }
}

.notification-bell:hover svg {
    animation: ring 0.8s ease;
}

/* Toast success state */
.notification-toast.success {
    border-left: 4px solid #10b981;
}

.notification-toast.info {
    border-left: 4px solid #3b82f6;
}

.notification-toast.warning {
    border-left: 4px solid #f59e0b;
}

.notification-toast.error {
    border-left: 4px solid #ef4444;
}

/* Responsive Toast */
@media (max-width: 640px) {
    #notification-toast-container {
        right: 1rem;
        top: 4rem;
        left: 1rem;
    }
    
    .notification-toast .bg-white {
        max-width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification-toast .bg-white {
        background-color: #1f2937;
        border-color: #374151;
    }
    
    .notification-toast .text-dark-800 {
        color: #f3f4f6;
    }
    
    .notification-toast .text-dark-600 {
        color: #d1d5db;
    }
}

/* Loading Spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade out animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification-toast.removing {
    animation: fadeOut 0.3s ease-in forwards;
}

