/* Path calculator content inside the Webflow layout. Everything is scoped
   under .pathcalc so it cannot leak into the Webflow nav/footer.
   Colours and fonts follow site/css/freemile.webflow.css. */

.pathcalc {
    box-sizing: border-box;
    max-width: 1366px;
    /* Keep the footer from floating mid-screen on short pages. */
    min-height: 60vh;
    margin: 0 auto;
    padding: 64px 4.375rem 96px;
    font-family: Archivo, sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
    color: #002d2b;
}

.pathcalc *,
.pathcalc *::before,
.pathcalc *::after {
    box-sizing: border-box;
}

.pathcalc-title {
    margin: 0 0 40px;
    font-family: Archivosemiexpanded, sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 48px;
}

.pathcalc h2 {
    margin: 0 0 16px;
    font-family: Archivosemiexpanded, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
}

.pathcalc a:not(.button) {
    color: #009b94;
}

/* Form */

.pathcalc-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 32px;
    align-items: start;
}

.pathcalc-col {
    display: grid;
    gap: 20px;
}

.pathcalc-form .pathcalc-actions {
    grid-column: 1 / -1;
    margin-top: 0;
}

.pathcalc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pathcalc-field label {
    font-weight: 400;
    margin: 0;
}

.pathcalc-field input,
.pathcalc-field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #bebebe;
    border-radius: 8px;
    background-color: #fff;
    font: inherit;
    color: inherit;
}

.pathcalc-field input:focus,
.pathcalc-field select:focus {
    outline: none;
    border-color: #009b94;
    box-shadow: 0 0 0 3px #009b9426;
}

/* Tables (rain rates, results) */

.pathcalc-table {
    width: 100%;
    border-collapse: collapse;
}

.pathcalc-table th,
.pathcalc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #bebebe;
    text-align: left;
    vertical-align: top;
}

.pathcalc-table th {
    font-weight: 400;
}

.pathcalc-table td {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pathcalc-rain {
    max-width: 360px;
    background-color: #fafafa;
    border-radius: 8px;
}

.pathcalc-rain tr:last-child th,
.pathcalc-rain tr:last-child td {
    border-bottom: none;
}

/* Results */

.pathcalc-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
}

.pathcalc-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background-color: #fdecec;
    color: #b42318;
    font-weight: 400;
}

.pathcalc-warning {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background-color: #fef6e7;
    color: #93370d;
}

.pathcalc .high-availability { color: #067647; font-weight: 400; }
.pathcalc .medium-availability { color: #b54708; font-weight: 400; }
.pathcalc .low-availability { color: #b42318; font-weight: 400; }

/* Actions */

.pathcalc-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 8px;
}

.pathcalc-results + .pathcalc-actions {
    margin-top: 40px;
}

.pathcalc-actions .button {
    margin: 0;
}

.pathcalc-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

@media screen and (max-width: 991px) {
    .pathcalc {
        padding: 48px 2rem 64px;
    }

    .pathcalc-form,
    .pathcalc-results {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media screen and (max-width: 479px) {
    .pathcalc {
        padding: 32px 1rem 48px;
    }

    .pathcalc-title {
        font-size: 28px;
        line-height: 36px;
    }

    .pathcalc-table td {
        white-space: normal;
    }
}
