/* Layout CSS */

/* Sidebar */
.sidebar-logo-container {
    padding: 16px;
    font-weight: bold;
    font-size: 1.2rem;
}

.sidebar-logo-link {
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-badge-danger {
    background: #e0245e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: auto; /* Push content to the right, keep badge on the left */
}

.sidebar-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 16px;
    width: auto;
}

.sidebar-profile-avatar {
    width: 24px;
    height: 24px;
}

.sidebar-join-container {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-full-width {
    width: 100%;
    justify-content: center;
}

.text-danger {
    color: #ff4545 !important;
}

/* Widgets */
.widgets-container {
    border-radius: var(--radius);
    padding: 20px;
}

.widgets-title {
    margin-top: 0;
    font-size: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.widgets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.widget-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    transition: background 0.2s, transform 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
}

.widget-item:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}

.widget-item-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.widget-avatar {
    width: 20px;
    height: 20px;
    border-width: 1px;
}

.widget-item-content {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
    word-break: break-word;
}

.widget-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile spacer */
.spacer-24 {
    width: 24px;
}

/* =========================================================
   Brand Wordmark (Space Grotesk)
   ========================================================= */
.brand-wordmark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-wordmark img {
    height: 1.6em;
    width: auto;
    display: block;
    flex-shrink: 0;
}

/* =========================================================
   Feed Header Bar (centre column logo strip)
   ========================================================= */
.feed-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--background);
}

/* =========================================================
   Sidebar Profile Card (Bluesky-style)
   ========================================================= */
.sidebar-profile-card-spacer {
    flex: 1;
}

.sidebar-profile-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
    margin: 4px 8px 8px;
}

.sidebar-profile-card:hover {
    background: var(--surface-hover);
}

.sidebar-profile-card-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.sidebar-profile-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sidebar-profile-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-card-handle {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-card-dots {
    font-size: 1.3rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.2s;
}

.sidebar-profile-card:hover .sidebar-profile-card-dots {
    color: var(--text-main);
}

/* Dropdown Menu */
.sidebar-profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 200;
    animation: fadeInDown 0.15s ease;
}

.sidebar-profile-menu.open {
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s;
}

.sidebar-profile-menu-item:hover {
    background: var(--surface-hover);
}

.sidebar-profile-menu-item i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.sidebar-profile-menu-item-danger {
    color: #ff4545;
}

.sidebar-profile-menu-item-danger i {
    color: #ff4545;
}

/* Twitch Clean theme adjustments */
body.theme-twitch-clean .feed-header-bar {
    background: var(--background);
}

.widgets-sticky-container {
    position: sticky;
    top: 80px;
}

.settings-nav-link {
    text-align: left;
    justify-content: flex-start;
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.1);
}

.settings-nav-link i {
    margin-right: 8px;
}