/* ==========================================================================
   enLighten - Page feedback ("Was this page helpful?")
   Knowledge Centre articles only. Rendered by Views/Partials/pageFeedback.cshtml
   Umbraco Form: "Page Feedback - Was this page helpful"
   Every rule is scoped to .enl-page-feedback so nothing else on the site is affected.
   ========================================================================== */

.enl-page-feedback {
    --pfb-bg: #e3e6ea;
    --pfb-text: #333333;
    --pfb-muted: #555555;
    --pfb-border: #6b6b6b;
    --pfb-accent: #97c93b;
    --pfb-focus: #005fb8;
    background: var(--pfb-bg);
    border-bottom: 4px solid var(--pfb-accent);
    color: var(--pfb-text);
    padding: 40px 0 44px;
    margin-top: 48px;
}

.enl-page-feedback .enl-page-feedback__inner {
    max-width: 740px;
}

.enl-page-feedback .umbraco-forms-form,
.enl-page-feedback .umbraco-forms-page,
.enl-page-feedback .umbraco-forms-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.enl-page-feedback .umbraco-forms-field {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

/* Question + Yes / No on one line */
.enl-page-feedback .wasthispagehelpful {
    display: block;
    margin-bottom: 0;
}

.enl-page-feedback .wasthispagehelpful .umbraco-forms-legend {
    float: left;
    margin: 0 32px 0 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 36px;
    color: var(--pfb-text);
}

.enl-page-feedback .wasthispagehelpful .umbraco-forms-field-wrapper {
    clear: none;
    width: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 36px;
}

.enl-page-feedback .wasthispagehelpful .radiobuttonlist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.enl-page-feedback .wasthispagehelpful .radiobuttonlist > div {
    display: flex;
    align-items: center;
    margin: 0;
}

.enl-page-feedback .wasthispagehelpful input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    margin: 0 10px 0 0;
    border: 2px solid var(--pfb-text);
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: box-shadow .15s ease;
}

.enl-page-feedback .wasthispagehelpful input[type="radio"]:checked {
    box-shadow: inset 0 0 0 5px #ffffff;
    background: var(--pfb-text);
}

.enl-page-feedback .wasthispagehelpful input[type="radio"]:focus-visible {
    outline: 3px solid var(--pfb-focus);
    outline-offset: 2px;
}

.enl-page-feedback .wasthispagehelpful label {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--pfb-text);
    cursor: pointer;
}

.enl-page-feedback .wasthispagehelpful .field-validation-error {
    flex-basis: 100%;
    display: block;
    margin-top: 8px;
}

/* "Tell us why" intro text */
.enl-page-feedback .telluswhyintro {
    margin-top: 32px;
    margin-bottom: 12px;
}

.enl-page-feedback .telluswhyintro p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--pfb-muted);
}

.enl-page-feedback .telluswhyintro p strong {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--pfb-text);
}

.enl-page-feedback .telluswhyintro a {
    color: var(--pfb-focus);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Textarea */
.enl-page-feedback .telluswhy textarea {
    display: block;
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    border: 2px solid var(--pfb-border);
    border-radius: 4px;
    background: #ffffff;
    font: inherit;
    font-size: 15px;
    color: var(--pfb-text);
    resize: vertical;
    box-shadow: none;
}

.enl-page-feedback .telluswhy textarea:focus {
    outline: 3px solid var(--pfb-focus);
    outline-offset: 0;
    border-color: var(--pfb-text);
}

/* reCAPTCHA notice */
.enl-page-feedback .recaptcha {
    margin-bottom: 20px;
}

.enl-page-feedback .recaptcha .recaptcha-disclaimer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pfb-muted);
}

.enl-page-feedback .recaptcha .recaptcha-logo {
    width: 20px;
    height: 20px;
}

/* Submit */
.enl-page-feedback .umbraco-forms-navigation {
    margin: 0;
    padding: 0;
}

.enl-page-feedback .umbraco-forms-navigation .button {
    min-width: 160px;
    min-height: 48px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
}

/* Thank you message */
.enl-page-feedback .umbraco-forms-submitmessage {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 36px;
    color: var(--pfb-text);
}

/* Only the question shows until Yes or No is picked (JS adds the classes;
   without JS everything stays visible so the form still works) */
.enl-page-feedback.pfb-js .telluswhyintro,
.enl-page-feedback.pfb-js .telluswhy,
.enl-page-feedback.pfb-js .recaptcha,
.enl-page-feedback.pfb-js .umbraco-forms-navigation {
    display: none;
}

.enl-page-feedback.pfb-js.pfb-answered .telluswhyintro,
.enl-page-feedback.pfb-js.pfb-answered .telluswhy,
.enl-page-feedback.pfb-js.pfb-answered .recaptcha,
.enl-page-feedback.pfb-js.pfb-answered .umbraco-forms-navigation {
    display: block;
}

.enl-page-feedback.pfb-js.pfb-answered .telluswhyintro {
    animation: pfbReveal .2s ease-out;
}

@keyframes pfbReveal {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
    .enl-page-feedback {
        padding: 28px 0 32px;
    }

    .enl-page-feedback .wasthispagehelpful .umbraco-forms-legend {
        float: none;
        display: block;
        margin: 0 0 10px;
    }

    .enl-page-feedback .wasthispagehelpful .umbraco-forms-field-wrapper {
        clear: both;
        line-height: 1.4;
    }

    .enl-page-feedback .umbraco-forms-navigation .button {
        width: 100%;
    }
}
