/* Questionnaire page (anfrage.html): 5 short steps, mostly clicks.
   Uses the colour variables of style.css, so it works in all three themes. */

.wizard-page {
    --input-bg: rgba(3, 25, 70, 0.45);
    --input-border: rgba(255, 255, 255, 0.3);
    --chip-bg: rgba(255, 255, 255, 0.06);
    padding: 60px 0 90px;
}

:is([data-theme="weiss"], [data-theme="mix"]) .wizard-page {
    --input-bg: #ffffff;
    --input-border: #cfd8e6;
    --chip-bg: #ffffff;
}

.back-link {
    font-size: 15px;
}

.wizard-intro {
    max-width: 860px;
    text-align: center;
}

.wizard-intro h1 {
    font-size: clamp(32px, 4.4vw, 52px);
}

.wizard-intro .lead {
    margin: 0 auto 40px;
    color: var(--muted);
}

/* The form card */
.wizard {
    max-width: 860px;
    padding: 34px 40px 28px;
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 24px 60px rgba(3, 20, 60, 0.12);
}

.wizard fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.wizard legend {
    margin-bottom: 18px;
    padding: 0;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.2;
    color: inherit;
}

:is([data-theme="weiss"], [data-theme="mix"]) .wizard legend {
    color: #06306b;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: step-in 0.35s ease-out;
}

@keyframes step-in {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: none; }
}

.step-hint {
    margin: -8px 0 18px;
    color: var(--muted);
}

/* Progress */
.wizard-progress {
    margin-bottom: 30px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--muted);
}

.wizard-steps li {
    display: flex;
    align-items: center;
    gap: 7px;
}

.wizard-steps span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 2px solid var(--line);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.wizard-steps li.active,
.wizard-steps li.done {
    color: inherit;
    font-weight: 600;
}

.wizard-steps li.active span,
.wizard-steps li.done span {
    border-color: var(--neon);
    background: var(--neon);
    color: #fff;
}

.wizard-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.wizard-bar i {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--neon));
    transition: width 0.4s;
}

/* Fields */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    font-weight: 600;
}

.field em,
.consent em {
    color: var(--orange);
    font-style: normal;
}

.field small,
.field-label small,
.style-name small {
    color: var(--muted);
    font-weight: 400;
}

.wizard input[type="text"],
.wizard input[type="email"],
.wizard input[type="tel"],
.wizard textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background: var(--input-bg);
    color: inherit;
    font: inherit;
    font-weight: 400;
}

.wizard input:focus-visible,
.wizard textarea:focus-visible {
    outline: 2px solid var(--neon);
    outline-offset: 1px;
}

.wizard .invalid {
    border-color: var(--orange) !important;
    box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18);
}

.field-label {
    margin: 22px 0 10px;
    font-weight: 600;
}

/* Clickable chips (checkboxes and radio buttons that look like buttons) */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip input,
.style-card input,
.palette input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip span {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid var(--input-border);
    border-radius: 999px;
    background: var(--chip-bg);
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    user-select: none;
}

.chip span:hover {
    border-color: var(--neon);
}

.chip input:checked + span {
    border-color: var(--neon);
    background: var(--neon);
    color: #fff;
}

.chip input:checked + span::before {
    content: "✓ ";
}

.chip input:focus-visible + span,
.style-card input:focus-visible ~ .style-preview,
.style-card input:focus-visible ~ .layout-preview,
.palette input:focus-visible + span {
    outline: 2px solid var(--neon);
    outline-offset: 2px;
}

.chip-wide {
    display: inline-block;
    margin-top: 12px;
}

/* Style and layout cards with small drawings */
.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.style-card {
    position: relative;
    display: grid;
    gap: 8px;
    cursor: pointer;
}

.style-name {
    font-weight: 600;
    line-height: 1.3;
}

.style-name small {
    display: block;
    font-size: 13px;
}

.style-preview,
.layout-preview {
    position: relative;
    display: block;
    height: 118px;
    padding: 16px;
    border: 2px solid var(--input-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.style-card:hover .style-preview,
.style-card:hover .layout-preview {
    transform: translateY(-2px);
}

.style-card input:checked ~ .style-preview,
.style-card input:checked ~ .layout-preview {
    border-color: var(--neon);
    box-shadow: 0 0 0 3px var(--neon-soft), 0 10px 26px rgba(3, 20, 60, 0.15);
}

.style-card input:checked ~ .style-name::after {
    content: " ✓";
    color: var(--neon);
}

.style-preview b {
    display: block;
    font-size: 30px;
    line-height: 1;
    margin-bottom: 10px;
}

.style-preview i {
    display: block;
    height: 7px;
    margin-bottom: 7px;
    border-radius: 4px;
}

.style-preview i:nth-of-type(1) { width: 80%; }
.style-preview i:nth-of-type(2) { width: 55%; }

.style-preview em {
    position: absolute;
    left: 16px;
    bottom: 14px;
    width: 64px;
    height: 18px;
}

/* One small drawing per style */
.sp-modern { background: linear-gradient(135deg, #0b5fff, #19c08a); color: #fff; }
.sp-modern b { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 800; }
.sp-modern i { background: rgba(255, 255, 255, 0.75); }
.sp-modern em { border-radius: 999px; background: #fff; }

.sp-klassisch { background: #f6f1e7; color: #3b2f22; text-align: center; }
.sp-klassisch b { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.sp-klassisch i { margin-left: auto; margin-right: auto; background: #b9a888; border-radius: 0; height: 4px; }
.sp-klassisch em { left: 50%; transform: translateX(-50%); border: 1px solid #3b2f22; }

.sp-minimal { background: #ffffff; color: #111; }
.sp-minimal b { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 300; }
.sp-minimal i { background: #e6e6e6; height: 4px; }
.sp-minimal em { height: 2px; width: 40px; background: #111; }

.sp-elegant { background: #141414; color: #c8a24a; }
.sp-elegant b { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; letter-spacing: 0.05em; }
.sp-elegant i { background: rgba(200, 162, 74, 0.45); height: 3px; }
.sp-elegant em { border: 1px solid #c8a24a; }

.sp-freundlich { background: #fff4e0; color: #e4572e; }
.sp-freundlich b { font-family: "Comic Sans MS", "Segoe UI", system-ui, sans-serif; font-weight: 700; }
.sp-freundlich i { background: #ffc857; height: 9px; border-radius: 999px; }
.sp-freundlich em { border-radius: 999px; background: #17bebb; }
.sp-freundlich::after { content: ""; position: absolute; right: -14px; top: -14px; width: 60px; height: 60px; border-radius: 50%; background: #17bebb; opacity: 0.35; }

.sp-kraftvoll { background: #111; color: #fff; }
.sp-kraftvoll b { font-family: Impact, "Arial Black", sans-serif; font-size: 36px; text-transform: uppercase; }
.sp-kraftvoll i { background: #ffd400; border-radius: 0; }
.sp-kraftvoll em { background: #ffd400; }

/* Layout drawings */
.layout-preview {
    background: #eef2f8;
    padding: 12px 0;
}

.layout-preview i {
    display: block;
    height: 26px;
    margin-bottom: 7px;
    border-radius: 3px;
    background: #9fb3d4;
}

.lp-wide i:first-child { height: 40px; background: #0b5fff; border-radius: 0; }
.lp-wide i { margin-left: 0; margin-right: 0; border-radius: 0; }
.lp-boxed i { width: 56%; margin-left: auto; margin-right: auto; }
.lp-boxed i:first-child { height: 40px; background: #0b5fff; }

.lp-any {
    display: grid;
    place-items: center;
    color: #9fb3d4;
    font-size: 46px;
    font-weight: 800;
}

/* Colour palettes */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.palette {
    position: relative;
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.palette span {
    display: flex;
    height: 44px;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    overflow: hidden;
}

.palette span i {
    flex: 1;
}

.palette input:checked + span {
    border-color: var(--neon);
    box-shadow: 0 0 0 3px var(--neon-soft);
}

.color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 14px;
}

.color-field {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.color-field input {
    width: 48px;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    cursor: pointer;
}

/* Uploads */
.drop {
    position: relative;
    margin-bottom: 8px;
}

.drop input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.drop label {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 24px 16px;
    border: 2px dashed var(--input-border);
    border-radius: 14px;
    background: var(--chip-bg);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.drop label:hover,
.drop.dragover label,
.drop input:focus-visible + label {
    border-color: var(--neon);
    background: var(--neon-soft);
}

.drop small {
    color: var(--muted);
}

.drop-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--neon-soft);
    color: var(--neon);
    font-size: 18px;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.file-list li {
    position: relative;
    width: 72px;
    font-size: 11px;
    line-height: 1.25;
    color: var(--muted);
    word-break: break-all;
}

.file-list img,
.file-list .file-doc {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 4px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    font-weight: 700;
    color: #06306b;
}

.file-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #1d2a44;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.file-error,
.wizard-error {
    margin: 14px 0 0;
    color: var(--orange);
    font-weight: 600;
}

.ref-row {
    margin-bottom: 10px;
}

/* Consent */
.consent {
    display: flex;
    gap: 12px;
    margin-top: 26px;
    font-size: 15px;
    line-height: 1.5;
    cursor: pointer;
}

.consent input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--neon);
}

/* Navigation buttons */
.wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.wizard-nav .button[hidden] {
    display: none;
}

#wizard-next,
#wizard-submit {
    margin-left: auto;
}

.wizard-count {
    color: var(--muted);
    font-size: 14px;
}

.wizard-nav .button[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.wizard-saved {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* Spam trap: invisible for people, bots fill it in */
.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Thank-you screen */
.wizard-done {
    max-width: 700px;
    text-align: center;
}

.done-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--neon);
    color: #fff;
    font-size: 38px;
    font-weight: 800;
    animation: step-in 0.4s ease-out;
}

.wizard-done p {
    color: var(--muted);
}

/* Phones */
@media (max-width: 700px) {
    .wizard-page {
        padding: 36px 0 60px;
    }

    .wizard {
        padding: 22px 16px 20px;
        border-radius: 16px;
        margin: 0 16px;
        width: auto;
    }

    .wizard legend {
        font-size: 21px;
    }

    .wizard-steps li {
        font-size: 0;
        gap: 0;
    }

    .field-row,
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .layout-grid {
        gap: 12px;
    }

    .style-grid,
    .palette-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .style-preview {
        height: 100px;
    }

    .layout-preview {
        height: 80px;
    }

    .ref-row {
        gap: 6px;
        margin-bottom: 18px;
    }

    .wizard-count {
        display: none;
    }

    .wizard-nav .button {
        padding: 13px 20px;
    }

    #wizard-submit {
        white-space: normal;
        text-align: center;
    }
}

/* "No preferences" shortcut (step 2) and the no-logo note (step 4) */
.no-pref {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    padding: 14px 18px;
    border: 1px dashed var(--neon);
    border-radius: 14px;
    background: var(--neon-soft);
    color: inherit;
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.no-pref span {
    color: var(--neon);
    font-weight: 700;
    white-space: nowrap;
}

.logo-note {
    margin: 12px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--neon-soft);
}

.upload-row {
    margin-top: 16px;
}

/* Boxes that are switched on and off by the script stay hidden even though they are grids */
.wizard [hidden] {
    display: none !important;
}
