/* Blog Note UI - Inspired by Notion & OceanAds Design 2025 */

/* Import main design variables if not already present in the parent */
@import url('../design-2025.css');

:root {
    --sidebar-width: 280px;
    --content-max-width: 900px;
    /* Comfortable reading width */
    --header-height: 60px;
    --note-bg: var(--black, #0a0a0a);
    --sidebar-bg: var(--black-soft, #141414);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: var(--beige, #f4f1ea);
    --text-secondary: rgba(244, 241, 234, 0.6);
    --accent-color: var(--accent, #ff4d00);
}

body {
    background-color: var(--note-bg);
    color: var(--text-primary);
    font-family: var(--font-sans, 'Inter', sans-serif);
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* App-like feel */
    margin: 0;
}

/* Sidebar - The "File Explorer" */
.note-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    /* Reset any inherited fixed positioning from nav tags in imported CSS */
    position: relative !important;
    z-index: 20;
}

.sidebar-header {
    padding: 0 24px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px;
}

.menu-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 12px;
    margin-top: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.menu-item.active {
    background-color: rgba(255, 77, 0, 0.1);
    color: var(--accent-color);
    font-weight: 500;
}

.menu-item .icon {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* User Profile / Status at bottom of sidebar */
.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
}

.user-info {
    font-size: 0.85rem;
    color: var(--text-primary);
}

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

/* Main Content Area - The "Notepad" */
.note-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-color: var(--note-bg);
}

/* Top Bar - Breadcrumbs & Actions */
.note-topbar {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    /* topbar usually minimal in note apps */
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-separator {
    color: var(--border-color);
}

.topbar-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

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

/* The Article Content */
.note-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 100px;
    /* Bottom padding for scroll space */
}

.note-article {
    max-width: var(--content-max-width);
    margin: 40px auto 0;
    padding-bottom: 60px;
}

/* Cover Image (Optional, like Notion) */
.note-cover {
    height: 200px;
    width: 100%;
    object-fit: cover;
    margin-bottom: 40px;
    border-radius: 0;
    /* Full width edge to edge if possible, or contained */
    display: none;
    /* Hidden by default */
}

.note-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.note-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.note-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-primary);
}

.note-properties {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.9rem;
}

.property-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.property-label {
    width: 100px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-value {
    color: var(--text-primary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    background-color: rgba(255, 77, 0, 0.15);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Content Typography */
.note-body {
    font-family: var(--font-serif);
    /* Serif for better reading experience */
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.note-body h2 {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    margin-top: 2.5em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--border-color);
}

.note-body h3 {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.note-body p {
    margin-bottom: 1.5em;
}

.note-body ul,
.note-body ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.note-body li {
    margin-bottom: 0.5em;
}

.note-body blockquote {
    border-left: 3px solid var(--accent-color);
    margin: 2em 0;
    padding-left: 20px;
    font-style: italic;
    color: var(--text-secondary);
    background: linear-gradient(90deg, rgba(255, 77, 0, 0.05) 0%, transparent 100%);
    padding: 20px;
    border-radius: 4px;
}

/* Callout Blocks (Notion style) */
.callout-block {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 24px;
    margin: 2em 0;
    display: flex;
    gap: 16px;
    border: 1px solid transparent;
}

.callout-block:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.callout-content h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.callout-content p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Images */
.note-body img {
    border-radius: 8px;
    margin: 2em 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

.note-body figcaption {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: -1.5em;
    margin-bottom: 2.5em;
}

/* Table Style */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.comparison-table th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .note-sidebar {
        position: fixed !important;
        /* Force fixed on mobile */
        left: -100%;
        height: 100vh;
        z-index: 1000;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .note-sidebar.active {
        left: 0;
    }

    .note-article {
        padding: 0 20px 60px;
    }

    .note-title {
        font-size: 2rem;
    }

    /* Toggle Button should be visible on mobile */
    .mobile-menu-toggle {
        display: block !important;
    }
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    margin-right: 12px;
}

/* Grid Layouts inside content */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 2em 0;
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Highlight boxes as cards */
.highlight-box {
    background: var(--black-soft);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Code blocks if needed */
pre {
    background: #1e1e1e;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin: 1.5em 0;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* =========================================
   DAY MODE (Light Theme) for Note UI
   ========================================= */
body.day-mode {
    --note-bg: #f8f6f0;
    --sidebar-bg: #edeae2;
    --border-color: rgba(0, 0, 0, 0.1);
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.6);
    --accent-color: #ff4d00;
    --black-soft: #e8e4d8;
}

body.day-mode .note-sidebar {
    background-color: var(--sidebar-bg);
}

body.day-mode .note-main {
    background-color: var(--note-bg);
}

body.day-mode .callout-block {
    background-color: rgba(0, 0, 0, 0.03);
}

body.day-mode .comparison-table th {
    background-color: rgba(0, 0, 0, 0.05);
}

body.day-mode pre {
    background: #2d2d2d;
    color: #f4f1ea;
}

body.day-mode .tag-pill {
    background-color: rgba(255, 77, 0, 0.12);
}

body.day-mode .theme-toggle-btn {
    border-color: rgba(0, 0, 0, 0.15);
}

body.day-mode .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* Force solid mobile sidebar background */
@media (max-width: 768px) {
    .note-sidebar {
        background-color: #141414 !important;
        /* Solid dark */
    }

    body.day-mode .note-sidebar {
        background-color: #edeae2 !important;
        /* Solid light */
    }
}