/* ==========================================================================
   THX Membar (Top Member Bar - Standalone Header Bar)
   ========================================================================== */
.thx-membar {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
    position: relative;
    z-index: 99990;
    font-family: inherit;
    line-height: 1.5;
}

.thx-membar-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    min-height: 42px;
}

.thx-membar-inner .thx-header-items {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.thx-header-items {
    display: flex;
    align-items: center;
}

/* Minimal styles for header login link/dropdown */
.thx-header-items .thx-header-login {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-left: 10px;
}

/* Base Hub Style */
.thx-header-items .thx-header-hub {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: inherit;
    padding: .25rem .5rem;
    border-radius: .5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.thx-header-items .thx-header-hub:hover {
    background: rgba(17, 24, 39, .06);
}

.thx-header-items .thx-header-hub-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.thx-header-items .thx-header-caret {
    opacity: 0.5;
    transition: transform 0.2s;
}

.thx-header-items .thx-header-login--wrap:hover .thx-header-caret {
    transform: rotate(180deg);
}

.thx-header-items .thx-header-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dropdown Menu - Reduced gap and increased specificity */
.thx-header-items .thx-header-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: .75rem !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .15) !important;
    padding: 8px !important;
    display: none;
    z-index: 99999 !important;
}

/* Invisible bridge to prevent losing hover in the small gap */
.thx-header-items .thx-header-menu::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.thx-header-items .thx-header-login--wrap:hover .thx-header-menu,
.thx-header-items .thx-header-login--wrap:focus-within .thx-header-menu {
    display: block !important;
    animation: leFadeIn 0.2s;
}

@keyframes leFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.thx-header-items .thx-header-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: .5rem !important;
    text-decoration: none !important;
    color: #374151 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    border: none !important;
    margin: 0 !important;
    background: transparent !important;
}

.thx-header-items .thx-header-menu a:hover {
    background: #f3f4f6 !important;
    color: var(--tv-accent, #2563eb) !important;
}

.thx-header-items .thx-header-menu a .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    color: #6b7280 !important;
    transition: color 0.2s !important;
    display: inline-block !important;
}

.thx-header-items .thx-header-menu a:hover .dashicons {
    color: var(--tv-accent, #2563eb) !important;
}

.thx-header-items .thx-menu-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 6px 0;
}

.thx-header-items .thx-header-logout {
    color: #991b1b !important;
}

.thx-header-items .thx-header-logout:hover {
    background: #fef2f2 !important;
}

/* NEW: Clock Widget */
.thx-header-items .thx-clock-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    cursor: pointer;
    margin-right: 12px;
}

.thx-header-items .thx-clock-face {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid #555;
    border-radius: 50%;
    background: #fff;
}

.thx-header-items .thx-clock-face::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #555;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.thx-header-items .thx-clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: #555;
    border-radius: 2px;
}

.thx-header-items .thx-clock-hour {
    width: 2.5px;
    height: 5px;
    z-index: 2;
}

.thx-header-items .thx-clock-min {
    width: 2px;
    height: 8px;
    z-index: 1;
}

.thx-header-items .thx-clock-sec {
    width: 1px;
    height: 9px;
    background: #ef4444;
    z-index: 3;
}

.thx-header-items .thx-clock-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
    z-index: 10000;
    text-align: center;
    transform: translateY(10px);
    min-width: 160px;
}

.thx-header-items .thx-clock-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

.thx-header-items .thx-clock-wrapper:hover .thx-clock-tooltip,
.thx-header-items .thx-clock-tooltip.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.thx-header-items .thx-clock-time {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 1px;
    line-height: 1.2;
}

.thx-header-items .thx-clock-date {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 500;
}

.thx-header-items .thx-clock-tz {
    margin-top: 6px;
}

.thx-header-items .thx-clock-tz a {
    font-size: 11px;
    color: #9ca3af !important;
    text-decoration: none !important;
    border-bottom: 1px dashed #d1d5db !important;
    transition: all 0.2s;
    font-weight: normal !important;
}

.thx-header-items .thx-clock-tz a:hover {
    color: var(--tv-accent, #2563eb) !important;
    border-bottom-color: var(--tv-accent, #2563eb) !important;
}

/* NEW: Bell Widget */
.thx-header-items .thx-notif-wrapper {
    position: relative;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.thx-header-items .thx-bell-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.2s;
    color: #555;
}

.thx-header-items .thx-bell-btn:hover {
    background: #f3f4f6;
    color: var(--tv-accent, #2563eb);
}

.thx-header-items .thx-bell-icon {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
}

/* NEW: Header Buttons (Guest) */
.thx-header-items .thx-hw-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: all 0.2s;
    margin-left: 10px;
}

.thx-header-items .thx-hw-btn--login {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.thx-header-items .thx-hw-btn--login:hover {
    border-color: #9ca3af;
    background: #f9fafb;
    color: var(--tv-accent, #2563eb);
}

.thx-header-items .thx-hw-btn--admin {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    padding: 6px 14px;
    margin-right: 5px;
}

.thx-header-items .thx-hw-btn--admin:hover {
    background: #fde68a;
    border-color: #fbbf24;
    color: #78350f;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.thx-header-items .thx-hw-btn--admin .dashicons {
    font-size: 16px;
    margin-right: 6px;
    width: auto;
    height: auto;
}

.thx-header-items .thx-hw-btn--reg {
    background: var(--tv-accent, #2563eb);
    color: #fff;
    border: 1px solid transparent;
}

.thx-header-items .thx-hw-btn--reg:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}