/* AquaLinked SWAT+ Weather Data Converter */
.swat-page,
.swat-page * {
    box-sizing: border-box;
}

.swat-hero {
    background: linear-gradient(135deg, #06495c, #0b7c84 58%, #3a9b69);
}

.swat-result-hero {
    background: linear-gradient(135deg, #0b4f45, #128169 58%, #45a66c);
}

.swat-error-hero {
    background: linear-gradient(135deg, #65312e, #9a4d3d);
}

.swat-alert {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
}

.swat-alert ul {
    margin-bottom: 0;
}

.swat-alert-error {
    color: #742c28;
    border: 1px solid #edb6b1;
    background: #fff1ef;
}

.swat-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.swat-section-heading h2 {
    margin-bottom: .35rem;
}

.swat-section-heading p {
    margin: 0;
}

.swat-step {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    min-height: 34px;
    margin-bottom: .55rem;
    border-radius: 50%;
    color: #fff;
    background: #087b82;
    font-weight: 900;
}

.swat-upload-grid,
.swat-settings-grid,
.swat-two-columns,
.swat-output-grid,
.swat-summary-grid {
    display: grid;
    gap: 1rem;
}

.swat-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.swat-settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swat-two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.swat-output-grid,
.swat-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swat-output-grid article,
.swat-summary-grid article {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(9, 86, 96, .14);
    border-radius: 14px;
    background: #f8fcfc;
}

.swat-output-grid article {
    display: grid;
    gap: .35rem;
}

.swat-summary-grid article {
    display: grid;
    gap: .3rem;
}

.swat-summary-grid span {
    color: #526c72;
    font-size: .88rem;
}

.swat-summary-grid strong {
    color: #06495c;
    font-size: 1.4rem;
}

.swat-field-wide {
    grid-column: 1 / -1;
}

.swat-field {
    min-width: 0;
}

.swat-field label,
.swat-fieldset legend {
    color: #073f50;
    font-weight: 800;
}

.swat-field label {
    display: block;
    margin-bottom: .42rem;
}

.swat-field small {
    display: block;
    margin-top: .4rem;
    color: #5c7379;
    line-height: 1.5;
}

.swat-field input,
.swat-field select,
.swat-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: .7rem .75rem;
    border: 1px solid #b8ced2;
    border-radius: 11px;
    color: #17323a;
    background: #fff;
    font: inherit;
}

.swat-field input:focus,
.swat-field select:focus,
.swat-field textarea:focus {
    outline: 3px solid rgba(21, 154, 145, .18);
    border-color: #159a91;
}

.swat-field input[type="file"] {
    padding: .55rem;
}

.swat-input-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid #b8ced2;
    border-radius: 11px;
    overflow: hidden;
}

.swat-input-unit input {
    border: 0;
    border-radius: 0;
}

.swat-input-unit span {
    padding-inline: .75rem;
    font-weight: 800;
}

.swat-checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-width: 0;
    padding: .9rem;
    border: 1px solid #bfd4d7;
    border-radius: 12px;
    background: #f8fcfc;
    cursor: pointer;
}

.swat-checkbox-card input {
    margin-top: .2rem;
    inline-size: 20px;
    block-size: 20px;
}

.swat-checkbox-card span {
    display: grid;
    gap: .22rem;
}

.swat-checkbox-card small {
    color: #5c7379;
}

.swat-fieldset {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid rgba(9, 86, 96, .16);
    border-radius: 16px;
    background: #fbfefe;
}

.swat-fieldset legend {
    padding-inline: .35rem;
}

.swat-fieldset > * + * {
    margin-top: 1rem;
}

.swat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}

.swat-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #c7dadd;
    border-radius: 13px;
    -webkit-overflow-scrolling: touch;
}

.swat-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: .9rem;
}

.swat-table th,
.swat-table td {
    padding: .7rem;
    border-bottom: 1px solid #dce9eb;
    text-align: left;
    white-space: nowrap;
}

.swat-table th {
    position: sticky;
    top: 0;
    color: #fff;
    background: #075d6b;
}

.swat-download-list {
    display: grid;
    gap: .65rem;
}

.swat-download-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: .8rem;
    border: 1px solid #d2e2e4;
    border-radius: 12px;
}

.swat-download-list article > div {
    display: grid;
    min-width: 0;
    gap: .2rem;
}

.swat-download-list strong,
.swat-download-list span {
    overflow-wrap: anywhere;
}

.swat-download-list span {
    color: #61777d;
    font-size: .86rem;
}

@media (max-width: 960px) {
    .swat-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .swat-upload-grid,
    .swat-two-columns,
    .swat-output-grid,
    .swat-summary-grid {
        grid-template-columns: 1fr;
    }

    .swat-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .swat-section-heading .mt-button,
    .swat-section-heading .mt-button-secondary,
    .swat-actions .mt-button,
    .swat-actions .mt-button-secondary {
        width: 100%;
    }

    .swat-download-list article {
        align-items: stretch;
        flex-direction: column;
    }

    .swat-download-list .mt-button-secondary {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .swat-field input,
    .swat-field select,
    .swat-field textarea,
    .swat-checkbox-card {
        font-size: 16px;
    }

    .swat-fieldset {
        padding-inline: .8rem;
    }
}


/* AQL_SWAT_EASY_MAPPING_V1 */
.swat-mapping-help {
    display: grid;
    gap: .3rem;
    margin: .35rem 0 1rem;
    padding: .85rem 1rem;
    border: 1px solid #9fd5d2;
    border-left: 4px solid #0e938f;
    border-radius: 12px;
    background: #effafa;
    color: #173c43;
    line-height: 1.5;
}

.swat-mapping-help.has-error {
    border-color: #ef9b91;
    border-left-color: #a5372b;
    background: #fff1ef;
}

.swat-mapping-status {
    margin: 0 0 1rem;
    padding: .75rem .9rem;
    border-radius: 10px;
    font-size: .92rem;
    line-height: 1.45;
}

.swat-mapping-status.is-ready {
    border: 1px solid #9bcfb2;
    background: #effaf3;
    color: #175b36;
}

.swat-mapping-status.is-warning {
    border: 1px solid #e5c475;
    background: #fff8e6;
    color: #6e4d00;
}

.swat-mapping-status.is-error {
    border: 1px solid #ef9b91;
    background: #fff1ef;
    color: #85251d;
    font-weight: 700;
}

[data-unit-block].is-inactive {
    opacity: .5;
}

[data-unit-block].is-inactive::after {
    content: 'Select the matching data column first';
    display: block;
    margin-top: .3rem;
    color: #5b6970;
    font-size: .76rem;
}

@media (max-width: 720px) {
    .swat-mapping-help,
    .swat-mapping-status {
        font-size: .9rem;
    }
}

/* AQL_SWAT_WGN_VALIDATION_V1 */
.swat-wgn-box {
    display: grid;
    gap: .85rem;
    margin: .25rem 0 1rem;
    padding: 1rem;
    border: 1px solid #b9d4d7;
    border-radius: 14px;
    background: #f8fcfc;
}

.swat-recommended {
    display: inline-flex;
    margin-left: .35rem;
    padding: .14rem .45rem;
    border-radius: 999px;
    background: #dff4ea;
    color: #17613a;
    font-size: .72rem;
    font-weight: 800;
    vertical-align: middle;
}

.swat-wgn-confirmation {
    margin: 0;
}

.swat-wgn-confirmation.is-inactive {
    opacity: .55;
}

.swat-wgn-status,
.swat-wgn-result {
    display: grid;
    gap: .25rem;
    padding: .8rem .9rem;
    border-radius: 11px;
    font-size: .9rem;
    line-height: 1.5;
}

.swat-wgn-status.is-ready,
.swat-wgn-result.is-valid {
    border: 1px solid #8dcaa8;
    background: #eef9f2;
    color: #155b35;
}

.swat-wgn-status.is-manual,
.swat-wgn-status.is-warning,
.swat-wgn-result.is-warning {
    border: 1px solid #e3bf69;
    background: #fff8e6;
    color: #704e00;
}

.swat-wgn-status.is-error {
    border: 1px solid #ed978d;
    background: #fff0ee;
    color: #85251d;
    font-weight: 700;
}

.swat-wgn-result {
    margin-top: 1rem;
}

.swat-wgn-result code {
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    .swat-wgn-box {
        padding: .8rem;
    }

    .swat-recommended {
        display: table;
        margin: .3rem 0 0;
    }
}

