/**
 * Indus Savings Calculator – frontend stylesheet.
 *
 * Mobile-first: base styles target small screens, media queries enhance for
 * larger viewports.
 *
 * All styles are scoped under .isc-form-wrap / .isc-results-wrap so they
 * don't leak. Colours are driven by CSS variables so both Elementor controls
 * and shortcode attributes can override them.
 */

:root {
    --isc-accent:       #16423c;
    --isc-bar:          #111111;
    --isc-value-color:  #f68a1e;
}

/* ==========================================================================
 *  FORM
 * ========================================================================== */

.isc-form-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 16px;
    text-align: center;
}

.isc-form-wrap *,
.isc-form-wrap *::before,
.isc-form-wrap *::after {
    box-sizing: border-box;
}

.isc-form-heading {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 0 0 14px;
}

.isc-form-intro {
    max-width: 720px;
    margin: 0 auto 28px;
    font-weight: 400;
    line-height: 1.5;
    font-size: 15px;
}

.isc-form-intro p {
    margin: 0 0 8px;
}

.isc-form-intro p:last-child {
    margin-bottom: 0;
}

.isc-form {
    width: 100%;
}

.isc-form-fields {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.isc-form-fields .isc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    flex: 1 1 200px;
    min-width: 0;
}

.isc-field label {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.isc-field input,
.isc-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    min-height: 44px; /* comfortable touch target */
}

.isc-field input::placeholder {
    font-style: italic;
    color: #9a9a9a;
}

.isc-field input:focus,
.isc-field select:focus {
    border-color: var(--isc-accent);
    box-shadow: 0 0 0 2px rgba(22, 66, 60, 0.15);
}

.isc-submit-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
}

.isc-submit {
    display: inline-block;
    padding: 14px 40px;
    background: #000;
    color: #fff;
    border: 2px solid var(--isc-accent);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .1s ease, opacity .15s ease;
    font-family: inherit;
    min-height: 48px;
}

.isc-submit:hover {
    opacity: 0.92;
}

.isc-submit:active {
    transform: translateY(1px);
}

/* ==========================================================================
 *  RESULTS
 * ========================================================================== */

.isc-results-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 16px;
    text-align: center;
}

.isc-results-wrap *,
.isc-results-wrap *::before,
.isc-results-wrap *::after {
    box-sizing: border-box;
}

.isc-result-heading {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px;
}

.isc-result-sub {
    font-size: 14px;
    max-width: 640px;
    margin: 0 auto 24px;
    line-height: 1.45;
}

/* -- Inline editable inputs (subtle) -- */

.isc-inputs-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin: 0 auto 22px;
    max-width: 640px;
}

.isc-inputs-inline .isc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    flex: 1 1 120px;
    max-width: 180px;
    min-width: 0;
}

.isc-inputs-inline .isc-field label {
    font-size: 11px;
    font-weight: 500;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.isc-inputs-inline .isc-field input,
.isc-inputs-inline .isc-field select {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #e5e5e5;
    background: transparent;
    color: #666;
    min-height: 34px;
    font-weight: 500;
}

.isc-inputs-inline .isc-field input:hover,
.isc-inputs-inline .isc-field select:hover {
    border-color: #c9c9c9;
}

.isc-inputs-inline .isc-field input:focus,
.isc-inputs-inline .isc-field select:focus {
    border-color: var(--isc-accent);
    background: #fff;
    color: #333;
    box-shadow: 0 0 0 2px rgba(22, 66, 60, 0.1);
}

/* -- Result cards -- */

.isc-result-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.isc-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    padding: 16px 14px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.isc-card-label {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.25;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
    color: #1a1a1a;
}

.isc-card-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--isc-value-color);
}

.isc-card-value sup {
    font-size: 0.55em;
    vertical-align: super;
    margin-left: 1px;
}

/* -- Sector bar -- */

.isc-sector-bar {
    background: var(--isc-bar);
    color: #fff;
    padding: 13px 18px;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 8px;
}

/* ==========================================================================
 *  MEDIA QUERIES (progressive enhancement)
 * ========================================================================== */

/* Small tablets and up */
@media (min-width: 560px) {
    .isc-form-wrap,
    .isc-results-wrap {
        padding: 40px 20px;
    }

    .isc-form-heading,
    .isc-result-heading {
        font-size: 26px;
    }

    .isc-form-intro {
        font-size: 16px;
    }

    .isc-result-sub {
        font-size: 15px;
    }

    /* Form fields on a row */
    .isc-form-fields {
        flex-direction: row;
    }

    /* Result cards: 3-up */
    .isc-result-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .isc-card-value {
        font-size: 30px;
    }

    .isc-submit {
        padding: 14px 56px;
    }
}

/* Desktop */
@media (min-width: 900px) {
    .isc-form-heading,
    .isc-result-heading {
        font-size: 30px;
    }

    .isc-result-sub {
        margin-bottom: 28px;
    }

    .isc-card {
        padding: 18px 16px 22px;
    }

    .isc-card-value {
        font-size: 32px;
    }
}
