/* QAFlow - Header dropdown components (messages, notifications, user menu)
   Extracted from inline style="" attributes in includes/header.php */

.hdr-btn-reset {
    background: none;
    border: none;
    cursor: pointer;
}

.hdr-mr-8 {
    margin-right: 8px;
}

.hdr-more-chevron {
    font-size: 10px;
    margin-left: 2px;
}

.hdr-dropdown-wrapper {
    position: relative;
}

.hdr-flyout {
    display: none;
}

.hdr-flyout.show {
    display: block;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
}

.hdr-flyout.hdr-flyout-msg {
    width: 360px;
    max-height: 460px;
}

.hdr-flyout.hdr-flyout-notif {
    width: 380px;
    max-height: 480px;
}

.hdr-flyout-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hdr-flyout-title {
    font-size: 15px;
}

.hdr-flyout-badge {
    font-size: 11px;
}

.hdr-flyout-body {
    overflow-y: auto;
}

.hdr-flyout-body.hdr-flyout-body-msg {
    max-height: 320px;
}

.hdr-flyout-body.hdr-flyout-body-notif {
    max-height: 340px;
}

.hdr-flyout-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary, #6b7280);
}

.hdr-flyout-empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.3;
}

.hdr-flyout-footer {
    display: block;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #6366f1);
    text-decoration: none;
    border-top: 1px solid var(--border-color, #e5e7eb);
    transition: background 0.15s;
}

.hdr-flyout-footer:hover {
    background: var(--body-bg, #f9fafb);
}

/* Conversation (message) list item */
.hdr-convo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: background 0.15s;
}

.hdr-convo-item:hover {
    background: var(--body-bg, #f9fafb);
}

.hdr-convo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.hdr-convo-info {
    flex: 1;
    min-width: 0;
}

.hdr-convo-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.hdr-convo-preview {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdr-convo-time {
    font-size: 11px;
    color: var(--text-secondary, #9ca3af);
    flex-shrink: 0;
}

/* Notification list item */
.hdr-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: background 0.15s;
}

.hdr-notif-item:hover {
    background: var(--body-bg, #f9fafb);
}

.hdr-notif-item.is-unread {
    background: rgba(99, 102, 241, 0.04);
}

.hdr-notif-item.is-unread:hover {
    background: rgba(99, 102, 241, 0.08);
}

.hdr-notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.hdr-notif-icon-primary { background: rgba(var(--bs-primary-rgb, 99, 102, 241), 0.1); }
.hdr-notif-icon-info { background: rgba(var(--bs-info-rgb, 13, 202, 240), 0.1); }
.hdr-notif-icon-success { background: rgba(var(--bs-success-rgb, 25, 135, 84), 0.1); }
.hdr-notif-icon-warning { background: rgba(var(--bs-warning-rgb, 255, 193, 7), 0.1); }

.hdr-notif-body {
    flex: 1;
    min-width: 0;
}

.hdr-notif-title {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary, #1f2937);
    line-height: 1.3;
}

.hdr-notif-title.is-unread {
    font-weight: 600;
}

.hdr-notif-message {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdr-notif-time {
    font-size: 11px;
    color: var(--text-secondary, #9ca3af);
    margin-top: 2px;
}

.hdr-notif-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary, #6366f1);
    border-radius: 50%;
    margin-left: 6px;
}

/* User menu */
.hdr-avatar-frame {
    display: inline-block;
    border-radius: 50%;
}

.hdr-username-lg {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.3;
}

.hdr-reputation-sm {
    font-size: 13px;
    margin: 0;
}

.hdr-dropdown-close-mobile {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.5rem;
    color: #64748b;
    z-index: 10;
    padding: 5px 10px;
}

.hdr-pro-link {
    color: var(--primary, #6366f1);
    font-weight: 600;
}

.hdr-link-primary {
    color: var(--primary, #6366f1);
}

.hdr-mobile-ask-icon {
    font-size: 1.75rem;
}

.hdr-mobile-avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}
