/* Component styles for Blog Forge SSG

Navigation, breadcrumbs, theme dropdown, and interactive components.
*/

/* Navigation System */
.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--theme-nav-border);
}

.blog-nav-home {
    color: var(--theme-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
}

.blog-nav-home:hover {
    text-decoration: underline;
}

/* Theme Dropdown */
.blog-theme-toggle {
    position: relative;
    display: inline-block;
}

.blog-theme-current {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--theme-nav-border);
    background: var(--theme-nav-bg);
    color: var(--theme-text);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.blog-theme-current:hover {
    background: var(--theme-border);
}

.blog-theme-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 180px;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--theme-nav-border);
    background: var(--theme-content-bg);
    box-shadow: var(--theme-shadow);
    z-index: 1000;
}

.blog-theme-toggle.open .blog-theme-dropdown {
    display: block;
}

.blog-theme-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--theme-text);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    text-align: left;
    transition: background-color 0.2s ease;
}

.blog-theme-option:hover {
    background: var(--theme-border);
}

.blog-theme-option.blog-theme-active {
    background: var(--theme-primary);
    color: var(--theme-background);
}

/* Breadcrumb System */
.blog-breadcrumb {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    background: var(--theme-nav-bg);
    border-bottom: 1px solid var(--theme-nav-border);
    transform: translateY(-100%);
    transition: transform 0.2s ease-out;
}

body.breadcrumb-visible .blog-breadcrumb {
    transform: translateY(0);
}

.blog-breadcrumb-logo {
    display: flex;
}

.blog-breadcrumb-logo img {
    display: block;
}

.blog-breadcrumb-home {
    display: flex;
    color: var(--theme-primary);
    text-decoration: none;
    align-items: center;
    gap: 6px;
}

.blog-breadcrumb-home:hover {
    color: var(--theme-link);
}

.blog-breadcrumb-home-icon {
    flex-shrink: 0;
}

.blog-breadcrumb-sep {
    color: var(--theme-muted);
    font-size: 0.875rem;
}

.blog-breadcrumb-title {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-theme-toggle-breadcrumb {
    margin-left: auto;
}

/* Scientific Visualization Controls */
.scientific-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--theme-code-bg);
    border-radius: 8px;
    align-items: center;
}

.scientific-controls button {
    padding: 6px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    background: var(--theme-content-bg);
    color: var(--theme-text);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.scientific-controls button:hover {
    background: var(--theme-border);
}

.scientific-controls textarea {
    flex: 1;
    min-width: 300px;
    padding: 8px;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    background: var(--theme-content-bg);
    color: var(--theme-text);
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-size: 0.875rem;
    resize: vertical;
}

.scientific-controls select,
.scientific-controls input[type="number"] {
    padding: 6px 8px;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    background: var(--theme-content-bg);
    color: var(--theme-text);
    font-size: 0.875rem;
    font-family: inherit;
}

/* Index Page Styles */
.blog-index {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-index-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.blog-index-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--theme-border);
}

.blog-index-list li:last-child {
    border-bottom: none;
}

.blog-index-link {
    color: var(--theme-link);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.blog-index-link:hover {
    color: var(--theme-primary);
    text-decoration: underline;
}

.blog-index-date {
    color: var(--theme-muted);
    font-size: 0.875rem;
}

/* LaTeX/KaTeX Styles */
.katex-block {
    margin: 1.5rem 0;
    text-align: center;
}

.katex-inline {
    font-family: 'KaTeX_Main', 'Times New Roman', serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-breadcrumb {
        padding: 8px 16px;
    }
    
    .blog-theme-dropdown {
        min-width: 160px;
    }
    
    .scientific-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .scientific-controls textarea {
        min-width: auto;
    }
}
