/* Clinical Skills — notification bell & panel */

.cl-notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.cl-notif-bell__toggle {
    gap: 0.35rem;
    padding-inline: 0.75rem !important;
    line-height: 1;
}

.cl-notif-bell__toggle:hover,
.cl-notif-bell__toggle[aria-expanded="true"] {
    border-color: var(--cl-teal, #0d9488) !important;
    color: var(--cl-teal, #0d9488) !important;
}

.cl-notif-bell__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.cl-notif-bell__svg {
    width: 1.125rem;
    height: 1.125rem;
    display: block;
}

.cl-notif-bell__svg--sm {
    width: 1rem;
    height: 1rem;
}

.cl-notif-bell__label {
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .cl-notif-bell__label {
        display: none;
    }

    .cl-notif-bell__toggle {
        padding-inline: 0.55rem !important;
        min-width: 2.5rem;
    }
}

.cl-notif-bell__badge {
    position: absolute;
    top: -0.45rem;
    inset-inline-end: -0.45rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.5625rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    border: 2px solid var(--cl-white, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.cl-notif-bell__badge--hidden {
    display: none !important;
}

/* Dropdown panel */
.cl-notif-bell__dropdown {
    position: absolute;
    top: calc(100% + 0.65rem);
    inset-inline-end: 0;
    width: min(22rem, calc(100vw - 1.5rem));
    background: var(--cl-white, #fff);
    border: 1px solid rgba(15, 39, 68, 0.08);
    border-radius: var(--cl-radius, 12px);
    box-shadow: var(--cl-shadow, 0 18px 45px rgba(15, 39, 68, 0.12));
    z-index: 1100;
    overflow: hidden;
    animation: cl-notif-fade-in 0.18s ease;
}

.cl-notif-bell__dropdown--hidden {
    display: none !important;
}

@keyframes cl-notif-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cl-notif-bell__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(15, 39, 68, 0.06);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.cl-notif-bell__header-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: var(--cl-fs-sm, 0.9375rem);
    color: var(--cl-navy, #0f2744);
}

.cl-notif-bell__header-title i {
    color: var(--cl-teal, #0d9488);
    font-size: 1rem;
}

.cl-notif-bell__header-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.12);
    color: var(--cl-teal, #0d9488);
    font-size: 0.6875rem;
    font-weight: 700;
}

.cl-notif-bell__mark-all {
    border: 0;
    background: transparent;
    color: var(--cl-teal, #0d9488);
    font-size: var(--cl-fs-xs, 0.8125rem);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.cl-notif-bell__mark-all:hover:not(:disabled) {
    background: rgba(13, 148, 136, 0.08);
}

.cl-notif-bell__mark-all:disabled {
    opacity: 0.45;
    cursor: default;
}

.cl-notif-bell__list {
    max-height: 20rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cl-notif-bell__list::-webkit-scrollbar {
    width: 5px;
}

.cl-notif-bell__list::-webkit-scrollbar-thumb {
    background: rgba(15, 39, 68, 0.15);
    border-radius: 999px;
}

/* Skeleton loading */
.cl-notif-bell__skeleton {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cl-notif-bell__skeleton-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.cl-notif-bell__skeleton-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: cl-notif-shimmer 1.2s infinite;
    flex-shrink: 0;
}

.cl-notif-bell__skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 0.15rem;
}

.cl-notif-bell__skeleton-line {
    height: 0.55rem;
    border-radius: 4px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: cl-notif-shimmer 1.2s infinite;
}

.cl-notif-bell__skeleton-line--short {
    width: 55%;
}

@keyframes cl-notif-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Notification items */
.cl-notif-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(15, 39, 68, 0.05);
    color: inherit;
    text-decoration: none;
    transition: background 0.12s ease;
}

.cl-notif-item:hover {
    background: rgba(13, 148, 136, 0.05);
}

.cl-notif-item--unread {
    background: rgba(13, 148, 136, 0.04);
    border-inline-start: 3px solid var(--cl-teal, #0d9488);
    padding-inline-start: calc(1rem - 3px);
}

.cl-notif-item__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.1);
    color: var(--cl-teal, #0d9488);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.cl-notif-item__body {
    min-width: 0;
    flex: 1;
}

.cl-notif-item__title {
    font-weight: 600;
    font-size: var(--cl-fs-xs, 0.8125rem);
    color: var(--cl-navy, #0f2744);
    margin-bottom: 0.15rem;
    line-height: 1.35;
}

.cl-notif-item__message {
    font-size: var(--cl-fs-caption, 0.75rem);
    color: var(--cl-text-muted, #64748b);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cl-notif-item__time {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.cl-notif-bell__empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--cl-text-muted, #64748b);
}

.cl-notif-bell__empty i {
    font-size: 1.75rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.5rem;
}

.cl-notif-bell__empty p {
    margin: 0;
    font-size: var(--cl-fs-xs, 0.8125rem);
}

.cl-notif-bell__error {
    padding: 1rem;
    text-align: center;
    font-size: var(--cl-fs-xs, 0.8125rem);
    color: #b45309;
    background: #fffbeb;
}

/* Footer */
.cl-notif-bell__footer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.65rem;
    border-top: 1px solid rgba(15, 39, 68, 0.06);
    background: #fafbfc;
}

.cl-notif-bell__footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: var(--cl-fs-xs, 0.8125rem);
    font-weight: 600;
    color: var(--cl-text-muted, #64748b);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.cl-notif-bell__footer-link:hover {
    background: rgba(15, 39, 68, 0.05);
    color: var(--cl-navy, #0f2744);
}

.cl-notif-bell__footer-link--primary {
    background: var(--cl-teal, #0d9488);
    color: #fff;
}

.cl-notif-bell__footer-link--primary:hover {
    background: var(--cl-teal-light, #14b8a6);
    color: #fff;
}

/* Inbox page cards */
.cl-notif-card--unread {
    border-color: var(--cl-teal, #0d9488) !important;
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.15);
}

.cl-notif-card__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.08);
    color: var(--cl-teal, #0d9488);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cl-notif-group-title {
    margin: 1rem 0 0.5rem;
    font-size: var(--cl-fs-caption, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cl-text-muted, #64748b);
}

.cl-notif-toolbar .btn {
    font-size: var(--cl-fs-xs, 0.8125rem);
}

/* Admin / instructor header integration */
.ol-header .cl-notif-bell {
    margin-inline-end: 0.35rem;
}

.cl-header__actions .cl-notif-bell {
    margin-inline-end: 0.15rem;
}

/* Mobile: keep panel on-screen */
@media (max-width: 576px) {
    .cl-notif-bell__dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        inset-inline: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
        display: flex;
        flex-direction: column;
    }

    .cl-notif-bell__dropdown--hidden {
        display: none !important;
    }

    .cl-notif-bell__list {
        flex: 1;
        max-height: none;
    }
}
