/* Notificaciones del sitio: avisos emergentes (window.notify) y campana del navbar.
   Ver /js/notifications/notifications.js. Usa los tokens de tokens.css con valores de respaldo. */

/* ---------------------------------------------------------------- avisos emergentes */
.gdl-toasts {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.gdl-toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .65rem;
    align-items: start;
    padding: .85rem .9rem;
    border: 1px solid var(--brand-border, #dfe3ea);
    border-left: 4px solid var(--gdl-toast-accent, #001c70);
    border-radius: 12px;
    background: var(--brand-surface, #fff);
    color: var(--brand-text, #1d2433);
    box-shadow: 0 10px 30px rgba(0, 28, 112, .14);
    font-family: var(--font-body, system-ui, sans-serif);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
}
.gdl-toast.is-visible { opacity: 1; transform: none; }
.gdl-toast--success { --gdl-toast-accent: #198754; }
.gdl-toast--error { --gdl-toast-accent: #dc3545; }
.gdl-toast--warning { --gdl-toast-accent: #c98a00; }
.gdl-toast--info { --gdl-toast-accent: var(--brand-primary, #001c70); }

.gdl-toast__icon { color: var(--gdl-toast-accent); font-size: 1.2rem; line-height: 1.3; }
.gdl-toast__body { min-width: 0; }
.gdl-toast__title { margin: 0; font-weight: 700; font-size: .95rem; }
.gdl-toast__message { margin: .15rem 0 0; font-size: .875rem; color: var(--brand-muted, #5b6474); overflow-wrap: anywhere; white-space: pre-line; }
.gdl-toast__action {
    display: inline-block;
    margin-top: .5rem;
    padding: .3rem .8rem;
    border: 0;
    border-radius: 999px;
    background: var(--brand-primary, #001c70);
    color: var(--brand-on-primary, #fff);
    font-size: .85rem;
    text-decoration: none;
    cursor: pointer;
}
.gdl-toast__action:hover, .gdl-toast__action:focus-visible { background: var(--brand-primary-hover, #00134d); color: #fff; }
.gdl-toast__close {
    border: 0;
    background: none;
    color: var(--brand-muted, #5b6474);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 .15rem;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .gdl-toast { transition: none; transform: none; }
}

/* ---------------------------------------------------------------- campana */
.notif__bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: none;
}
.notif__bell .bi-bell { font-size: 1.15rem; }
.notif__badge {
    position: absolute;
    top: .15rem;
    left: 1.15rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
}
.notif__badge[hidden] { display: none; }

.notif__panel {
    width: min(360px, calc(100vw - 2rem));
    padding: 0;
    overflow: hidden;
}
.notif__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--brand-border, #dfe3ea);
}
.notif__readall {
    border: 0;
    background: none;
    color: var(--brand-primary, #001c70);
    font-size: .8rem;
    text-decoration: underline;
    cursor: pointer;
}
.notif__readall[hidden] { display: none; }
.notif__list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.notif__empty { padding: 1rem .9rem; color: var(--brand-muted, #5b6474); font-size: .9rem; }
.notif__item + .notif__item { border-top: 1px solid var(--brand-border, #dfe3ea); }
.notif__link {
    display: block;
    padding: .7rem .9rem .7rem 1.4rem;
    color: inherit;
    text-decoration: none;
    position: relative;
}
a.notif__link:hover, a.notif__link:focus-visible { background: var(--brand-tint, #e6ecf7); }
.notif__item.is-unread .notif__link::before {
    content: "";
    position: absolute;
    left: .6rem;
    top: 1.05rem;
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--brand-primary, #001c70);
}
.notif__title { margin: 0; font-weight: 700; font-size: .9rem; white-space: normal; }
.notif__message { margin: .15rem 0 0; font-size: .85rem; color: var(--brand-muted, #5b6474); white-space: normal; }
.notif__time { display: block; margin-top: .25rem; font-size: .75rem; color: var(--brand-muted, #5b6474); }
