/* Capacitor List Generator — Styles */
/* Matches Cable Wizard design system */

:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #e94560;
    --accent-hover: #c73d54;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --text: #333;
    --text-light: #666;
    --bg: #f5f5f5;
    --white: #fff;
    --border: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* Header */
.site-header { background: var(--primary); color: white; padding: 14px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-logo { display: flex; align-items: center; text-decoration: none; }
.site-logo-img { height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 0; }
.site-nav a { color: rgba(255,255,255,0.8); text-decoration: none; font-weight: 500; margin-left: 24px; transition: color 0.2s; }
.site-nav a:hover { color: white; }
.site-nav a.active { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; }

/* Language switcher */
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: 16px; }
.lang-switch a { color: rgba(255,255,255,0.5); font-size: 0.75rem; font-weight: 600; padding: 2px 6px; border-radius: 3px; transition: all 0.2s; letter-spacing: 0.5px; text-decoration: none; }
.lang-switch a:hover { color: rgba(255,255,255,0.9); }
.lang-switch a.active { color: white; background: rgba(255,255,255,0.15); }
.lang-sep { color: rgba(255,255,255,0.3); font-size: 0.7rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.hero { background: var(--primary); color: white; text-align: center; padding: 48px 0 40px; }
.hero h1 { font-size: 2rem; margin-bottom: 8px; }
.hero p { color: rgba(255,255,255,0.7); font-size: 1.05rem; max-width: 650px; margin: 0 auto; }

/* Main content area */
.main-content { padding: 32px 0 60px; }

/* Board selector */
.board-selector { margin-bottom: 32px; }
.section-title { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.section-sub { text-align: center; color: var(--text-light); margin-bottom: 24px; font-size: 0.95rem; }

/* Category chips */
.chip-bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 6px 14px; border-radius: 20px; border: 2px solid var(--border); background: var(--white); color: var(--text-light); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-active { border-color: var(--accent); background: var(--accent); color: white; }
.chip-active:hover { background: var(--accent-hover); }

/* Board grid */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; max-width: 1000px; margin: 0 auto; }
.board-card { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); padding: 20px 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.board-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.board-card.selected { border-color: var(--accent); background: #fff0f3; }
.board-card-icon { font-size: 2rem; margin-bottom: 8px; }
.board-card-name { font-weight: 600; font-size: 0.95rem; }
.board-card-sub { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.board-card-count { font-size: 0.72rem; color: var(--accent); font-weight: 500; margin-top: 6px; }

/* Back button */
.btn-back { background: transparent; border: none; color: var(--text-light); cursor: pointer; font-size: 0.9rem; padding: 8px 0; margin-bottom: 16px; }
.btn-back:hover { color: var(--accent); }

/* Board detail view */
.board-detail { max-width: 1100px; margin: 0 auto; }
.board-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.board-header-icon { font-size: 2.5rem; }
.board-header-info h2 { font-size: 1.5rem; font-weight: 700; }
.board-header-info p { color: var(--text-light); font-size: 0.9rem; }

/* Disclaimer banner */
.disclaimer { background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 24px; font-size: 0.85rem; color: #6d4c00; display: flex; align-items: flex-start; gap: 10px; }
.disclaimer-icon { font-size: 1.2rem; flex-shrink: 0; }

/* Tabs */
.tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab { padding: 10px 20px; font-size: 0.9rem; font-weight: 600; color: var(--text-light); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Capacitor table */
.cap-table-wrap { overflow-x: auto; }
.cap-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cap-table th { background: var(--primary); color: white; text-align: left; padding: 12px 16px; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.cap-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.cap-table tr:last-child td { border-bottom: none; }
.cap-table tr:hover td { background: #f9f9f9; }

/* Confidence badges */
.confidence { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.confidence-high { background: #d4edda; color: #155724; }
.confidence-medium { background: #fff3cd; color: #856404; }
.confidence-low { background: #f8d7da; color: #721c24; }

/* Leaker badge */
.leaker-badge { display: inline-block; background: var(--danger); color: white; padding: 1px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; margin-left: 6px; }

/* Shopping list */
.shop-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.shop-table th { background: var(--primary); color: white; text-align: left; padding: 12px 16px; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.shop-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.shop-table tr:last-child td { border-bottom: none; }
.shop-table tr:hover td { background: #f9f9f9; }
.shop-total { background: #f0f7ff; font-weight: 700; }
.shop-total td { border-top: 2px solid var(--accent); }

/* Shop links */
.shop-links { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: 0.78rem; font-weight: 500; text-decoration: none; transition: all 0.2s; }
.shop-link:hover { border-color: var(--accent); color: var(--accent); }

/* Export buttons */
.export-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn { padding: 8px 18px; border-radius: var(--radius); border: none; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; border-radius: 6px; }

/* Footer */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.5); text-align: center; padding: 24px 0; font-size: 0.85rem; margin-top: 40px; }
.site-footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.site-footer a:hover { color: white; }
.footer-links { display: flex; gap: 16px; justify-content: center; }

/* Resources panel */
.resources-panel { padding: 8px 0; }
.resources-loading, .resources-empty { padding: 24px 0; text-align: center; color: #888; }
.resources-empty a { color: var(--accent); }
.resource-group { margin-bottom: 24px; }
.resource-group-title { font-size: 1rem; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.resource-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.resource-card { display: flex; gap: 12px; padding: 14px; background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 10px; transition: border-color 0.15s; }
.resource-card:hover { border-color: var(--accent); }
.resource-thumb { width: 80px; height: 80px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: #f3f4f6; }
.resource-thumb img { width: 100%; height: 100%; object-fit: cover; }
.resource-info { flex: 1; min-width: 0; }
.resource-info strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.resource-info p { font-size: 0.82rem; color: #666; margin: 0 0 8px; line-height: 1.4; }
.resource-links { display: flex; gap: 12px; flex-wrap: wrap; }
.resource-link { font-size: 0.82rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.resource-link:hover { text-decoration: underline; }
.resources-footer { margin-top: 16px; font-size: 0.85rem; color: #888; }
.resources-footer a { color: var(--accent); }

/* Sources attribution */
.sources-section { margin-top: 20px; padding: 14px 18px; background: #f8f9fa; border-radius: 8px; font-size: 0.82rem; color: #666; line-height: 1.7; }
.sources-section strong { color: var(--text); }
.sources-section a { color: var(--accent); text-decoration: none; }
.sources-section a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .board-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 0.9rem; }
    .nav-toggle { display: block; }
    .site-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary); padding: 16px; }
    .site-nav.open { display: flex; }
    .site-nav a { margin-left: 0; padding: 8px 0; }
    .tab { padding: 8px 14px; font-size: 0.82rem; }
    .cap-table th, .cap-table td { padding: 8px 10px; font-size: 0.8rem; }
    .board-header { flex-direction: column; text-align: center; }
    .export-bar { justify-content: center; }
}
