/* ==========================================
NET FORCE CALCULATOR - NON-CRITICAL CSS
Loaded asynchronously for better performance
========================================== */

/* === ERROR MESSAGE STYLING === */
.calc-error {
    display: none;
    background-color: #fef2f2;
    color: #b91c1c;
    font-size: 0.8125rem;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
    font-weight: 500;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}
.calc-error::before {
    content: '⚠️';
    font-size: 0.9rem;
    margin-right: 6px;
}

/* === ARTICLE CONTENT STYLING === */
.article-content {
    line-height: 1.7;
    color: #334155;
}
.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #1e293b;
}
.article-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1e293b;
}
.article-content p {
    margin-bottom: 16px;
    font-size: 1rem;
}
.article-content ul,
.article-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}
.article-content li {
    margin-bottom: 8px;
}
.article-content strong {
    color: #0f172a;
    font-weight: 600;
}
.article-content em {
    color: #475569;
    font-style: italic;
}
.article-content a {
    color: #5b21b6;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-content a:hover {
    color: #8b5cf6;
}

/* === HOOK BLOCK === */
.article-content .hook {
    background: #faf5ff;
    border-left: 4px solid #8b5cf6;
    padding: 20px 24px;
    margin: 24px 0 32px;
    border-radius: 0 8px 8px 0;
    font-size: 1.05rem;
    font-style: italic;
    color: #4c1d95;
    line-height: 1.6;
}

/* === GOLD TEMPLATE EXAMPLE BLOCK (Purple Left Border) === */
.article-content .example-block {
    background: #faf5ff;
    border-left: 4px solid #8b5cf6;
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 20px 0;
}
.article-content .example-block h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0;
}
.article-content .example-block ol {
    padding-left: 20px;
    margin-bottom: 0;
}
.article-content .example-block li {
    margin-bottom: 6px;
}
.article-content .example-block p:last-child {
    margin-bottom: 0;
}
.article-content .example-block code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* === WARNING & TIP BLOCKS === */
.article-content .warning {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}
.article-content .warning h3,
.article-content .warning h4 {
    margin-top: 0;
    color: #b91c1c;
    font-size: 1.1rem;
}
.article-content .warning p:last-child {
    margin-bottom: 0;
}
.article-content .tip {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}
.article-content .tip strong {
    color: #166534;
}
.article-content .tip p:last-child {
    margin-bottom: 0;
}

/* === TABLES === */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.article-content thead {
    background: #f8fafc;
}
.article-content th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
}
.article-content td {
    padding: 10px 16px;
    font-size: 0.875rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.article-content tr:last-child td {
    border-bottom: none;
}
.article-content tr:hover {
    background: #faf5ff;
}

/* === FAQ STYLING === */
.article-content .faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
}
.article-content .faq-item:last-child {
    border-bottom: none;
}
.article-content .faq-item h3 {
    margin-top: 0;
    color: #5b21b6;
    font-size: 1.125rem;
}
.article-content .faq-item p:last-child {
    margin-bottom: 0;
}

/* === SOURCES LIST === */
.article-content .sources-list {
    list-style: none;
    padding: 0;
    counter-reset: source-counter;
}
.article-content .sources-list li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
    counter-increment: source-counter;
}
.article-content .sources-list li::before {
    content: '[' counter(source-counter) ']';
    position: absolute;
    left: 0;
    color: #8b5cf6;
    font-weight: 700;
}
.article-content .sources-list a {
    color: #5b21b6;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed #8b5cf6;
}
.article-content .sources-list a:hover {
    color: #4c1d95;
    border-bottom-style: solid;
}
.article-content sup {
    font-size: 0.75em;
    color: #8b5cf6;
    font-weight: 700;
}
.article-content sup a {
    color: #8b5cf6;
    text-decoration: none;
    border-bottom: none;
}

/* === RELATED CALCULATORS GRID === */
.related-calculators-grid a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.related-calculators-grid a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* === DESKTOP ENHANCEMENTS === */
@media (min-width: 769px) {
    .left-panel,
    .right-panel {
        padding: 24px;
        box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    }
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .nf-calc-wrapper {
        padding: 0 12px;
        max-width: 100%;
    }
    .calc-main-grid {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 20px;
    }
    .left-panel,
    .right-panel {
        width: 100%;
        flex: 1 1 auto;
        min-width: 100%;
        padding: 20px;
    }
    .calculator-hero h1 {
        font-size: 1.5rem;
    }
    .force-row {
        flex-direction: row;
        gap: 10px;
    }
    .force-column {
        flex: 1 1 0;
        min-width: 0;
    }
    .input-box input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    .unit-dropdown {
        flex: 0 0 50px;
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    .force-column label {
        font-size: 0.8rem;
    }
    .result-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .result-item {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
    .result-item .input-box input {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    .result-item .unit-dropdown {
        flex: 0 0 45px;
        padding: 8px 2px;
        font-size: 0.7rem;
        min-width: 40px;
    }
    .formula-box {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .formula-box .katex-display {
        margin: 0 !important;
        overflow-x: auto;
    }
    .formula-box .katex {
        font-size: 1rem !important;
        white-space: normal !important;
    }
    .article-content {
        padding: 24px 8px 48px;
    }
    .article-content h2 {
        font-size: 1.375rem;
        margin-top: 32px;
    }
    .article-content h3 {
        font-size: 1.125rem;
    }
    .article-content p,
    .article-content li {
        font-size: 0.95rem;
    }
    .article-content table {
        font-size: 0.8125rem;
        display: block;
        overflow-x: auto;
    }
    .article-content th,
    .article-content td {
        padding: 8px 12px;
    }
}