/* Container do Sino - Sempre visível em todo o site */
.mdt-notifications-bell-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
}

/* Botão do Sino - Design Circular */
.mdt-notifications-bell {
    background: #1e1e1e; /* Preto */
    border: 2px solid #1e1e1e;
    border-radius: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30, 30, 30, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    width: 56px; /* Círculo perfeito */
    height: 56px;
}

/* Hover - Expande e mostra texto */
.mdt-notifications-bell:hover {
    width: auto;
    padding-right: 20px;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(30, 30, 30, 0.5);
    background: #2a2a2a;
}

.mdt-notifications-bell:active {
    transform: translateY(-1px);
}

/* Círculo que contém o sino */
.bell-circle {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Ícone do Sino - Roxo */
.bell-icon {
    width: 26px;
    height: 26px;
    color: #8b5cf6; /* Roxo */
    animation: bellRing 3s ease-in-out infinite;
    transition: color 0.3s ease;
}

.mdt-notifications-bell:hover .bell-icon {
    color: #a78bfa; /* Roxo mais claro no hover */
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    5%, 15% { transform: rotate(-12deg); }
    10%, 20% { transform: rotate(12deg); }
    25% { transform: rotate(0deg); }
}

/* Texto - Inicialmente oculto */
.bell-text {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0;
}

/* Texto aparece no hover */
.mdt-notifications-bell:hover .bell-text {
    opacity: 1;
    max-width: 200px;
    margin-left: 10px;
}

/* Badge de Notificação */
.bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid #1e1e1e;
    padding: 0 6px;
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Painel de Notificações */
.mdt-notifications-panel {
    position: fixed;
    right: 30px;
    bottom: 170px;
    width: 420px;
    max-height: 600px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    border: 2px solid #5b21b6;
}

.mdt-notifications-panel.active {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cabeçalho do Painel */
.panel-header {
    background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4c1d95;
}

.panel-header h3 {
    color: #fff;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.panel-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.panel-close svg {
    width: 20px;
    height: 20px;
}

/* Corpo do Painel */
.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9fafb;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #5b21b6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

/* Item de Notificação */
.notification-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid #5b21b6;
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(-2px);
}

.notification-item.unread {
    background: #faf5ff;
    border-left-color: #8b5cf6;
}

.notification-header-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.notification-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #5b21b6;
    font-size: 14px;
}

.notification-author svg {
    width: 18px;
    height: 18px;
    color: #8b5cf6;
}

.notification-date-item {
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
}

.notification-message {
    color: #1e1e1e;
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
}

.notification-unread-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #8b5cf6;
    border-radius: 50%;
    margin-left: 5px;
}

/* Mensagem de sem notificações */
.no-notifications-message {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-notifications-message svg {
    width: 64px;
    height: 64px;
    color: #d1d5db;
    margin-bottom: 15px;
}

.no-notifications-message p {
    margin: 0;
    font-size: 15px;
}

/* Overlay */
.mdt-notifications-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.mdt-notifications-overlay.active {
    display: block;
}

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

/* Scrollbar customizada */
.panel-body::-webkit-scrollbar {
    width: 8px;
}

.panel-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.panel-body::-webkit-scrollbar-thumb {
    background: #5b21b6;
    border-radius: 4px;
}

.panel-body::-webkit-scrollbar-thumb:hover {
    background: #4c1d95;
}

/* Responsivo */
@media (max-width: 768px) {
    .mdt-notifications-bell-container {
        bottom: 80px;
        right: 20px;
    }
    
    .mdt-notifications-bell {
        width: 50px;
        height: 50px;
    }
    
    .bell-circle {
        width: 50px;
        height: 50px;
    }
    
    .bell-icon {
        width: 24px;
        height: 24px;
    }
    
    .mdt-notifications-bell:hover {
        padding-right: 16px;
    }
    
    .bell-text {
        font-size: 14px;
    }
    
    .mdt-notifications-panel {
        right: 20px;
        bottom: 140px;
        width: calc(100vw - 40px);
        max-width: 380px;
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .mdt-notifications-bell-container {
        bottom: 70px;
        right: 15px;
    }
    
    .mdt-notifications-bell {
        width: 48px;
        height: 48px;
    }
    
    .bell-circle {
        width: 48px;
        height: 48px;
    }
    
    .bell-icon {
        width: 22px;
        height: 22px;
    }
    
    /* No mobile, não expande no hover (para economizar espaço) */
    .mdt-notifications-bell:hover {
        width: 48px;
        padding-right: 0;
    }
    
    .mdt-notifications-bell:hover .bell-text {
        opacity: 0;
        max-width: 0;
        margin-left: 0;
    }
    
    .mdt-notifications-panel {
        right: 10px;
        left: 10px;
        bottom: 130px;
        width: auto;
        max-height: 450px;
    }
}
