/* Estilos para sistema de notificações */

.messages {
    margin: 0 auto;
    padding: 8px;
    max-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--s5);
    border-radius: 8px;
    z-index: 1;
}

/* =================
Badge de notificações não lidas
===========================*/
.notification-badge {
    position: relative;
}

.notification-badge .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* ======================
Dropdown de notificações
======================== */
.notification-dropdown {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.notification-dropdown-toggle {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

a.notification-dropdown-toggle {
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.notification-dropdown a {
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    width: 100%;
    /* font-size: 5rem; */
}

i.fas.fa-bell {
    width: 30px;
    flex: 1;
}

.notification-dropdown-content {
    margin-top: 0.5rem;
    padding: 0.5rem;
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--t5, #1a1a1a);
    max-height: 400px;
    min-width: 320px;
    max-width: 450px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--t4, #333);
    z-index: 1000;
    overflow-y: auto;
}

.notification-dropdown.active .notification-dropdown-content {
    display: block;
}

.notification-dropdown-header {
    margin: 0;
    padding: 0.5rem;
    border-bottom: 1px solid var(--t4, #333);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--s3, #fff);
}

.notification-dropdown-buttons {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mark-all-read {
    cursor: pointer;
    font-size: 0.85rem;
}

.notification-item {
    margin: 0;
    padding: 0.5rem;
}

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

.notification-title {
    font-weight: bold;
    color: var(--s3, #fff);
    font-size: 0.9rem;
    margin: 0;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--p3, #888);
    white-space: nowrap;
}

.notification-message {
    color: var(--p3, #ccc);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.notification-type-badge {
    margin: 0;
    padding: 2px 8px;
    display: inline-block;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
}

.notification-type-badge.success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.notification-type-badge.error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.notification-type-badge.warning {
    background-color: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.notification-type-badge.info {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.notification-type-badge.alert {
    background-color: rgba(230, 126, 34, 0.2);
    color: #e67e22;
}

.notification-dropdown-footer {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid var(--t4, #333);
}

.notification-dropdown-footer a {
    color: var(--p3, #00d4ff);
    text-decoration: none;
    font-size: 0.85rem;
}

.notification-dropdown-footer a:hover {
    text-decoration: underline;
}

.no-notifications {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--p3, #888);
    font-size: 0.9rem;
}

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

.toast {
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-width: 300px;
    max-width: 400px;
    border: 1px solid var(--t4, #333);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    gap: 1rem;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: auto;
    background: var(--t5, #1a1a1a);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-header {
    margin: 0 auto;
    padding: 0;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.toast.hiding {
    opacity: 0;
    transform: translateX(400px);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    margin: 0 auto;
    padding: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.toast-title {
    font-weight: bold;
    color: var(--s3, #fff);
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

.toast-message {
    color: var(--p3, #ccc);
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    line-height: 1.4;
}

.toast-close {
    background: var(--s3, #fff);
    border: none;
    border-radius: 4px;
    width: 1.2rem;
    height: 1.2rem;
    color: var(--p3, #888);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--s3, #fff);
}

.toast.success {
    border-left: 4px solid #2ecc71;
}

.toast.success .toast-icon {
    color: #2ecc71;
}

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

.toast.error .toast-icon {
    color: #e74c3c;
}

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

.toast.warning .toast-icon {
    color: #f1c40f;
}

.toast.info {
    border-left: 4px solid #3498db;
}

.toast.info .toast-icon {
    color: #3498db;
}

/* ========================
Paginação
======================== */
.pagination {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.page-link {
    padding: 0.5rem 1rem;
    background-color: var(--t4, #2a2a2a);
    color: var(--s3, #fff);
    border: 1px solid var(--t3, #3a3a3a);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: var(--p3, #00d4ff);
    color: var(--t5, #1a1a1a);
    border-color: var(--p3, #00d4ff);
    transform: translateY(-2px);
}

.page-info {
    padding: 0.5rem 1rem;
    color: var(--s3, #fff);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 820px) {
    .notification-dropdown-content {
        min-width: 280px;
        max-width: calc(100vw - 40px);
        right: -10px;
    }

    /* Removido: .nav-links position: relative - conflitava com menu mobile */

    .toast-container {
        right: 10px;
        left: 10px;
        top: 10px;
    }

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

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .page-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .page-info {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }
}