/*
 * Arvsportalen Form UI – confirmation UI 0.5.0
 * Styles Gravity Forms text/inline confirmations for the supported forms.
 * No confirmation content or logic is changed.
 */

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) {
    width: 100%;
    margin-top: 22px;
    margin-bottom: 42px;
    box-sizing: border-box;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message {
    --ap-confirmation-green: #0d684f;
    --ap-confirmation-green-dark: #0a5440;
    --ap-confirmation-ink: #182622;
    --ap-confirmation-muted: #5c6c66;
    --ap-confirmation-border: #d8e5e0;
    --ap-confirmation-bg: #f6faf8;
    --ap-confirmation-white: #ffffff;

    position: relative;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 25px 28px 25px 72px;
    border: 1px solid var(--ap-confirmation-border);
    border-left: 4px solid var(--ap-confirmation-green);
    border-radius: 9px;
    background: var(--ap-confirmation-bg);
    color: var(--ap-confirmation-ink);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 1px 2px rgba(16, 45, 36, 0.025);
}

/* Small, restrained success mark – deliberately not an e-commerce animation. */
:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message::before {
    content: "✓";
    position: absolute;
    top: 25px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--ap-confirmation-green);
    color: #fff;
    font-size: 17px;
    font-weight: 750;
    line-height: 1;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message :where(h1, h2, h3, h4) {
    color: var(--ap-confirmation-ink);
    font-family: inherit;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message :where(h1, h2) {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 1.15rem + 0.45vw, 1.65rem);
    font-weight: 725;
    line-height: 1.25;
    letter-spacing: -0.012em;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message h3 {
    margin: 22px 0 8px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message :where(p, ul, ol) {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--ap-confirmation-ink);
    font-size: inherit;
    line-height: inherit;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message :where(p, ul, ol):last-child {
    margin-bottom: 0;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message :where(ul, ol) {
    padding-left: 1.35rem;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message li + li {
    margin-top: 5px;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message a {
    color: var(--ap-confirmation-green-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .gform_confirmation_message a:hover {
    text-decoration-thickness: 2px;
}

/*
 * Semantic confirmation markup supported by the HTML block previously prepared.
 * The outer GF message supplies the card and status icon so the optional inner
 * ap-confirmation wrapper stays visually lightweight.
 */
:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation__header {
    display: block;
    margin: 0 0 14px;
}

/* Avoid a duplicate checkmark if the semantic HTML contains its own icon. */
:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation__icon {
    display: none !important;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation__lead {
    margin: -2px 0 0 !important;
    color: var(--ap-confirmation-muted) !important;
    font-size: 0.98rem !important;
    font-weight: 650;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation__steps {
    margin-top: 21px;
    padding-top: 18px;
    border-top: 1px solid #e1ebe7;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation__steps h3 {
    margin-top: 0;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation__notice {
    margin-top: 19px;
    padding: 13px 15px;
    border: 1px solid var(--ap-confirmation-border);
    border-radius: 7px;
    background: var(--ap-confirmation-white);
    color: var(--ap-confirmation-ink);
    line-height: 1.55;
}

:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
) .ap-confirmation__help {
    margin-top: 17px !important;
    padding-top: 15px;
    border-top: 1px solid #e1ebe7;
    color: var(--ap-confirmation-muted) !important;
    font-size: 0.91rem !important;
}

/* Save-and-continue messages get a quieter variant when present. */
:is(
    #gform_wrapper_9,
    #gform_wrapper_17,
    #gform_wrapper_18,
    #gform_wrapper_19,
    #gform_wrapper_20,
    #gform_wrapper_21
) .form_saved_message,
:is(
    #gform_confirmation_wrapper_9,
    #gform_confirmation_wrapper_17,
    #gform_confirmation_wrapper_18,
    #gform_confirmation_wrapper_19,
    #gform_confirmation_wrapper_20,
    #gform_confirmation_wrapper_21
).form_saved_message_sent {
    box-sizing: border-box;
    padding: 18px 20px;
    border: 1px solid #d8e5e0;
    border-radius: 8px;
    background: #f6faf8;
    color: #182622;
    line-height: 1.6;
}

@media (max-width: 640px) {
    :is(
        #gform_confirmation_wrapper_9,
        #gform_confirmation_wrapper_17,
        #gform_confirmation_wrapper_18,
        #gform_confirmation_wrapper_19,
        #gform_confirmation_wrapper_20,
        #gform_confirmation_wrapper_21
    ) {
        margin-top: 16px;
        margin-bottom: 30px;
    }

    :is(
        #gform_confirmation_wrapper_9,
        #gform_confirmation_wrapper_17,
        #gform_confirmation_wrapper_18,
        #gform_confirmation_wrapper_19,
        #gform_confirmation_wrapper_20,
        #gform_confirmation_wrapper_21
    ) .gform_confirmation_message {
        padding: 20px 18px 20px 58px;
        border-radius: 8px;
        font-size: 14.5px;
    }

    :is(
        #gform_confirmation_wrapper_9,
        #gform_confirmation_wrapper_17,
        #gform_confirmation_wrapper_18,
        #gform_confirmation_wrapper_19,
        #gform_confirmation_wrapper_20,
        #gform_confirmation_wrapper_21
    ) .gform_confirmation_message::before {
        top: 20px;
        left: 18px;
        width: 27px;
        height: 27px;
        font-size: 15px;
    }
}
