/* ==================================================
   FEEDBACK TAB OF THE CONTACT US POPUP
   Builds on contact-us.css (same fields, buttons, alerts and success step) and the palette from site.css.
   ================================================== */

/* ---------- tabs ---------- */

.contact-us-tabs {
    display: flex;
    gap: 4px;
    margin: 4px 0 18px;
    border-bottom: 1px solid #e3e8ef;
}

.contact-us-tab {
    margin-bottom: -1px;
    padding: 9px 16px;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    color: #5f6b7a;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

    .contact-us-tab:hover {
        color: var(--primary-blue);
    }

    .contact-us-tab:focus-visible {
        outline: 2px solid #0d5aa7;
        outline-offset: -2px;
        border-radius: 4px;
    }

    .contact-us-tab.is-active {
        color: var(--primary-blue);
        border-bottom-color: var(--primary-blue);
    }

/* ---------- form layout ---------- */

.feedback-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
}

.feedback-optional {
    color: #8a94a3;
    font-weight: 400;
    font-size: 13px;
}

.feedback-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.feedback-select {
    cursor: pointer;
}

/* ---------- star rating (radio buttons, keyboard accessible) ---------- */

.feedback-rating-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* DOM order is 5..1; row-reverse shows 1..5, so "this star and every star before it" is a sibling selector */
.feedback-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

    .feedback-rating input {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

    .feedback-rating label {
        margin: 0;
        padding: 0 3px;
        font-size: 26px;
        line-height: 1;
        color: #cdd5e0;
        cursor: pointer;
        transition: color 0.15s;
    }

        .feedback-rating label:hover,
        .feedback-rating label:hover ~ label,
        .feedback-rating input:checked ~ label {
            color: var(--primary-blue);
        }

    .feedback-rating input:focus-visible + label {
        outline: 2px solid #0d5aa7;
        outline-offset: 2px;
        border-radius: 4px;
    }

.feedback-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.feedback-rating-clear {
    padding: 2px 4px;
    border: none;
    background: none;
    color: #5f6b7a;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

    .feedback-rating-clear:hover {
        color: var(--primary-blue);
    }

/* ---------- one size for both tabs ----------
   Both panels sit in the same grid cell; the inactive one stays laid out but invisible, so the popup is always
   as tall as the taller panel and never jumps when switching tabs. (A class, not the hidden attribute:
   Bootstrap forces [hidden] to display:none, which would take the panel out of the layout.) */

.contact-us-panels {
    display: grid;
}

    .contact-us-panels > [role="tabpanel"] {
        grid-area: 1 / 1;
        min-width: 0;
    }

        /* inactive panel: still laid out (keeps the size), but invisible, not clickable, not focusable */
        .contact-us-panels > [role="tabpanel"].is-inactive {
            visibility: hidden;
            pointer-events: none;
        }

/* ---------- contact details: Google Maps and LinkedIn links ---------- */

.contact-us-details-item a.contact-us-map-link {
    display: inline-block;
    margin-top: 2px;
    padding-top: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: underline;
}

    .contact-us-details-item a.contact-us-map-link:hover,
    .contact-us-details-item a.contact-us-map-link:focus-visible {
        color: #ffffff;
    }

/* ---------- optional "Was this helpful?" link for the calculator result pages ---------- */

.feedback-helpful-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

    .feedback-helpful-link:hover,
    .feedback-helpful-link:focus-visible {
        text-decoration: underline;
    }

@media (max-width: 768px) {

    .feedback-row {
        grid-template-columns: 1fr;
    }
}
