/* 
   Shared Styles for Documentation & Legal Pages
   PDF Master Tool for CPA/EA
*/

:root {
    --bg-primary: #121214;
    --bg-secondary: #1e1e24;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a5;
    --accent: #2ecc71;
    --accent-blue: #3498db;
    --accent-orange: #e67e22;
    --accent-link: var(--accent-orange);
    --border: #2a2a32;
    --warning: #f1c40f;
}

body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: #e2e8f0;
    --accent: #2c7a7b;
    --accent-blue: #3182ce;
    --accent-link: #3182ce;
}

body.light-theme header h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme strong {
    color: #1e293b;
}

body.light-theme .box-green {
    background: rgba(44, 122, 123, 0.06);
    border-color: rgba(44, 122, 123, 0.25);
}

body.light-theme code {
    background: #edf2f7;
    color: #2d3748;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 40px 20px 80px;
    line-height: 1.8;
}

.container {
    max-width: 860px;
    margin: 0 auto;
}

header {
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

header h1 {
    font-size: 1.96rem;
    color: var(--text-primary);
    margin: 0 0 10px;
}

header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 24px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 1;
}

h2 {
    color: var(--accent);
    margin-top: 52px;
    border-left: 3px solid var(--accent);
    padding-left: 14px;
    font-size: 1.3rem;
}

h2.blue {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

h2.orange {
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

h3 {
    color: var(--text-primary);
    margin-top: 32px;
    font-size: 1.05rem;
}

p,
li {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

strong {
    color: var(--text-primary);
}

ul,
ol {
    padding-left: 22px;
}

li {
    margin-bottom: 10px;
}

code {
    background: #2a2a32;
    color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Fira Code', 'Consolas', monospace;
}

.box {
    padding: 22px 26px;
    border-radius: 12px;
    margin: 24px 0;
}

.box-green {
    background: rgba(46, 204, 113, 0.05);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.box-blue {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.box-yellow {
    background: rgba(241, 196, 15, 0.05);
    border: 1px solid var(--warning);
}

.box h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.box-green h3 {
    color: var(--accent);
}

.box-blue h3 {
    color: var(--accent-blue);
}

.box-yellow h3 {
    color: var(--warning);
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 60px 0 0;
}

footer {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    text-align: center;
    color: var(--text-secondary);
}

footer p {
    margin: 8px 0;
}

footer a {
    color: var(--accent-link);
    text-decoration: underline;
}

.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    display: inline-block;
}

/* =========================================
   DOC-SPECIFIC COMPONENTS
   ========================================= */

/* File Type Chips Grid */
.ft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.ft-chip {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ft-chip.view {
    border-left: 3px solid var(--accent);
}

.ft-chip.save {
    border-left: 3px solid var(--accent-blue);
}

.ft-chip i {
    width: 20px;
    text-align: center;
}

.ft-chip .ext {
    font-weight: 700;
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.ft-chip .desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Feature Grid & Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 1.6rem;
    margin-bottom: 20px;
    display: inline-block;
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.feature-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Toolbox Stack */
.toolbox-tag {
    background: var(--bg-secondary);
    color: var(--accent-orange);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border: 1px solid var(--accent-orange);
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}

.toolbox-card-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Highlight Box (Red) */
.box-highlight-red {
    background: rgba(231, 76, 60, 0.07);
    border: 2px solid rgba(231, 76, 60, 0.5);
    margin-top: 32px;
    padding: 22px 26px;
    border-radius: 12px;
}

.box-highlight-red h3 {
    color: #e74c3c !important;
    font-size: 1.05rem;
    margin-top: 0;
    margin-bottom: 12px;
}

.box-highlight-red strong {
    color: #e74c3c !important;
}

.box-highlight-red .lead {
    color: var(--text-primary);
    font-weight: 600;
}

.box-highlight-red ul {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(231, 76, 60, 0.2);
    padding-top: 12px;
}

.box-highlight-red .tip {
    margin-top: 12px;
    font-style: italic;
    font-size: 0.85rem;
    color: #e74c3c;
}

/* Helper Classes & Utilities */
.no-margin {
    margin-top: 0 !important;
}

.span-wide {
    grid-column: span 2;
}

.small-note {
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.7;
}

/* Border Overrides for Chips/Cards */
.border-blue {
    border-left-color: var(--accent-blue) !important;
}

.border-red {
    border-left-color: #e74c3c !important;
}

.border-orange {
    border-left-color: var(--accent-orange) !important;
}

.border-green {
    border-left-color: var(--accent) !important;
}

.border-blue-alternate {
    border-left-color: #2980b9 !important;
}

.highlight-border-red {
    border: 2px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.03) !important;
}

.grid-cleaning {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

.toolbox-section {
    margin-top: 50px;
}

/* Footer Utilities */
.footer-brand-text {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-brand-text a {
    font-weight: 600;
}

.footer-links {
    margin-top: 12px;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .span-wide {
        grid-column: auto;
    }

    body {
        padding: 20px 10px 40px;
    }

    .container {
        padding: 0 10px;
    }
}