/************************************
 *
 * Notifications icon and modal
 *
 *************************************/

.topbar .notifications-panel.shown {
    display: block !important;
}

.topbar .right-panel .notifications-icon .notifications-panel.flyout {
    position: absolute;
    right: 0;
    width: 500px;
    background: var(--main-background-color);
    cursor: default;
    z-index: var(--z-index-notifications-panel);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(201, 148, 58, 0.06);
}

.topbar .right-panel .notifications-icon .notifications-panel.flyout .notifications-list {
    max-height: 600px;
    overflow-y: auto;
}

.topbar .right-panel .notifications-icon .notifications-panel.flyout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(212, 82, 26, 0.4) 25%, rgba(201, 148, 58, 0.5) 50%, rgba(74, 173, 168, 0.3) 75%, transparent 95%);
}

.topbar .right-panel .notifications-icon .notifications-panel.flyout::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-top: 1px solid rgba(201, 148, 58, 0.4);
    border-right: 1px solid rgba(201, 148, 58, 0.4);
    pointer-events: none;
    z-index: 3;
}

.topbar .right-panel .notifications-icon .notifications-panel .flyout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 11px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
}

.topbar .right-panel .notifications-icon .notifications-panel .flyout-title {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mist);
    display: flex;
    align-items: center;
    gap: 7px;
}

.topbar .right-panel .notifications-icon .notifications-panel .flyout-title::before {
    content: '✦';
    font-size: 8px;
    color: var(--ember);
}

.topbar .right-panel .notifications-icon .notifications-panel .mark-all-read {
    font-size: var(--primary-font-size);
    color: var(--mist-dim);
    font-style: italic;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: 'Crimson Pro', serif;
}

.topbar .right-panel .notifications-icon .notifications-panel .mark-all-read:hover {
    color: var(--gold);
}

.topbar .right-panel .notifications-icon .notifications-panel .flyout-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
    text-align: center;
}

.topbar .right-panel .notifications-icon .notifications-panel .flyout-footer .show-more-link {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mist-dim);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.topbar .right-panel .notifications-icon .notifications-panel .flyout-footer .show-more-link:hover {
    color: var(--gold);
}

/************************************
 *
 * Individual notification
 *
 *************************************/

.notifications-icon .notifications-panel .notification {
    display: flex;
    gap: 11px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(201, 148, 58, 0.06);
    transition: background 0.2s;
    position: relative;
    cursor: default;
}

.notifications-icon .notifications-panel .notification.unread {
    background: rgba(201, 148, 58, 0.03);
    cursor: pointer;
}

.notifications-icon .notifications-panel .notification.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--ember), var(--gold));
    box-shadow: 0 0 6px rgba(200, 88, 26, 0.4);
}

.notifications-icon .notifications-panel .notification .notification-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    font-size: 14px;
}

.notifications-icon .notifications-panel .notification .notification-body {
    flex: 1;
    min-width: 0;
}

.notifications-icon .notifications-panel .notification .notification-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.notifications-icon .notifications-panel .notification .notification-title {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mist-dim);
}

.notifications-icon .notifications-panel .notification .notification-date {
    font-size: 12px;
    color: var(--mist-dim);
    font-style: italic;
}

.notifications-icon .notifications-panel .notification .notification-text {
    font-size: var(--primary-font-size);
    color: var(--mist);
    line-height: 1.45;
}

.notifications-icon .notifications-panel .notification.unread .notification-text {
    color: var(--cream);
}

/************************************
 *
 * Colors per type
 *
 *************************************/

.notifications-icon .notifications-panel .notification .notification-icon.INFO {
    background: rgba(74, 173, 168, 0.12);
    border: 1px solid rgba(74, 173, 168, 0.25);
    color: var(--teal);
}

.notifications-icon .notifications-panel .notification .notification-icon.SUCCESS {
    background: rgba(74, 154, 106, 0.12);
    border: 1px solid rgba(74, 154, 106, 0.25);
    color: var(--green);
}

.notifications-icon .notifications-panel .notification .notification-icon.WARNING {
    background: rgba(200, 88, 64, 0.12);
    border: 1px solid rgba(200, 88, 64, 0.25);
    color: var(--coral);
}

.notifications-icon .notifications-panel .notification .notification-icon.ERROR {
    background: rgba(200, 88, 64, 0.12);
    border: 1px solid rgba(200, 88, 64, 0.25);
    color: var(--coral);
}

.notifications-panel .no-notifications {
    padding: 32px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--mist-dim);
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/************************************
 *
 * Pop-up notifications that are shown in the upper right corner of the screen.
 *
 *************************************/

.pop-up-notifications {
    position: fixed;
    right: 5px;
    bottom: 5px;
    z-index: var(--z-index-pop-up-notification);
}

.pop-up-notifications > * {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 148, 58, 0.05);
    display: block;
    width: 20vw;
    margin: 5px;
    z-index: var(--z-index-pop-up-notification);
}

.pop-up-notifications .pop-up-notification .body {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px 13px 18px;
}

.pop-up-notifications .pop-up-notification .accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.pop-up-notifications .pop-up-notification .notification-content {
    flex: 1;
    min-width: 0;
}

.pop-up-notifications .pop-up-notification .text {
    font-size: 14px;
    color: var(--cream);
    line-height: 1.4;
}

.pop-up-notifications .pop-up-notification .title {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.pop-up-notifications .pop-up-notification button {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--mist-dim);
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 1px;
}

.pop-up-notifications .pop-up-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    pointer-events: none;
}

.pop-up-notifications .pop-up-notification button:hover {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.06);
}

/*********************************************
 *
 * Info
 *
 **********************************************/

.pop-up-notifications .notification-info .timeout-bar {
    background: linear-gradient(90deg, var(--teal-dim), var(--teal));
    box-shadow: 0 0 6px rgba(74, 173, 168, 0.5);
}

.pop-up-notifications .notification-info::before {
    background: linear-gradient(90deg, transparent, rgba(74, 173, 168, 0.7), transparent);
}

.pop-up-notifications .notification-info .accent {
    background: linear-gradient(180deg, var(--teal), var(--teal-dim));
    box-shadow: 0 0 8px rgba(74, 173, 168, 0.4);
}

.pop-up-notifications .notification-info .title {
    color: var(--teal);
}

/*********************************************
 *
 * Success
 *
 **********************************************/

.pop-up-notifications .notification-success .timeout-bar {
    background: linear-gradient(90deg, #2d6a48, #4a9a6a);
    box-shadow: 0 0 6px rgba(74, 154, 106, 0.5);
}

.pop-up-notifications .notification-success::before {
    background: linear-gradient(90deg, transparent, rgba(74, 154, 106, 0.7), transparent);
}

.pop-up-notifications .notification-success .accent {
    background: linear-gradient(180deg, #4a9a6a, #2d6a48);
    box-shadow: 0 0 8px rgba(74, 154, 106, 0.4);
}

.pop-up-notifications .notification-success .title {
    color: var(--green);
}

/*********************************************
 *
 * Warning
 *
 **********************************************/

.pop-up-notifications .notification-warning .timeout-bar {
    background: linear-gradient(90deg, var(--ember), var(--gold));
    box-shadow: 0 0 6px rgba(201, 148, 58, 0.5);
}

.pop-up-notifications .notification-warning::before {
    background: linear-gradient(90deg, transparent, rgba(201, 148, 58, 0.7), transparent);
}

.pop-up-notifications .notification-warning .accent {
    background: linear-gradient(180deg, var(--gold), var(--ember));
    box-shadow: 0 0 8px rgba(201, 148, 58, 0.4);
}

.pop-up-notifications .notification-warning .title {
    color: var(--gold);
}

/*********************************************
 *
 * Error
 *
 **********************************************/

.pop-up-notifications .notification-error .timeout-bar {
    background: linear-gradient(90deg, #8a2a1a, var(--coral));
    box-shadow: 0 0 6px rgba(200, 88, 64, 0.5);
}

.pop-up-notifications .notification-error::before {
    background: linear-gradient(90deg, transparent, rgba(200, 88, 64, 0.7), transparent);
}

.pop-up-notifications .notification-error .accent {
    background: linear-gradient(180deg, var(--coral), #8a2a1a);
    box-shadow: 0 0 8px rgba(200, 88, 64, 0.4);
}

.pop-up-notifications .notification-error .title {
    color: var(--coral)
}

/*********************************************
 *
 * Timeout bar
 *
 **********************************************/

.pop-up-notifications .timeout-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 0 1px 1px 0;
    height: 2px;
    width: 100%;
    animation: shrink 5s linear forwards;
}

.pop-up-notifications .pop-up-notification .timeout-wrapper {
    height: 2px;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
}

.pop-up-notifications .pop-up-notification:hover .timeout-bar {
    animation-play-state: paused;
}

@keyframes shrink {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}
