/* Shared styles for the EPF/ESI penalty calculator pages. Extends styles.css
   using the site's existing palette: brand blue #305cde, link red #c1121f,
   focus outline #1a3fb0, heading rgb(24,24,24), body text #333, page
   background rgb(248,244,240), card shadow rgba(0,0,0,0.05) 0px 4px 20px 7px. */

.calc-crosslink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #305cde;
    text-decoration: none;
    margin: 10px 0 32px;
}

.calc-crosslink:hover,
.calc-crosslink:focus-visible {
    text-decoration: underline;
}

.penalty-rules {
    padding: 20px 0 40px;
}

.penalty-rules h2 {
    font-size: 1.6em;
    margin: 40px 0 16px;
    font-weight: 600;
}

.penalty-rules h2:first-child {
    margin-top: 0;
}

.penalty-rules h3 {
    font-size: 1.1em;
    margin: 24px 0 10px;
    font-weight: 600;
}

.penalty-rules p,
.penalty-rules li {
    font-size: 16px;
    margin-bottom: 16px;
}

.penalty-rules ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.penalty-rules ul li {
    margin-bottom: 8px;
}

.calc-disclaimer {
    border-left: 4px solid #c1121f;
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 20px 7px;
    padding: 20px 24px;
    margin: 30px 0;
}

.calc-disclaimer p {
    font-size: 15px;
    margin-bottom: 10px;
}

.calc-disclaimer p:last-child {
    margin-bottom: 0;
}

.calc-disclaimer-label {
    display: block;
    font-weight: 600;
    color: #c1121f;
    margin-bottom: 8px;
}

.penalty-calc {
    padding: 100px 0 80px;
}

.penalty-calc h1 {
    font-size: 2em;
    margin-bottom: 40px;
    font-weight: 600;
}

.penalty-calc .subhead {
    font-size: 16px;
    max-width: 800px;
    margin: 40px 0 0;
}

.calc-layout {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.calc-form {
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 20px 7px;
    padding: 32px;
}

.calc-field {
    margin-bottom: 24px;
}

.calc-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.calc-field input {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 4px;
    background: #fff;
}

.calc-field input[readonly] {
    background: #f3f4f6;
    color: #666;
}

.calc-field input[aria-invalid="true"] {
    border-color: #c1121f;
}

.calc-help {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

.calc-error {
    font-size: 13px;
    color: #c1121f;
    font-weight: 500;
    margin-top: 6px;
}

.calc-submit {
    display: block;
    width: 100%;
    background: #305cde;
    color: #fff;
    border: 0;
    border-radius: 50px;
    padding: 5px 40px;
    height: 60px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 4px rgba(83, 100, 255, 0.32);
    transition: box-shadow 0.3s;
}

.calc-submit:hover {
    box-shadow: none;
}

.calc-results {
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 20px 7px;
    padding: 32px;
    min-height: 220px;
}

.calc-results:empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.calc-results:empty::before {
    content: "Fill in the form and select “Calculate penalty” to see your estimate here.";
    color: #666;
    font-size: 14px;
}

.calc-ontime {
    border-left: 4px solid #305cde;
    padding: 16px 20px;
    background: rgba(48, 92, 222, 0.06);
}

.calc-ontime p:last-child {
    margin-bottom: 0;
}

.calc-result-summary {
    margin-bottom: 20px;
    font-size: 15px;
}

.calc-result-summary p {
    margin-bottom: 6px;
}

.calc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.calc-table th,
.calc-table td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 15px;
}

.calc-table td {
    text-align: right;
}

.calc-table thead th {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    font-weight: 500;
}

.calc-table thead th:last-child {
    text-align: right;
}

.calc-table tbody th {
    font-weight: 400;
}

.calc-total-row th,
.calc-total-row td {
    font-weight: 700;
    border-bottom: none;
    border-top: 2px solid #305cde;
    font-size: 16px;
    padding-top: 16px;
}

.calc-rule-note,
.calc-cap-note {
    font-size: 14px;
    color: #666;
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 4px;
    margin-bottom: 8px;
}

.calc-cap-note {
    color: #c1121f;
    background: rgba(193, 18, 31, 0.06);
}

@media (max-width: 900px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .penalty-rules,
    .penalty-calc {
        padding: 40px 0;
    }

    .calc-form,
    .calc-results {
        padding: 20px;
    }

    .calc-table th,
    .calc-table td {
        padding: 10px 4px;
        font-size: 14px;
    }
}
