:root {
    --background-heavy: #32127a;
    --button-primary-color: #eb6f14;
    --button-primary-focus-color: #ff8c1f;
    --bs-border-color: lightgrey;

    --opfa-primary: #ff8c1f;
    --opfa-primary-border: var(--button-primary-color);
    --opfa-primary-hover: var(--button-primary-focus-color);
    --opfa-primary-active: var(--button-primary-focus-color);
    --opfa-primary-disabled: var(--button-primary-color);

    --opfa-body-bg: #f5f6fa;
    --opfa-header-background: url(../img/logo-sygmund.svg) center/contain no-repeat;
    --opfa-header-text: none;
    --opfa-card-border-color: var(--background-heavy);
    --opfa-heading-color: var(--background-heavy);
}

.keycloak-card {
    padding: 20px;
    max-width: 500px;
}


h2 {
    font-weight: 600;
    font-size: 26px;
    color: var(--background-heavy);
    margin-top: 17px;
}

h4 {
    font-size: 16px;
}

.btn-icon {
    padding: 0;
    border: 0 !important;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    user-select: none;
}

.btn-icon:hover {
    box-shadow: 0px 0px 10px 0px #000000;
}

.keycloak-header {
    width: 300px;
    margin: 0 auto;
    padding: 40px 0;

    @media (min-width: 576px) {
        padding: 82px 0 60px;
    }
}


.survey {
    input,
    .input-group {
        border: none;
        box-shadow: var(--opfa-elevation);
        background-color: white;
        border-radius: 10px;
        margin-top: 8px;
    }

    input[type="range"] {
        background: none;
        box-shadow: none;

        &::-webkit-slider-thumb {
            background: var(--button-primary-color);
        }
    }

    input[type="radio"],
    input[type="checkbox"] {
        appearance: none;
        margin: auto 25px auto 0;
        height: 20px;
        width: 20px;
        aspect-ratio: 1;
        border: 1px solid #CBCBCB;
        background-color: white;
        border-radius: 50% !important;

        &:checked {
            border: 1px solid var(--button-primary-color);
            /* the checked dot: pseudo-elements do not render on <input>, use a gradient background */
            background-image: radial-gradient(circle, var(--button-primary-color) 0 40%, transparent 45%);
            transition: 120ms border ease-in-out;
        }
    }

    .input-group input[type="radio"] {
        &:not(:checked) {
            border-right: 0.8px solid #CBCBCB !important;
        }

        &:checked {
            border-right: 0.8px solid var(--button-primary-color) !important;
        }
    }

    label {
        margin-bottom: unset;
        line-height: unset;
        color: var(--background-heavy);
        font-size: 16px;
        font-weight: 600;
    }

    /* the rules below address the commented-out topics step: nothing matches them until it
       comes back */
    main section label {
        color: black;
        font-size: 14px;
        font-weight: 400;
    }

    main section section label {
        font-size: 12px;
    }

    .input-group.radio,
    .input-group.check {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        padding: 0;

        input {
            margin: auto 10px;
            flex: 0 0 auto;
        }

        label {
            padding: 20px 10px;
            margin: 0 auto 0 0;
            box-sizing: border-box;
        }
    }

    main > .input-group.radio,
    main > .input-group.check {
        position: relative;
    }

    main > .input-group.radio label,
    main > .input-group.check label,
    main > section > .input-group.radio label,
    main > section > .input-group.check label {
        border-left: 1px solid #F5F6FA;
    }

    main > section > section {
        position: relative;
        background-color: white;
        margin: 0 !important;
        padding: 8px 8px 8px 45px;
        border-radius: 0 0 10px 10px;
        transform: translateY(-10px);
        box-shadow: var(--opfa-elevation);

        &::before {
            content: "";
            position: absolute;
            left: 39px;
            top: 0;
            bottom: 0;
            border-left: 1px solid #F5F6FA;
        }

        > .input-group {
            margin-top: 4px;
            box-shadow: none;
            background-color: #F5F6FA;

            &:nth-child(1) {
                margin-top: 0;
            }

            &.radio label,
            &.check label {
                padding: 13px 10px;
            }
        }
    }
}

.wizard-layout {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;

    > h1 {
        text-align: center;
        font-size: 14px;
        font-weight: 600;
        margin: 0;
        padding: 15px 24px;
    }

    > header,
    > ol,
    > ul {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        flex-wrap: wrap;
        margin: 0;
        padding: 0 0.5px 0 0;
        list-style-position: inside;
        list-style-type: none;

        > * {
            flex: 1;
            height: auto;
            text-align: center;
            display: none;
            align-items: center;
            justify-content: center;
            min-width: 180px;

            &.active {
                font-weight: bold;
                display: flex;
            }
        }
    }

    > section {
        flex: 1 0 auto;
        min-height: 400px;
        padding: 1.5rem !important;
        display: flex;
        flex-direction: column;

        &:not(.current) {
            display: none;
        }

        > footer {
            flex: 1 0 auto;
            display: flex;
            align-items: flex-end;
            padding: 0.7rem 0;
            margin-top: 20px;

            .progress {
                margin-bottom: 22px;
                margin-right: 15px;
            }
        }
    }
}

label {
    font-weight: 700;
    color: #EF8318;
}

.progress {
    --bs-progress-height: 10px;
    --bs-progress-bg: white;
    --bs-progress-bar-bg: var(--background-heavy);
    margin-bottom: 14px;
}
