/*
 * MAPEL thank-you screen, design-and-build-state section 4.5.
 * The thanks under a title in the section title style, then two cards in the card style of
 * the question screens, one asking to forward the survey and one carrying the interview form.
 * The screen takes the 880px cap of a question screen and the content spans the container,
 * so the cards sit exactly where the question cards sit at every width. The header shows
 * without the percentage and no progress bar is drawn, because the survey is complete. The
 * layout is a judgement approved by the principal investigator, since section 4.5 fixes the
 * content and its order only.
 */
body.mapel .mapel-endtext {
    margin: 0;
    padding: 56px 0 0;
}

/* Vanilla's empty submit wrapper takes no space */
body.mapel #mapel-page[data-content="submit"] ~ #outerframeContainer form#limesurvey {
    margin: 0;
    padding: 0;
}

body.mapel .mapel-thanks-title {
    margin: 0 0 12px;
    color: var(--mapel-heading);
    font-family: var(--mapel-font);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

body.mapel .mapel-thanks p {
    margin: 0 0 12px;
    color: var(--mapel-text);
    font-family: var(--mapel-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

body.mapel .mapel-thanks-lead p {
    font-size: 17px;
}

body.mapel .mapel-thanks-card {
    margin: 24px 0 0;
    padding: 28px 32px 28px;
    border: 1px solid var(--mapel-border);
    border-radius: 12px;
    background-color: var(--mapel-card);
    box-shadow: var(--mapel-shadow);
}

body.mapel .mapel-card-heading {
    margin: 0 0 10px;
    color: var(--mapel-heading);
    font-family: var(--mapel-font);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
}

body.mapel .mapel-thanks-actions,
body.mapel .mapel-z2-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 0;
}

body.mapel .mapel-thanks .mapel-next {
    margin-left: 0;
    text-decoration: none;
}

body.mapel .mapel-thanks a.mapel-btn:hover,
body.mapel .mapel-thanks a.mapel-btn:focus {
    color: var(--mapel-on-primary);
    text-decoration: none;
}

body.mapel .mapel-copy-field {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 12px 0 0;
}

body.mapel .mapel-copy-field[hidden] {
    display: none;
}

/* The interview form */
body.mapel .mapel-z2 {
    margin: 20px 0 0;
}

body.mapel .mapel-z2-consent {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 20px;
}

body.mapel .mapel-z2-consent input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    display: block;
    width: 21.6px;
    height: 21.6px;
    margin: 1px 0 0;
    border: 2px solid var(--mapel-control);
    border-radius: 4px;
    background: transparent no-repeat center / 14px 14px;
    cursor: pointer;
}

body.mapel .mapel-z2-consent input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E6873' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}

:root[data-mapel-mode="dark"] body.mapel .mapel-z2-consent input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386AEC2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}

body.mapel .mapel-z2-consent input[type="checkbox"]:focus-visible,
body.mapel .mapel-z2 input[type="email"]:focus-visible,
body.mapel .mapel-copy-field:focus-visible,
body.mapel .mapel-privacy-open:focus-visible,
body.mapel .mapel-dialog-close:focus-visible {
    outline: 2px solid var(--mapel-primary);
    outline-offset: 2px;
}

body.mapel .mapel-z2-consent label {
    margin: 0;
    color: var(--mapel-text);
    font-family: var(--mapel-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    cursor: pointer;
}

body.mapel .mapel-privacy-open {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mapel-primary);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

body.mapel .mapel-z2-label {
    display: block;
    margin: 0 0 8px;
    color: var(--mapel-muted);
    font-family: var(--mapel-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

body.mapel .mapel-z2 input[type="email"],
body.mapel .mapel-copy-field {
    box-sizing: border-box;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--mapel-border);
    border-radius: 8px;
    background-color: var(--mapel-card);
    color: var(--mapel-text);
    font-family: var(--mapel-font);
    font-size: 16px;
}

body.mapel .mapel-z2 input[type="email"] {
    display: block;
    width: 100%;
    max-width: 480px;
}

body.mapel .mapel-z2 input[type="email"]:hover {
    border-color: var(--mapel-primary);
}

body.mapel .mapel-z2 .mapel-z2-msg {
    margin: 12px 0 0;
    font-size: 15px;
}

body.mapel .mapel-z2 .mapel-z2-error {
    color: var(--mapel-red);
}

body.mapel .mapel-z2 .mapel-z2-ok {
    color: var(--mapel-heading);
    font-weight: 500;
}

body.mapel .mapel-z2 input:disabled {
    opacity: 0.6;
    cursor: default;
}

/* The privacy notice */
body.mapel .mapel-privacy {
    position: fixed;
    width: calc(100% - 32px);
    max-width: 560px;
    margin: auto;
    padding: 28px 32px 20px;
    border: 1px solid var(--mapel-border);
    border-radius: 12px;
    background-color: var(--mapel-card);
    color: var(--mapel-text);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

body.mapel .mapel-privacy::backdrop {
    background-color: rgba(15, 23, 42, 0.5);
}

body.mapel .mapel-privacy .mapel-card-heading {
    padding-right: 44px;
}

body.mapel .mapel-dialog-close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--mapel-border);
    border-radius: 8px;
    background-color: var(--mapel-card);
    color: var(--mapel-muted);
    cursor: pointer;
}

body.mapel .mapel-dialog-close:hover {
    border-color: var(--mapel-primary);
}

@media only screen and (max-width: 1023px) {
    body.mapel .mapel-endtext {
        padding-top: 26px;
    }

    body.mapel .mapel-thanks-title {
        font-size: 22px;
    }

    body.mapel .mapel-thanks p {
        font-size: 14px;
    }

    body.mapel .mapel-thanks-lead p {
        font-size: 16px;
    }

    body.mapel .mapel-thanks-card {
        padding: 22px 20px;
    }

    body.mapel .mapel-privacy {
        padding: 22px 20px 14px;
    }
}
