/* rt-header-tools.css — Site top bar: welcome + notifications + profile */

.rt-header-tools {
    background: #3A1020;
    color: #fff;
    min-height: 30px;
    width: 100%;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.2;
}

.rt-header-tools__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 30px;
    padding: 0 16px;
    max-width: 100%;
    box-sizing: border-box;
}

.rt-header-tools__welcome {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.rt-header-tools__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.rt-header-tools__action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 4px 10px !important;
    border: none !important;
    border-radius: 6px;
    background: transparent !important;
    color: #fff !important;
    text-decoration: none;
    font: inherit !important;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: none !important;
}

.rt-header-tools__action:hover,
.rt-header-tools__action:focus-visible {
    background: rgba(244, 236, 221, 0.10) !important;
    color: #fff !important;
    outline: none;
}

.rt-header-tools__icon {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rt-header-tools__label {
    font-size: 14px;
    font-weight: 500;
}

.rt-header-tools__badge {
    position: absolute;
    top: 0;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #3A1020;
    border-radius: 999px;
    background: #E8731C;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-sizing: border-box;
}

/* Notifications dropdown — portal to body via JS; above OceanWP sticky header */
.rt-header-tools__dropdown {
    position: fixed;
    top: 40px;
    right: 16px;
    z-index: 100001 !important;
    width: min(340px, calc(100vw - 32px));
    max-height: min(480px, calc(100vh - 56px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e0d4;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(58, 16, 32, 0.22);
    color: #2c2c2c;
}

.rt-header-tools__dropdown[hidden] {
    display: none !important;
}

.rt-header-tools__dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eee6da;
    font-weight: 600;
    font-size: 14px;
}

.rt-header-tools__mark-all {
    border: none !important;
    background: transparent !important;
    color: #4A1626 !important;
    font: inherit !important;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 !important;
    box-shadow: none !important;
}

.rt-header-tools__mark-all:hover {
    text-decoration: underline;
}

.rt-header-tools__dropdown-list {
    overflow-y: auto;
    flex: 1;
}

.rt-header-tools__dropdown-empty,
.rt-header-tools__item {
    padding: 12px 14px;
    border-bottom: 1px solid #f0ebe3;
    font-size: 13px;
    line-height: 1.45;
    color: #555;
}

.rt-header-tools__item {
    cursor: pointer;
    transition: background 0.15s;
}

.rt-header-tools__item:hover {
    background: #faf7f2;
}

.rt-header-tools__item.is-unread {
    background: #fdf6ef;
}

.rt-header-tools__item-actor {
    font-weight: 600;
    color: #2c2c2c;
}

.rt-header-tools__item-book {
    font-style: italic;
    color: #4A1626;
}

.rt-header-tools__item-time {
    margin-top: 4px;
    font-size: 11px;
    color: #999;
}

.rt-header-tools__item-badge {
    display: inline-block;
    margin-right: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #4A1626;
}

.rt-header-tools__item-excerpt {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.rt-header-tools__item-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #E8731C;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .rt-header-tools__inner {
        padding: 0 12px;
        gap: 10px;
    }

    .rt-header-tools__welcome {
        font-size: 13px;
    }

    .rt-header-tools__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .rt-header-tools__action {
        min-width: 48px;
        min-height: 48px;
        padding: 6px 8px !important;
    }

    .rt-header-tools__dropdown {
        right: 8px;
        left: 8px;
        width: auto;
        max-height: calc(100vh - 120px);
    }
}
