/* This is a theme that extends the base style.css. 
 * This should not contain key functionality, just aesthetic improvements.
 * This theme is soft & cozy - approachable, warm, friendly. 
 */

:root {
    --bg: #faf8f5;
    --bg-card: #ffffff;
    --bg-hover: #f5f0e8;
    --border: #e8e0d5;
    --accent: #7c5cbf;
    --accent-light: #9d7fe0;
    --text: #3d3d3d;
    --text-muted: #888;
    --warm: #e07850;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', -apple-system, sans-serif;
    font-size: 15px;
}

.main-container {
    background: var(--bg);
}

.content {
    background: var(--bg);
}

/* Sticky Header */
.sticky-header {
    background: var(--bg);
}

.header-row {
    border-bottom: 1px solid var(--border);
}

.header-logo {
    color: var(--accent);
}

.header-info {
    color: var(--text-muted);
}

/* Sidebar */
.sidebar {
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.04);
}

.sidebar-content h3 {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.2em;
}

.sidebar-content a {
    color: var(--accent);
}

.sidebar-content p {
    line-height: 1.6;
}

.sidebar-close-desktop {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
}

.sidebar-close-desktop:hover {
    background: var(--bg-hover);
    border-color: var(--accent-light);
    color: var(--text);
}

.sidebar-resize-handle:hover,
.main-container.resizing .sidebar-resize-handle {
    background: var(--border);
}

/* Filter Bar */
.filter-bar-container {
    background: var(--bg);
}

.filter-bar {
    padding: 16px 0 16px 24px;
}

.filter-button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 20px;
    padding: 10px 16px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}

.filter-button:hover {
    background: var(--bg-hover);
    border-color: var(--accent-light);
    box-shadow: 0 2px 6px rgba(124, 92, 191, 0.12);
}

.filter-clear, .filter-clear-all {
    background: var(--bg-hover);
    border: none;
    color: var(--text-muted);
    border-radius: 12px;
    padding: 6px 10px;
}

.filter-clear:hover, .filter-clear-all:hover {
    background: var(--border);
    color: var(--text);
}

.filter-dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    top: 52px;
    right: unset;
}

.filter-dropdown-menu input[type="text"] {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    margin: 8px 12px;
    width: calc(100% - 24px);
}

.filter-dropdown-menu input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.1);
}

.filter-dropdown-menu label {
    color: var(--text);
    padding: 10px 16px;
    border-radius: 0;
}

.filter-dropdown-menu label:hover {
    background: var(--bg-hover);
}

#table-container {
    padding: 0 24px 24px 24px;
}

/* Info Bar */
.info-bar {
    color: var(--text-muted);
}

.info-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.info-link:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

/* Data Grid */
.data-grid {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.grid-header {
    background: var(--bg-hover);
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7em;
    letter-spacing: 0.06em;
    padding: 14px 12px;
}

.grid-header:first-child {
    border-left: 1px solid var(--border);
    border-top-left-radius: 11px;
    box-shadow: -12px -12px 0 12px var(--bg);
}

.grid-header:has(+ .capability-label) {
    border-top-right-radius: 11px;
    box-shadow: 12px -12px 0 12px var(--bg);
}

.capability-label:not(:has(~ .capability-label)) + .grid-cell {
    border-bottom-left-radius: 11px;
}

.data-grid > .grid-cell:last-child {
    border-bottom-right-radius: 11px;
}

.grid-cell {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    padding: 12px;
}

.capability-label + .grid-cell {
    border-left: 1px solid var(--border);
}

.capability-label {
    color: var(--text-muted);
}

.grid-cell code {
    background: var(--bg);
    color: var(--warm);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8em;
    padding: 0.0em 0.4em;
}

.clickable {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.clickable:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.variation {
    color: var(--text-muted);
}

.variant-toggle {
    color: var(--text-muted);
    font-weight: 400;
}

.no-results {
    color: var(--text-muted);
    padding: 60px;
}

/* Tool Cards */
.tool-card:hover {
    background: var(--bg-hover);
}

.tool-card-full .tool-card-thumb {
    background: var(--border);
    border-radius: 8px;
}

.tool-card-full .tool-card-name {
    color: var(--accent);
}

.tool-card-compact .tool-card-thumb-small {
    background: var(--border);
    border-radius: 4px;
}

.tool-card-compact .tool-card-name {
    color: var(--accent);
}

.header-logo a.header-logo-link {
    color: var(--accent);
    text-decoration: none;
}

.header-logo a.header-logo-link:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.header-breadcrumb-sep {
    color: var(--text-muted);
}

.newsletter-header-date {
    color: var(--text-muted);
}

/* Newsletter Pages */
.newsletter-page {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Signup Banner */
.signup-banner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.signup-input {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
}

.signup-input:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.1);
}

.signup-button {
    background: var(--accent);
    border-radius: 8px;
    font-weight: 500;
}

.signup-button:hover {
    background: var(--accent-light);
}

.signup-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
}

.signup-error {
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
}

/* Newsletter Content */
.newsletter-date {
    color: var(--text-muted);
}

.newsletter-footer {
    border-color: var(--border);
}

.newsletter-footer-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.newsletter-footer-link:hover {
    text-decoration: underline;
}

/* Newsletter List */
.newsletter-list-item {
    border-color: var(--border);
}

.newsletter-list-link:hover {
    background: var(--bg-hover);
}

.newsletter-list-title {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.newsletter-list-link:hover .newsletter-list-title {
    text-decoration: underline;
}

.newsletter-list-date {
    color: var(--text-muted);
}

.no-newsletters {
    color: var(--text-muted);
}

/* Screenshot Gallery */
.gallery-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.gallery-thumb {
    border: 2px solid var(--border);
    border-radius: 6px;
    opacity: 0.6;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumb:hover {
    opacity: 0.9;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--accent);
}

/* Tabs */
.tab {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-muted);
    border-radius: 12px;
    transition: all 0.15s ease;
}

.tab:hover {
    background: var(--bg-hover);
}

.tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    font-weight: 600;
}

.tab-bar-toggle {
    color: var(--accent);
    font-weight: 500;
}

.tab-bar-toggle:hover {
    text-decoration: underline;
}

.sub-tab {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-muted);
    border-radius: 12px;
    transition: all 0.15s ease;
}

.sub-tab:hover {
    background: var(--bg-hover);
}

.sub-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.tab-section-label {
    color: var(--text-muted);
}

/* Mobile drawer */
@media (max-width: 768px) {
    #table-container {
        padding: 0 12px 120px 12px;
    }

    .filter-bar {
        padding: 12px 0 12px 12px;
    }

    .sidebar {
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
        border-radius: 20px 20px 0 0;
    }

    .sidebar-handle {
        background: var(--border);
        width: 48px;
        height: 5px;
        border-radius: 3px;
    }

    .sidebar-close-mobile {
        background: var(--accent);
        color: white;
        border-radius: 12px;
        font-weight: 500;
    }

    .sidebar-overlay {
        background: rgba(0, 0, 0, 0.25);
    }

    /* Carousel buttons */
    .carousel-btn {
        background: var(--bg-card);
        border: 1px solid var(--border);
        color: var(--text);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

.tool-overflow-toggle {
    color: var(--accent);
}

.tool-overflow-toggle:hover {
    color: var(--accent-light);
}

/* List View */
.list-section-row {
    scrollbar-color: var(--border) transparent;
}

.list-section-cell {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
}

.cell-product-name {
    background: var(--bg-hover);
    color: var(--accent);
    border-radius: 8px 8px 0 0;
}

.cell-product-name:hover {
    color: var(--accent-light);
}

.cell-product-name span[style] {
    color: var(--text-muted);
}

.tool-card code {
    background: var(--bg);
    color: var(--warm);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8em;
    padding: 0.0em 0.4em;
}

.filter-group-label {
    color: var(--text-muted);
}