/* Dental ED notifications ------------------------------------------------- */

#header-notifications {
    position: relative;
}

#header-notifications > .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0 !important;
    padding: 0 !important;
    color: #294154 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
}

#header-notifications > .btn:hover,
#header-notifications > .btn:focus,
#header-notifications.open > .btn {
    color: #0d7184 !important;
    background: #eef4f7 !important;
}

#header-notifications > .btn:focus-visible {
    outline: 2px solid #0d7184;
    outline-offset: 2px;
}

#header-notifications > .btn > .fa {
    padding: 0;
    font-size: 15px;
}

/* Keep the same surface for initial markup and subsequent notification refreshes. */
#header-notifications .dropdown-menu {
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 32px));
    min-width: 0;
    margin-top: 10px;
    padding: 0 !important;
    overflow: hidden;
    color: #294154;
    border: 1px solid #d7e4e9;
    border-radius: 10px !important;
    background: #fff;
    box-shadow: 0 18px 45px rgba(11, 41, 66, 0.16);
}

#header-notifications .table {
    margin: 0;
    border: 0;
    background: #fff;
}

#header-notifications .dropdown-menu td {
    padding: 0;
    color: #294154;
    border: 0;
    border-top: 1px solid #e8eff2;
    background: #fff !important;
}

#header-notifications .dropdown-menu tr:first-child td {
    border-top: 0;
}

#header-notifications .de-header-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    color: #294154;
    text-decoration: none;
}

#header-notifications .de-header-notification:hover,
#header-notifications .de-header-notification:focus {
    background: #f3f8fa;
}

#header-notifications .de-header-notification__icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    color: #0d7184;
    border-radius: 50%;
    background: #edf7f8;
    font-size: 14px;
}

#header-notifications .de-header-notification__copy {
    min-width: 0;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#header-notifications .de-header-notification__copy small {
    display: block;
    margin-top: 3px;
    color: #718590;
    font-size: 11px;
}

#header-notifications .de-header-notifications-all {
    display: block;
    padding: 13px 16px;
    color: #0d7184;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

#header-notifications .de-header-notifications-empty {
    margin: 0;
    padding: 20px;
    color: #294154;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
}

#header-notifications-count.notification-count {
    position: absolute;
    z-index: 3;
    top: -3px;
    right: -3px;
    bottom: auto;
    left: auto;
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    border: 2px solid #fff !important;
    border-radius: 999px;
    background: #14869a !important;
    box-shadow: 0 2px 6px rgba(11, 41, 66, 0.16);
    font-size: 9px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
    text-shadow: none;
}

#header-notifications-count.notification-count[hidden],
#header-notifications-count.notification-count:empty {
    display: none !important;
}

.de-alert-center[hidden] {
    display: none !important;
}

.de-alert-center {
    position: fixed;
    z-index: 2100;
    top: 88px;
    right: 24px;
    width: min(420px, calc(100vw - 32px));
    color: #142f47;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.de-alert-center.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.de-alert-center__surface {
    overflow: hidden;
    border: 1px solid #d7e4e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(11, 41, 66, 0.18);
}

.de-alert-center__header {
    display: flex;
    min-height: 72px;
    padding: 14px 15px 14px 17px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e3ecef;
    background: #f8fbfc;
}

.de-alert-center__icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    color: #0d7184;
    border: 1px solid #c9e4e8;
    border-radius: 50%;
    background: #eaf6f7;
    font-size: 14px;
}

.de-alert-center__heading {
    min-width: 0;
    flex: 1 1 auto;
}

.de-alert-center__heading > span {
    display: block;
    margin-bottom: 3px;
    color: #607681;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.de-alert-center__heading h2 {
    margin: 0;
    color: #0b2942;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.de-alert-center__close {
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    flex: 0 0 34px;
    place-items: center;
    color: #617783;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 13px;
}

.de-alert-center__close:hover,
.de-alert-center__close:focus {
    color: #0b2942;
    outline: 0;
    background: #e9f1f3;
}

.de-alert-center__body {
    max-height: min(52vh, 430px);
    overflow-y: auto;
    background: #fff;
}

.de-alert-center__body > h4 {
    margin: 0;
    padding: 12px 18px 8px;
    color: #607681;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.de-alert-item {
    position: relative;
    display: grid;
    padding: 16px 18px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 11px;
    border: 0;
    border-bottom: 1px solid #e8eff2;
    background: #fff;
}

.de-alert-item:last-child {
    border-bottom: 0;
}

.de-alert-item__status {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #0d7184;
    border-radius: 50%;
    background: #edf7f8;
    font-size: 12px;
}

.de-alert-item--warning .de-alert-item__status {
    color: #9b6b15;
    background: #fff7e8;
}

.de-alert-item--danger .de-alert-item__status,
.de-alert-item--error .de-alert-item__status {
    color: #9a4545;
    background: #fff2f1;
}

.de-alert-item__content {
    min-width: 0;
    color: #536b78;
    font-size: 13px;
    line-height: 1.55;
}

.de-alert-item__content h4 {
    margin: 0 0 6px;
    color: #17364d;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.de-alert-item__content h4 i {
    display: none;
}

.de-alert-item__content h4 small {
    display: block;
    margin-top: 2px;
    color: #7b8e98;
    font-size: 11px;
    font-weight: 500;
}

.de-alert-item__content p {
    margin: 0;
}

.de-alert-item__content a {
    color: #0d7184;
    font-weight: 700;
    text-decoration: none;
}

.de-alert-item__content a:hover,
.de-alert-item__content a:focus {
    color: #095c6b;
    text-decoration: underline;
}

.de-alert-item__link {
    display: inline-flex;
    margin-top: 8px;
    align-items: center;
    gap: 6px;
}

.de-alert-item__link i {
    font-size: 10px;
}

.de-alert-item__content .notice-actions {
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 7px;
}

.de-alert-item__content .notice-actions .btn {
    padding: 6px 10px;
    color: #0d7184;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #bcd9de;
    border-radius: 6px;
    background: #fff;
    background-image: none;
    box-shadow: none;
}

/* Django messages rendered by Bootstrap Notify use the same visual language. */
body [data-notify="container"].alert {
    width: min(410px, calc(100vw - 32px));
    max-width: none;
    padding: 15px 44px 15px 17px;
    color: #29495d;
    border: 1px solid #d4e3e8;
    border-left: 3px solid #14869a;
    border-radius: 10px;
    background: #fff;
    background-image: none;
    box-shadow: 0 15px 38px rgba(11, 41, 66, 0.16);
    font-size: 13px;
    line-height: 1.5;
}

body [data-notify="container"].alert-danger {
    border-left-color: #b85454;
}

body [data-notify="container"].alert-warning {
    border-left-color: #b48127;
}

body [data-notify="container"] [data-notify="icon"] {
    margin-right: 9px;
    color: #0d7184;
}

body [data-notify="container"].alert-danger [data-notify="icon"] {
    color: #9a4545;
}

body [data-notify="container"] .close {
    position: absolute;
    top: 10px;
    right: 12px;
    color: #6b808b;
    opacity: 1;
    text-shadow: none;
}

@media (max-width: 767px) {
    .de-alert-center {
        top: 76px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .de-alert-center__body {
        max-height: 56vh;
    }

    body [data-notify="container"].alert {
        right: 16px !important;
        left: 16px !important;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .de-alert-center {
        transition: none;
    }
}
