/* WAAL - Premium Business Network Design System */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');


:root {
    /* Color Palette - Flatter, deeper, "Silent Luxury" */
    --bg-deep: #08080a;
    --bg-surface: #121216;
    --bg-panel: #16161c;
    --border-subtle: rgba(255, 255, 255, 0.06);

    --accent-gold: #C5A02F;
    --accent-gold-hover: #D4AF37;

    --text-main: #ffffff;
    --text-muted: #6e6e78;
    --text-accent: #C5A02F;

    /* Spacing */
    --space-sm: 1.5rem;
    --space-md: 3rem;

    /* Effects - Minimalist */
    --border-radius: 4px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    font-weight: 300;
}

h1,
h2,
h3,
h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-gold {
    color: var(--accent-gold);
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

/* Refined Buttons */
.btn-gold {
    background-color: var(--accent-gold);
    color: #0c0c10;
    padding: 10px 24px;
    border: none;
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-gold:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 9px 23px;
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

/* Clean Panel - Replaces heavy glass */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    /* No blur, just clean surface */
}


/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #555 var(--bg-deep);
}


/* --- Dashboard / App Layout --- */

.app-container {
    display: grid;
    /* Reddit Style: Fixed Left Nav, Flexible Wide Feed, Fixed Right Sidebar */
    grid-template-columns: 270px 1fr 350px;
    align-items: start;
    gap: 16px;
    /* Reduced gap */
    max-width: 100%;
    /* Use full width available */
    margin: 0;
    padding: 10px 16px;
    /* Reduced outer padding */
    min-height: 100vh;
}

/* Sidebars */
.sidebar {
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding-right: 5px;

    /* Firefox default hidden */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

/* Show scrollbar on hover (Firefox) */
.sidebar:hover {
    scrollbar-color: #555 transparent;
}

/* WebKit Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
    /* Thinner */
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    /* Hidden by default */
    border-radius: 2px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
    background: #555;
    /* Visible on hover */
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    /* Reduced padding */
    color: var(--text-muted);
    border-radius: 4px;
    margin-bottom: 2px;
    /* Reduced margin */
    cursor: pointer;
    transition: all 0.2s ease;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    /* Smaller font */
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin: 20px 0 10px 12px;
    /* Reduced margins */
    opacity: 0.6;
}

.room-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    /* Reduced padding */
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 4px;
}

/* Feed */
.create-post-card {
    padding: 12px;
    /* Reduced */
    margin-bottom: 15px;
    /* Reduced */
    display: flex;
    gap: 10px;
}

.post-card {
    margin-bottom: 10px;
    /* Reduced between posts */
    border: 1px solid var(--border-subtle);
}

.post-header {
    padding: 12px 16px 0 16px;
    /* Reduced padding */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.post-content {
    padding: 8px 16px;
    /* Reduced padding */
    font-size: 0.95rem;
    color: #dedede;
    line-height: 1.5;
    /* Slightly tighter line height */
}

.post-actions {
    padding: 6px 16px 10px 16px;
    /* Reduced padding */
    gap: 20px;
    /* Gap between buttons */
    margin-top: 0;
    padding-top: 8px;
    display: flex;
    flex-direction: row;
    /* Force row */
    align-items: center;
}

/* Right Sidebar Widgets */
.trending-card {
    padding: 16px;
    /* Reduced */
    margin-bottom: 16px;
}

.trend-item {
    margin-bottom: 10px;
    /* Reduced */
    padding-bottom: 10px;
    /* Reduced */
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.trend-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trend-topic {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.trend-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 4px 0;
    line-height: 1.4;
}

/* --- Missing Styles Restored & Compacted --- */

.feed-col {
    min-width: 0;
    width: 100%;
    /* Optional cap for very wide screens */
    max-width: 900px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1100px) {
    .app-container {
        grid-template-columns: 220px 1fr;
        padding: 10px;
    }

    .trending-card,
    .sidebar:nth-child(3) {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }

    .sidebar {
        display: none;
    }
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(8, 8, 10, 0.98);
    /* Opaque dark */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 0;
    /* Compact */
    margin-bottom: 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    /* Uses full width of container generally */
    padding: 0 24px;
    /* Matches app-container padding */
}

.search-bar {
    position: relative;
    width: 400px;
}

.search-bar input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    /* Less rounded, more pro */
    padding: 6px 15px 6px 35px;
    /* Compact */
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Components */
.user-avatar {
    width: 32px;
    /* Smaller avatar */
    height: 32px;
    border-radius: 4px;
    /* Reddit style is often slightly squared or circle, sticking to rounded rect for 'pro' feel? No let's keep circle but small */
    border-radius: 50%;
    background: #333;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
}

.post-input-fake {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 8px 12px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
    border: 1px solid transparent;
}

.post-input-fake:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-subtle);
}

.room-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    background-color: currentColor;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.nav-item.active {
    border-left: 2px solid var(--accent-gold);
}

.nav-icon {
    width: 18px;
    margin-right: 12px;
    opacity: 0.8;
}

.room-item:hover {
    background: rgba(255, 255, 255, 0.04);
    padding-left: 18px;
}

.post-author {
    display: flex;
    gap: 10px;
    align-items: center;
}

.author-info h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.author-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-content p {
    margin-bottom: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.action-btn.active {
    color: var(--accent-gold);
}

/* Post Dropdown Menu */
.post-options-btn {
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: 0.2s;
}

.post-options-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.post-dropdown {
    position: absolute;
    top: 30px;
    right: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    width: 150px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.post-dropdown-item {
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.post-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.post-dropdown-item.danger {
    color: #ff6b6b;
}

.post-dropdown-item.danger:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Header User Dropdown */
.user-menu-container {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 180px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.user-dropdown-item {
    padding: 12px 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.user-dropdown-item ion-icon {
    font-size: 1.1rem;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* Cookie Consent Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(8, 8, 10, 0.95);
    border-top: 1px solid var(--border-subtle);
    padding: 20px;
    z-index: 9999;
    display: none;
    /* Hidden by default, toggled by JS */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cookie-text a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
}

.cookie-text a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* --- Mobile Menu Styles --- */

.mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
    margin-right: 15px;
    align-items: center;
    justify-content: center;
}

/* Mobile Sidebar & Menu Behaviors */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .app-header .header-inner {
        padding: 0 15px;
        /* Adjust padding for mobile header */
        justify-content: flex-start;
        /* Align start to keep menu/logo together */
    }

    .app-header .logo {
        margin-right: auto;
        /* Push search/actions to right or hide them if needed */
        font-size: 1.2rem !important;
        /* Slightly smaller logo */
    }

    /* Force search bar hidden or smaller on very small screens if needed, 
       but for now let's just ensure the hamburger works */

    /* OVERRIDE the previous display:none for sidebar */
    .sidebar {
        display: flex !important;
        /* Allow it to exist in DOM */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 250px;
        background: var(--bg-deep);
        z-index: 2000;
        /* High z-index to overlay everything */
        border-right: 1px solid var(--border-subtle);
        transform: translateX(-100%);
        /* Hidden off-screen left */
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        padding-top: 20px;
        max-height: 100vh;
    }

    .sidebar.active {
        transform: translateX(0);
        /* Slide in */
    }

    /* Close button inside sidebar (optional but good UX) */
    .sidebar-close-btn {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
        color: var(--text-muted);
        cursor: pointer;
    }

    /* Backdrop */
    .mobile-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 1500;
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-backdrop.active {
        opacity: 1;
        pointer-events: all;
    }
}