/* ===================================================================
 * NHA BANNER STYLES (.alert)
 * Banners: System-generated messages in response to user actions.
 * Prototype: CSAT Quick Wins - 25.1 (Figma)
 *
 * Design: Pastel background, color dot before text, dark text,
 *         inline layout, optional action link right, X close.
 * =================================================================== */
.alert {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px 24px;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.12);
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Icon indicator via ::before using FontAwesome */
.alert::before {
    display: inline-block;
    font-family: 'Font Awesome 5 Pro', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 1rem;
    min-width: 1rem;
    text-align: center;
    margin-right: 0.625rem;
    flex-shrink: 0;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

.alert .close {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    padding: 0.25rem;
    background: transparent;
    border: none;
    font-size: 1.125rem;
    font-weight: bold;
    line-height: 1;
    color: #666;
    opacity: 0.7;
    cursor: pointer;
}

.alert .close:hover {
    opacity: 1;
    color: #333;
}

/* Banner message + right-message layout */
.alert .message {
    flex: 1;
    min-width: 0;
}

/* When banner content is wrapped in an <a> (user_notices with href) */
.alert > a {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.alert > a:hover {
    text-decoration: none;
}

.alert .right-message {
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 1rem;
    white-space: nowrap;
}

.alert .right-message a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
}

.alert .right-message a:hover {
    text-decoration: none;
}

/* -------------------------------------------------------
 * Banner Variants - per Figma prototype
 * ------------------------------------------------------- */

/* Info: Light blue background, info icon */
.alert-info,
.alert-nha-info,
.alert-neutral {
    background-color: #F0F6FE;
    border-color: #CFE3F9;
    color: #333;
}

.alert-info::before,
.alert-nha-info::before,
.alert-neutral::before {
    content: '\f05a'; /* fa-info-circle */
    color: #2086c6;
}

/* Success: Light green background, check icon */
.alert-success {
    background-color: #F0F6FE;
    border-color: #BBF0CE;
    color: #333;
}

.alert-success::before {
    content: '\f058'; /* fa-check-circle */
    color: #28a745;
}

/* Warning: Light yellow background, exclamation icon */
.alert-warning,
.alert-nha-action {
    background-color: #FFF3E3;
    border-color: #FFD9BA;
    color: #333;
}

.alert-warning::before,
.alert-nha-action::before {
    content: '\f06a'; /* fa-exclamation-circle */
    color: #E08A3C;
}

/* Error/Danger: Light red/pink background, exclamation icon */
.alert-danger,
.alert-error {
    background-color: #FFF2F0;
    border-color: #FFD6D1;
    color: #333;
}

.alert-danger::before,
.alert-error::before {
    content: '\f06a'; /* fa-exclamation-circle */
    color: #dc3545;
}

.alert a,
.alert > a,
.alert-dash-inner .link > a {
    cursor: pointer;
    text-decoration: underline;
    color: inherit;
    font-weight: 500;
}

.alert > a:link,
.alert-dash-inner .link > a:link {
    text-decoration: none;
}

.alert > a:visited,
.alert-dash-inner .link > a:visited {
    text-decoration: none;
}

.alert > a:hover,
.alert-dash-inner .link > a:hover {
    text-decoration: underline;
}

.alert > a:active,
.alert-dash-inner .link > a:active {
    text-decoration: underline;
}

.alert-dash-inner .alert {
    padding-right: 80px;
    margin: 0 2px 5px 5px;
}

.alert .date {
    float: right;
    font-weight: bold;
    position: relative;
    top: 2px;
    line-height: 10px;
    font-size: 12px;
    width: 50px;
    text-align: right;
}

.alert-dash {
    margin: 5px 0;
    border: 1px solid #dcdcdc;
    border-width: 1px 2px 2px 1px;
}

.alert-dash .alert-dash-heading {
    margin: 0;
    font-weight: bold;
    color: #555;
    text-rendering: optimizelegibility;
    line-height: 28px;
    padding-left: 5px;
    border-bottom: 1px solid #dcdcdc;
}

.alert-dash .close.all {
    height: 18px;
    margin-top: 6px;
}

.alert-dash .close span {
    font-weight: bold;
    margin: 0 10px 0 5px;
    font-size: 16px;
    height: 18px;
    position: relative;
    top: -2px;
}

.alert-dash-inner {
    margin: 3px;
    padding-right: 3px;
    max-height: 300px;
    min-height: 30px;
    overflow: auto;
    font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-size: 12px;
}

.alert-dash-inner .empty {
    text-align: center;
    font-size: 15px;
    color: #333;
    padding-top: 5px;
}

/* Legacy unseen styles - maintained for backward compatibility */
.alert.unseen {
    margin: 0 7px 8px 0 !important;
    -webkit-box-shadow: 5px 5px 5px #aaa;
    -moz-box-shadow: 5px 5px 5px #aaa;
    box-shadow: 5px 5px 5px #aaa;
}

.alert.unseen .close {
    color: #888;
}

.alert.unseen .close:hover {
    color: #555;
}

.bp .alert a,
.alert a.link {
    text-decoration: none;
}

.alert a.link {
    color: #333;
}

body.bp .alert.unseen,
body.webtop .alert.unseen {
    margin: 0 7px 8px 0 !important;
    -webkit-box-shadow: 5px 5px 5px #aaa;
    -moz-box-shadow: 5px 5px 5px #aaa;
    box-shadow: 5px 5px 5px #aaa;
}

body.bp .alert-heading,
body.webtop .alert-heading {
    color: #333;
}


/* ===================================================================
 * NHA NOTIFICATION STYLES (.notification)
 * Notifications: Admin-launched messages for time-sensitive info.
 * Prototype: CSAT Quick Wins - 25.1 (Figma)
 *
 * Design: White background, color dot before text, title bold +
 *         text below, date absolute bottom-right, X close top-right.
 *
 * NOTE: .notification elements also carry .alert class for JS
 *       compatibility with alert-dash.js (dismiss functionality).
 *       The .notification class overrides .alert styles visually.
 * =================================================================== */

/* Base notification - overrides .alert styles when both classes present */
.alert.notification {
    display: block !important;
    position: relative;
    background-color: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-left: 0 !important;
    border-radius: 0;
    padding: 0.875rem 2.5rem 1.75rem 1rem !important;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #333 !important;
    box-shadow: none;
}

/* Override the banner ::before dot - notifications use a different dot approach */
.alert.notification::before {
    display: none;
}

/* Colored left bar via ::after pseudo-element - full height rectangle */
.alert.notification::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: #ccc;
}

/* Close button - top right */
.alert.notification .close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    transform: none;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1;
    color: #888;
    opacity: 1;
    cursor: pointer;
}

.alert.notification .close,
.alert.notification .close:hover,
.alert.notification .close:focus {
    text-decoration: none !important;
}

.alert.notification .close:hover {
    color: #333;
}

/* Date - positioned absolute bottom-right per Figma prototype */
.alert.notification .date {
    position: absolute;
    bottom: 0;
    right: 0;
    float: none;
    top: auto;
    width: auto;
    font-weight: bold;
    font-size: 0.75rem;
    line-height: 1;
    color: #999;
    padding: 0.75rem 1.25rem;
    text-align: right;
}

/* Notification heading - bold title */
.alert.notification .notification-heading {
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0.25rem;
    color: #333;
}

/* Notification text content */
.alert.notification p {
    margin: 0 0 0.25rem 0;
    color: #555;
    font-size: 0.875rem;
}

/* Notification links */
.alert.notification a.link {
    color: #333;
    text-decoration: none;
}

.alert.notification a.link:hover {
    text-decoration: underline;
}

.alert.notification a.document {
    color: #0066cc;
    text-decoration: underline;
}

/* Icon indicator for notification content lines via ::before on headings */
.alert.notification .notification-heading::before,
.alert.notification > a.link > h4.notification-heading::before,
.alert.notification > div > h4.notification-heading::before {
    display: inline-block;
    font-family: 'Font Awesome 5 Pro', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 1rem;
    min-width: 1rem;
    text-align: center;
    margin-right: 0.5rem;
    vertical-align: middle;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

/* When there's no heading, put icon before the first p */
.alert.notification > a.link > p:first-child::before,
.alert.notification > div > p:first-child::before {
    display: inline-block;
    font-family: 'Font Awesome 5 Pro', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 1rem;
    min-width: 1rem;
    text-align: center;
    margin-right: 0.5rem;
    vertical-align: middle;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

/* But not if there's already a heading with a dot */
.alert.notification > a.link > h4.notification-heading ~ p::before,
.alert.notification > div > h4.notification-heading ~ p::before {
    display: none;
}

/* -------------------------------------------------------
 * Notification Variants - per Figma prototype
 * White background for all, only dot color changes
 * ------------------------------------------------------- */

/* Info: blue info icon, blue left bar */
.alert.notification.notification-info::after {
    background-color: #2086c6;
}

.notification-info .notification-heading::before,
.notification-info > a.link > h4.notification-heading::before,
.notification-info > div > h4.notification-heading::before,
.notification-info > a.link > p:first-child::before,
.notification-info > div > p:first-child::before {
    content: '\f05a'; /* fa-info-circle */
    color: #2086c6;
}

/* Success: green check icon, green left bar */
.alert.notification.notification-success::after {
    background-color: #28a745;
}

.notification-success .notification-heading::before,
.notification-success > a.link > h4.notification-heading::before,
.notification-success > div > h4.notification-heading::before,
.notification-success > a.link > p:first-child::before,
.notification-success > div > p:first-child::before {
    content: '\f058'; /* fa-check-circle */
    color: #28a745;
}

/* Warning: red exclamation icon, red left bar */
.alert.notification.notification-warning::after {
    background-color: #dc3545;
}

.notification-warning .notification-heading::before,
.notification-warning > a.link > h4.notification-heading::before,
.notification-warning > div > h4.notification-heading::before,
.notification-warning > a.link > p:first-child::before,
.notification-warning > div > p:first-child::before {
    content: '\f06a'; /* fa-exclamation-circle */
    color: #dc3545;
}

/* Error: red exclamation icon, red left bar */
.alert.notification.notification-error::after {
    background-color: #dc3545;
}

.notification-error .notification-heading::before,
.notification-error > a.link > h4.notification-heading::before,
.notification-error > div > h4.notification-heading::before,
.notification-error > a.link > p:first-child::before,
.notification-error > div > p:first-child::before {
    content: '\f06a'; /* fa-exclamation-circle */
    color: #dc3545;
}

/* Override alert-dash-inner padding for notifications */
.alert-dash-inner .alert.notification {
    padding-right: 2.5rem;
}

/* Unseen notification highlight */
.alert.notification.unseen {
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15);
    margin: 0 7px 8px 0 !important;
}
