/*
 * Ankieta 2 - kreator krokowy (szablon questionnaire/questionset_ankieta-2.html
 *).
 *
 * Wszystko jest zagnieżdżone w .ankieta-kreator, bo szablony pojedynczych typów pytań
 * (choice.html, open.html, agreement.html, ...) są współdzielone z pozostałymi
 * ankietami i ich wyglądu nie wolno ruszać globalnie.
 *
 * Uwaga: apz.css wymusza `ul.inputs-list li { margin:0 !important; padding:0
 * !important }`, dlatego odstępy robimy przez `gap` na liście, a wygląd kafelka
 * wisi na <label>, nie na <li>.
 *
 * Krok rozpoznajemy po klasie .ankieta-kreator-step-N na karcie (N = pozycja zestawu
 * pytań). Wizualizacja daje każdemu krokowi inny układ odpowiedzi, mimo że typ
 * pytania bywa ten sam.
 */

.ankieta-kreator {
    padding: 30px 0 60px;
    background: #f4f7f9;
}

.ankieta-kreator-card {
    max-width: 940px;
    margin: 0 auto;
    border-radius: 14px;
    background: #fff;
    -webkit-box-shadow: 0 10px 30px rgba(31, 45, 61, .08);
    box-shadow: 0 10px 30px rgba(31, 45, 61, .08);
    overflow: hidden;
}

/* --------------------------------------------------------- GŁÓWKA I STEPPER */

.ankieta-kreator-card-head {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 18px 28px 16px;
}

.ankieta-kreator-tagline {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    margin: 0;
    color: #2f3a45;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.ankieta-kreator-steps {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ankieta-kreator-steps li {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef1f4;
    color: #8a949e;
    font-size: 12px;
    font-weight: 700;
    line-height: 26px;
    text-align: center;
}

.ankieta-kreator-steps li + li {
    margin-left: 28px;
}

/* łącznik między kółkami */
.ankieta-kreator-steps li + li:before {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    width: 28px;
    height: 2px;
    margin-top: -1px;
    background: #e4e8ec;
}

.ankieta-kreator-steps .is-done {
    background: #dcecc5;
    color: #6d9c23;
}

.ankieta-kreator-steps .is-active {
    background: #9ac831;
    color: #fff;
    -webkit-box-shadow: 0 0 0 4px rgba(154, 200, 49, .2);
    box-shadow: 0 0 0 4px rgba(154, 200, 49, .2);
}

.ankieta-kreator-stepcount {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    -ms-flex-item-align: start;
    align-self: flex-start;
    margin: 0;
    color: #2f3a45;
    font-size: 13px;
    font-weight: 700;
}

.ankieta-kreator-progress {
    height: 3px;
    background: #eef1f4;
}

.ankieta-kreator-progress span {
    display: block;
    height: 100%;
    background: #9ac831;
    -webkit-transition: width .3s ease;
    transition: width .3s ease;
}

/* ------------------------------------------------------------------- KORPUS */

.ankieta-kreator-card-body {
    padding: 28px 32px 30px;
}

.ankieta-kreator-columns {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
}

/* Zdjęcie kroku. Pierwszeństwo ma QuestionSet.header_image wstawiany inline
   przez szablon; bez niego pierwszy krok dostaje zdjęcie domyślne, a każda
   ankieta może mieć własne - po klasie ze swoim slugiem. */
.ankieta-kreator-photo {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 36%;
    flex: 0 0 36%;
    margin-right: 28px;
    border-radius: 10px;
    background-image: url('../images/ankieta/hero-form.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* "Własny gabinet - rozwój" - to samo zdjęcie co na jej stronie startowej */
.ankieta-kreator-photo-wlasny-gabinet-rozwoj {
    background-image: url('../images/ankieta/hero-2.jpg');
}

.ankieta-kreator-main {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    min-width: 0;
}

.ankieta-kreator-error {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fdecec;
    color: #a03636;
    font-size: 14px;
}

.ankieta-kreator-answer-error {
    margin: 0 0 10px;
    color: #c0392b;
    font-size: 13px;
}

.ankieta-kreator-question-title {
    margin: 0 0 6px;
    color: #2f3a45;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.ankieta-kreator-question-hint {
    margin: 0 0 18px;
    color: #7a848e;
    font-size: 14px;
    text-align: center;
}

/* Wstęp kroku z QuestionSet.text - pierwszy akapit jest tytułem kroku. */
.ankieta-kreator-intro {
    margin: 0 0 24px;
}

.ankieta-kreator-intro p {
    max-width: 640px;
    margin: 0 auto;
    color: #6b7783;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.ankieta-kreator-intro p:first-child {
    margin-bottom: 10px;
    color: #2f3a45;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.ankieta-kreator-lead .ankieta-kreator-answer {
    margin-top: 18px;
}

/* extra i footer renderujemy sami - chowamy duplikaty ze współdzielonych
   szablonów typów pytań */
.ankieta-kreator .help-block {
    display: none;
}

/* ------------------------------------------------- ODPOWIEDZI: WSPÓLNA BAZA */

.ankieta-kreator .inputs-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ankieta-kreator .inputs-list li.choice {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
    list-style: none;
}

.ankieta-kreator .inputs-list li.choice label {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 13px 16px;
    border: 1px solid #e4e9ee;
    border-radius: 10px;
    background: #fff;
    color: #33383d;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    cursor: pointer;
    -webkit-transition: border-color .15s ease, box-shadow .15s ease;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ankieta-kreator .inputs-list li.choice label:hover {
    border-color: #9ac831;
}

/* klasę dokłada JS w szablonie - CSS nie umie ubrać rodzica zaznaczonego inputa */
.ankieta-kreator .inputs-list li.choice label.is-checked {
    border-color: #9ac831;
    -webkit-box-shadow: inset 0 0 0 1px #9ac831;
    box-shadow: inset 0 0 0 1px #9ac831;
}

.ankieta-kreator .inputs-list .choice-text {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
}

/* ikona odpowiedzi z pola Choice.css_icon */
.ankieta-kreator .inputs-list .choice-icon {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    margin-right: 12px;
    border-radius: 50%;
    background: #9ac831;
    color: #fff;
    font-size: 16px;
    line-height: 34px;
    text-align: center;
}

/* własny radio / checkbox */
.ankieta-kreator .inputs-list input[type="radio"],
.ankieta-kreator .inputs-list input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 20px;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    border: 1px solid #cfd6dd;
    background: #fff;
    cursor: pointer;
}

.ankieta-kreator .inputs-list input[type="radio"] {
    border-radius: 50%;
}

.ankieta-kreator .inputs-list input[type="checkbox"] {
    border-radius: 4px;
}

.ankieta-kreator .inputs-list input[type="radio"]:checked {
    border-color: #9ac831;
    background: #9ac831;
    -webkit-box-shadow: inset 0 0 0 3px #fff;
    box-shadow: inset 0 0 0 3px #fff;
}

.ankieta-kreator .inputs-list input[type="checkbox"]:checked {
    border-color: #9ac831;
    background: #9ac831 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") no-repeat center;
    background-size: 14px 14px;
}

/* ------------------------------------- ODPOWIEDZI: UKŁAD WEDŁUG TYPU PYTANIA */

/* Wielokrotny wybór: dwie kolumny, checkbox z lewej. */
.ankieta-kreator .type_choice-multiple .inputs-list li.choice,
.ankieta-kreator .type_choice-multiple-freeform .inputs-list li.choice {
    -ms-flex: 1 1 calc(50% - 6px);
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
}

.ankieta-kreator .type_choice-multiple .inputs-list li.choice label,
.ankieta-kreator .type_choice-multiple-freeform .inputs-list li.choice label {
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
}

/* Jednokrotny wybór: pełne wiersze, kółko radia po prawej stronie. */
.ankieta-kreator .type_choice .inputs-list input[type="radio"] {
    -webkit-box-ordinal-group: 4;
    -ms-flex-order: 3;
    order: 3;
    margin: 0 0 0 12px;
}

/* Ostatni krok trzyma odpowiedzi po dwie w rzędzie, z jaśniejszym kółkiem ikony. */
.ankieta-kreator-step-5 .type_choice .inputs-list li.choice {
    -ms-flex: 1 1 calc(50% - 6px);
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
}

.ankieta-kreator-step-5 .inputs-list .choice-icon {
    background: #eff7e2;
    color: #7fa72a;
}

/* pole "wpisz inne" - własny wiersz, wyrównany do prawej kolumny */
.ankieta-kreator .inputs-list li.choice-extra {
    -ms-flex: 0 1 calc(50% - 6px);
    flex: 0 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
    /* apz.css wymusza tu `margin: 0 !important` */
    margin-left: auto !important;
}

.ankieta-kreator .inputs-list li.choice-extra input[type="text"] {
    width: 100%;
    padding: 8px 2px;
    border: 0;
    border-bottom: 1px solid #cfd6dd;
    border-radius: 0;
    background: none;
    color: #33383d;
    font-size: 15px;
}

/* --------------------------------------- KROK 1: KAFELKI Z IKONĄ NAD TEKSTEM */

/* Sekcja stoi po regułach typu, bo ma je nadpisywać (ta sama waga selektora). */
.ankieta-kreator-step-1 .type_choice .inputs-list li.choice {
    -ms-flex: 1 1 calc(50% - 6px);
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
}

.ankieta-kreator-step-1 .type_choice .inputs-list li.choice label {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 20px 14px;
    text-align: center;
}

/* w kafelkach na wizualizacji nie ma kółka radia - stan pokazuje ramka */
.ankieta-kreator-step-1 .type_choice .inputs-list input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.ankieta-kreator-step-1 .type_choice .inputs-list .choice-icon {
    width: 46px;
    height: 46px;
    margin: 0 0 12px;
    background: #eff7e2;
    color: #7fa72a;
    font-size: 22px;
    line-height: 46px;
}

.ankieta-kreator-step-1 .type_choice .inputs-list .choice-text {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

/* --------------------------------------------------- ODPOWIEDZI: POLA TEKSTOWE */

.ankieta-kreator-answer {
    position: relative;
}

.ankieta-kreator-field-label {
    display: block;
    margin: 0 0 8px;
    color: #2f3a45;
    font-size: 14px;
    font-weight: 700;
}

.ankieta-kreator-required {
    color: #c0392b;
}

.ankieta-kreator-field-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    margin-top: -9px;
    color: #9aa4ae;
    font-size: 17px;
    line-height: 1;
}

.ankieta-kreator .ankieta-kreator-answer input[type="text"] {
    width: 100%;
    height: auto;
    padding: 14px 16px;
    border: 1px solid #e4e9ee;
    border-radius: 10px;
    background: #fff;
    color: #33383d;
    font-size: 15px;
}

.ankieta-kreator .ankieta-kreator-answer.has-icon input[type="text"] {
    padding-left: 46px;
}

.ankieta-kreator .ankieta-kreator-answer input[type="text"]:focus {
    border-color: #9ac831;
    outline: 0;
}

.ankieta-kreator input::-webkit-input-placeholder {
    color: #a7b0b8;
}

.ankieta-kreator input::-moz-placeholder {
    color: #a7b0b8;
}

/* ----------------------------------------------- DANE KONTAKTOWE I ZGODY */

.ankieta-kreator-contact {
    display: -ms-grid;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 16px 24px;
    gap: 16px 24px;
    margin-top: 24px;
}

/* nagłówek z Question.header ("Zostaw kontakt") na całą szerokość */
.ankieta-kreator-contact .ankieta-kreator-section {
    grid-column: 1 / -1;
}

.ankieta-kreator-section p {
    margin: 0;
    color: #6b7783;
    font-size: 13px;
    line-height: 1.6;
}

.ankieta-kreator-section p:first-child {
    margin-bottom: 6px;
    color: #2f3a45;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

/* zgody trzymają się prawej kolumny, jedna pod drugą */
.ankieta-kreator-consents {
    grid-column: 2;
}

.ankieta-kreator-consents-title {
    margin: 0 0 8px;
    color: #2f3a45;
    font-size: 14px;
    font-weight: 700;
}

.ankieta-kreator-consents .inputs-list {
    gap: 10px;
}

/* zgody to zwykłe wiersze, a nie kafelki - kasujemy ograniczenie szerokości,
   które kroki 4 i 5 nakładają na wszystkie odpowiedzi w karcie */
.ankieta-kreator-consents .inputs-list li.choice {
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
    max-width: 100%;
}

.ankieta-kreator-consents .inputs-list li.choice label,
.ankieta-kreator-consents .inputs-list li.choice label:hover,
.ankieta-kreator-consents .inputs-list li.choice label.is-checked {
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #6b7783;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.ankieta-kreator-consents .inputs-list input[type="checkbox"] {
    -ms-flex: 0 0 16px;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.ankieta-kreator-consents .type_agreement + .type_agreement {
    margin-top: 10px;
}

/* -------------------------------------------------- RAMKI INFORMACYJNE I STOPKA */

.ankieta-kreator-foot {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 16px 24px;
    margin-top: auto;
    padding-top: 24px;
}

.ankieta-kreator-notes {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
}

.ankieta-kreator-notes:empty {
    display: none;
}

/* tekst z Question.footer - ikonę dokłada CSS, żeby redakcja wpisywała
   w adminie samą treść */
.ankieta-kreator-note {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    background: #eef4fb;
    color: #4a5560;
    font-size: 13px;
    line-height: 1.5;
}

.ankieta-kreator-note:before {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-right: 12px;
    color: #3d84c6;
    font-family: FontAwesome;
    font-size: 18px;
    content: "\f132"; /* tarcza - "Twoje odpowiedzi są bezpieczne" */
}

.ankieta-kreator-step-3 .ankieta-kreator-note:before {
    content: "\f0f7"; /* budynek - podpowiedź przy miejscowości */
}

.ankieta-kreator-step-5 .ankieta-kreator-note:before {
    content: "\f0e6"; /* dymki - zapowiedź rozmowy z doradcą */
}

.ankieta-kreator-note p {
    margin: 0;
}

/* w kroku 1 ramka stoi obok przycisku, tak jak na wizualizacji */
.ankieta-kreator-step-1 .ankieta-kreator-notes {
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    min-width: 0;
}

.ankieta-kreator-step-1 .ankieta-kreator-actions {
    -ms-flex: 0 1 auto;
    flex: 0 1 auto;
}

.ankieta-kreator-actions {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.ankieta-kreator-back {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    color: #3d84c6;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.ankieta-kreator-back:hover,
.ankieta-kreator-back:focus {
    color: #2f6ea6;
    text-decoration: none;
}

.ankieta-kreator-back .fa {
    margin-right: 8px;
    font-size: 15px;
}

.ankieta-kreator .questionset-submit {
    margin: 0 0 0 auto;
}

/* legacy questionnaire/style.css ustawia tu na sztywno width:348px i height:52px */
.ankieta-kreator .questionset-submit input[type="submit"] {
    width: auto;
    min-width: 180px;
    height: auto;
    padding: 14px 60px 14px 32px;
    border: 0;
    border-radius: 8px;
    background: #9ac831 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 12h15m-6-6 6 6-6 6'/%3E%3C/svg%3E") no-repeat right 26px center;
    background-size: 20px 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    -webkit-transition: background-color .2s ease;
    transition: background-color .2s ease;
}

/* ostatni krok wysyła ankietę - bez strzałki "dalej" */
.ankieta-kreator-last .questionset-submit input[type="submit"] {
    padding: 14px 32px;
    background-image: none;
}

.ankieta-kreator .questionset-submit input[type="submit"]:hover {
    background-color: #88b628;
}

.ankieta-kreator .questionset-submit input[type="submit"][disabled] {
    opacity: .6;
}

.ankieta-kreator .policy {
    max-width: 940px;
    margin: 18px auto 0;
    color: #8a949e;
    font-size: 12px;
    text-align: center;
}

/* --------------------------------------------------------------- < 992 px */

@media (max-width: 991px) {
    .ankieta-kreator-photo {
        display: none;
    }

    .ankieta-kreator-card-body {
        padding: 24px 20px 26px;
    }
}

/* --------------------------------------------------------------- < 768 px */

@media (max-width: 767px) {
    .ankieta-kreator-card-head {
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    .ankieta-kreator-tagline {
        -ms-flex: 1 1 auto;
        flex: 1 1 auto;
    }

    .ankieta-kreator-steps {
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
        -webkit-box-pack: start;
        -ms-flex-pack: start;
        justify-content: flex-start;
        margin-top: 14px;
    }

    .ankieta-kreator-steps li + li {
        margin-left: 18px;
    }

    .ankieta-kreator-steps li + li:before {
        width: 18px;
    }

    .ankieta-kreator-question-title {
        font-size: 20px;
    }

    /* kafelki na całą szerokość - inaczej calc(50%) wypycha je poza ekran */
    .ankieta-kreator .inputs-list li.choice,
    .ankieta-kreator .inputs-list li.choice-extra {
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
        max-width: 100%;
        margin-left: 0 !important;
    }

    .ankieta-kreator-contact {
        grid-template-columns: 1fr;
    }

    .ankieta-kreator-consents {
        grid-column: 1;
    }

    .ankieta-kreator-step-1 .ankieta-kreator-notes {
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
    }

    .ankieta-kreator-step-1 .ankieta-kreator-actions {
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
    }

    .ankieta-kreator .questionset-submit input[type="submit"] {
        min-width: 0;
        padding: 13px 48px 13px 24px;
        font-size: 14px;
        background-position: right 18px center;
    }
}
