/**
 * SERPRO Spill Kit Size Calculator
 * File: assets/calculator.css
 * Version: 1.0.8
 * Date: 2026-04-29
 * Copyright Adrian Tilley
 */
:root {
    --serpro-blue: #174a7c;
    --serpro-blue-dark: #0f3357;
    --serpro-orange: #f39200;
    --serpro-grey: #f4f7fa;
    --serpro-border: #d8e1ea;
    --serpro-text: #1f2933;
    --serpro-muted: #627386;
    --serpro-green: #166534;
    --serpro-red: #991b1b;
    --serpro-white: #ffffff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--serpro-text);
    background: linear-gradient(180deg, #eef4fa 0%, #ffffff 42%);
    line-height: 1.5;
}
a { color: var(--serpro-blue); }
a:hover { color: var(--serpro-blue-dark); }
.serpro-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.serpro-header {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--serpro-border);
    border-radius: 18px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 12px 35px rgba(15, 51, 87, 0.08);
}
.serpro-brand { display: flex; align-items: center; gap: 16px; }
.serpro-logo {
    width: 145px;
    max-width: 36vw;
    height: auto;
}
.serpro-kicker {
    margin: 0 0 4px;
    color: var(--serpro-orange);
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    font-size: 12px;
}
h1, h2, h3 { line-height: 1.2; color: var(--serpro-blue-dark); }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); }
h2 { margin-top: 0; font-size: 24px; }
h3 { font-size: 18px; margin-bottom: 8px; }
.serpro-header p { margin: 8px 0 0; color: var(--serpro-muted); }
.serpro-contact { text-align: right; font-size: 14px; color: var(--serpro-muted); }
.serpro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}
.serpro-card {
    background: var(--serpro-white);
    border: 1px solid var(--serpro-border);
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(15, 51, 87, 0.07);
    padding: 22px;
}
.serpro-intro {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
    margin: 18px 0 0;
}
.serpro-pill {
    border: 1px solid var(--serpro-border);
    border-radius: 999px;
    padding: 8px 12px;
    background: #fbfdff;
    font-size: 13px;
    color: var(--serpro-muted);
}
.serpro-form fieldset {
    border: 1px solid var(--serpro-border);
    border-radius: 16px;
    margin: 0 0 18px;
    padding: 18px;
    background: #fbfdff;
}
.serpro-form legend {
    padding: 0 8px;
    color: var(--serpro-blue-dark);
    font-weight: 700;
}
.serpro-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.serpro-field label,
.serpro-checks span.label {
    display: block;
    margin: 0 0 6px;
    color: var(--serpro-blue-dark);
    font-weight: 700;
    font-size: 14px;
}
.serpro-field select,
.serpro-field input[type="number"],
.serpro-field input[type="text"] {
    width: 100%;
    border: 1px solid #c9d6e2;
    border-radius: 12px;
    background: #fff;
    padding: 11px 12px;
    font-size: 15px;
    color: var(--serpro-text);
}
.serpro-field small { display: block; margin-top: 5px; color: var(--serpro-muted); }
.serpro-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
}
.serpro-option-group {
    margin-top: 10px;
}
.serpro-option-group:first-of-type {
    margin-top: 0;
}
.serpro-option-group-title {
    display: block;
    margin: 16px 0 8px;
    color: var(--serpro-blue-dark);
    font-size: 13px;
    font-weight: 700;
}
.serpro-chemical-option-group {
    padding-top: 4px;
    border-top: 1px dashed var(--serpro-border);
}
.serpro-option {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--serpro-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.serpro-option:hover { border-color: var(--serpro-orange); }
.serpro-option input { margin-top: 3px; }
.serpro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}
.serpro-btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--serpro-blue);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 74, 124, 0.18);
}
.serpro-btn:hover { background: var(--serpro-blue-dark); color: #fff !important; }
.serpro-btn.secondary {
    background: #fff;
    color: var(--serpro-blue) !important;
    border: 1px solid var(--serpro-border);
    box-shadow: none;
}
.serpro-btn.orange { background: var(--serpro-orange); }
.serpro-note {
    padding: 12px 14px;
    border-left: 4px solid var(--serpro-orange);
    border-radius: 10px;
    background: #fff8eb;
    color: #5b3a00;
    font-size: 14px;
}
.serpro-error {
    padding: 12px 14px;
    border-left: 4px solid var(--serpro-red);
    border-radius: 10px;
    background: #fff1f2;
    color: var(--serpro-red);
    margin-bottom: 18px;
}
.serpro-result-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0 18px;
}
.serpro-metric {
    padding: 16px;
    border-radius: 16px;
    background: #eef7ff;
    border: 1px solid #cfe4f7;
}
.serpro-metric strong { display: block; font-size: 28px; color: var(--serpro-blue-dark); }
.serpro-metric span { color: var(--serpro-muted); font-size: 13px; }
.serpro-list { padding-left: 20px; }
.serpro-list li { margin: 7px 0; }
.serpro-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    padding: 0;
    list-style: none;
}
.serpro-links a {
    display: block;
    padding: 11px 12px;
    border: 1px solid var(--serpro-border);
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    font-weight: 700;
}
.serpro-side-card { position: sticky; top: 14px; }
.serpro-side-card ul { margin-top: 8px; padding-left: 18px; }
.serpro-side-card li { margin: 8px 0; }
.serpro-small { color: var(--serpro-muted); font-size: 13px; }
.serpro-disclaimer {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #7c2d12;
}
.serpro-print-only { display: none; }
@media (max-width: 880px) {
    .serpro-grid, .serpro-row, .serpro-result-banner { grid-template-columns: 1fr; }
    .serpro-header { display: block; }
    .serpro-contact { text-align: left; margin-top: 14px; }
    .serpro-intro, .serpro-links, .serpro-options { grid-template-columns: 1fr; }
    .serpro-side-card { position: static; }
}
@media print {
    body { background: #fff; }
    .serpro-header, .serpro-side-card, .serpro-form, .serpro-actions .secondary, .serpro-actions .orange { display: none !important; }
    .serpro-wrap { max-width: none; padding: 0; }
    .serpro-card { box-shadow: none; border: 0; padding: 0; }
    .serpro-grid { display: block; }
    .serpro-print-only { display: block; }
    a::after { content: " (" attr(href) ")"; font-size: 11px; color: #666; }
}


.serpro-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 18px;
}
.serpro-summary div {
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8fafc;
}
.serpro-summary dt {
    font-weight: 700;
    color: #17324d;
    margin-bottom: 3px;
}
.serpro-summary dd {
    margin: 0;
}
.serpro-auto-note {
    display: block;
    margin-top: 8px;
    color: #9a4c00;
    font-weight: 700;
}
.serpro-version {
    text-align: center;
    margin: 18px 0 4px;
    font-size: 12px;
    color: #64748b;
}
@media (max-width: 720px) {
    .serpro-summary {
        grid-template-columns: 1fr;
    }
}

/* V1.0.8: keep the duplicated result actions visible after calculation anchor scroll. */
#result-actions {
    scroll-margin-top: 18px;
}

/* V1.0.8: professional print report view; hide the on-screen calculator introduction in print. */
.serpro-print-report-header {
    display: none;
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }
    body {
        font-family: Arial, Helvetica, sans-serif;
        color: #111827;
        font-size: 10.5pt;
        line-height: 1.38;
    }
    .serpro-header,
    .serpro-grid,
    .serpro-side-card,
    .serpro-form,
    .serpro-actions,
    .serpro-version {
        display: none !important;
    }
    .serpro-wrap {
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .serpro-result-report {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .serpro-print-report-header {
        display: block;
        border-bottom: 2px solid #174a7c;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }
    .serpro-print-brand-row {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 8px;
    }
    .serpro-print-logo {
        width: 120px;
        height: auto;
    }
    .serpro-print-kicker {
        margin: 0 0 3px;
        color: #f39200;
        font-size: 9pt;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .serpro-print-report-header h1 {
        margin: 0;
        color: #0f3357;
        font-size: 19pt;
    }
    .serpro-print-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px 16px;
        border: 1px solid #d8e1ea;
        background: #f8fafc;
        padding: 8px 10px;
        margin-top: 10px;
    }
    .serpro-print-meta p,
    .serpro-print-intro {
        margin: 0;
    }
    .serpro-print-intro {
        margin-top: 10px;
        font-size: 9.5pt;
        color: #374151;
    }
    h2 {
        color: #0f3357 !important;
        font-size: 16pt;
        border-bottom: 1px solid #d8e1ea;
        padding-bottom: 5px;
        margin: 14px 0 10px !important;
    }
    h3 {
        color: #174a7c !important;
        font-size: 12pt;
        margin: 12px 0 6px !important;
        page-break-after: avoid;
    }
    p {
        margin: 0 0 8px;
    }
    .serpro-summary {
        display: table !important;
        width: 100%;
        border-collapse: collapse;
        margin: 4px 0 12px;
    }
    .serpro-summary div {
        display: table-row;
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
    }
    .serpro-summary dt,
    .serpro-summary dd {
        display: table-cell;
        border: 1px solid #d8e1ea;
        padding: 6px 8px;
        vertical-align: top;
    }
    .serpro-summary dt {
        width: 34%;
        background: #f1f5f9;
        color: #0f3357;
        font-weight: 700;
    }
    .serpro-result-banner {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 10px 0 12px !important;
        page-break-inside: avoid;
    }
    .serpro-metric {
        border: 1px solid #174a7c !important;
        background: #f8fafc !important;
        border-radius: 0 !important;
        padding: 10px !important;
    }
    .serpro-metric strong {
        font-size: 17pt !important;
        color: #0f3357 !important;
    }
    .serpro-metric span {
        color: #374151 !important;
    }
    .serpro-note,
    .serpro-error,
    .serpro-disclaimer {
        border-radius: 0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    .serpro-list {
        margin-top: 4px;
        padding-left: 18px;
    }
    .serpro-list li {
        margin: 3px 0;
    }
    .serpro-links {
        display: block !important;
        list-style: disc !important;
        padding-left: 18px !important;
    }
    .serpro-links li {
        margin: 4px 0;
    }
    .serpro-links a {
        display: inline !important;
        border: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        font-weight: 700;
        text-decoration: none;
        color: #0f3357 !important;
    }
    .serpro-links a::after {
        content: " - " attr(href);
        font-size: 8.5pt;
        font-weight: 400;
        color: #4b5563;
    }
    a::after {
        content: "";
    }
    .serpro-disclaimer {
        margin-top: 12px !important;
        border: 1px solid #f39200 !important;
        background: #fff8eb !important;
        color: #5b3a00 !important;
        padding: 9px 10px !important;
        font-size: 9.5pt;
    }
}
