/* Q-Form 2.0 – nur Erwachsenen-Anamnesebogen. Theme-Überschriften bleiben unangetastet. */
.q-anamnesis {
    padding: 56px 0 90px;
    background: #f7f7f7;
}

.q-anamnesis,
.q-anamnesis * {
    box-sizing: border-box;
}

.q-anamnesis__container {
    max-width: 1080px;
}

.q-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.q-card {
    margin: 0 0 24px;
    padding: 28px;
    background: #fff;
    border: 1px solid #dedede;
}

.q-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.q-hero__content {
    max-width: 760px;
}

.q-hero__content > *:last-child,
.q-section-head > div > *:last-child {
    margin-bottom: 0;
}

.q-kicker {
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.q-hero__logo {
    width: 150px;
    height: auto;
    object-fit: contain;
}

.q-section-head {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 26px;
}

.q-section-head h1,
.q-section-head h2,
.q-hero h1 {
    margin-top: 0;
}

.q-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #7b0505;
    border-radius: 50%;
    color: #7b0505;
    font-weight: 700;
}

.q-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.q-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.q-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.q-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    font-weight: 600;
}

.q-field small {
    display: block;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
}

.q-field input[type="text"],
.q-field input[type="number"],
.q-field input[type="email"],
.q-field input[type="tel"],
.q-field select,
.q-field textarea {
    width: 100%;
    min-width: 0;
    margin: 0;
    border: 1px solid #bdbdbd;
    background: #fff;
    padding: 10px 11px;
    font: inherit;
    color: inherit;
}

.q-field input[type="text"],
.q-field input[type="number"],
.q-field input[type="email"],
.q-field input[type="tel"],
.q-field select {
    min-height: 44px;
}

.q-field textarea {
    min-height: 96px;
    resize: vertical;
}

.q-field input:focus,
.q-field select:focus,
.q-field textarea:focus {
    outline: 2px solid rgba(123, 5, 5, .18);
    outline-offset: 1px;
    border-color: #7b0505;
}

.q-field--full {
    margin-bottom: 22px;
}

.q-field--inline-other {
    max-width: 620px;
    margin-top: 14px;
}

.q-fieldset {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #dedede;
}

.q-fieldset legend {
    padding: 0 7px;
    font-weight: 700;
}

.q-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.q-choice-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.q-choice,
.q-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.q-choice input,
.q-consent input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: #7b0505;
}

.q-scale {
    display: grid;
    grid-template-columns: repeat(11, minmax(38px, 1fr));
    gap: 6px;
}

.q-scale label {
    display: block;
    margin: 0;
    cursor: pointer;
}

.q-scale input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.q-scale span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid #cfcfcf;
    background: #fff;
}

.q-scale input:checked + span {
    border-color: #7b0505;
    box-shadow: inset 0 0 0 1px #7b0505;
    font-weight: 700;
}

.q-scale input:focus-visible + span {
    outline: 2px solid #7b0505;
    outline-offset: 2px;
}

.q-bodymap-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(120px, 180px) minmax(260px, auto);
    gap: 16px;
    align-items: end;
    margin-bottom: 14px;
}

.q-bodymap-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.q-secondary-button,
.q-anamnesis .q-secondary-button {
    width: auto;
    margin: 0;
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid #7b0505;
    background: #fff;
    color: #7b0505;
    cursor: pointer;
    font: inherit;
}

.q-secondary-button:hover,
.q-secondary-button:focus-visible {
    background: #faf4f4;
}

.q-hint,
.q-notice {
    margin: 16px 0 22px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #dedede;
    border-left: 3px solid #7b0505;
}

.q-hint {
    font-size: .95em;
}

.q-bodymap-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.q-bodymap-panel {
    padding: 16px;
    border: 1px solid #dedede;
    text-align: center;
    background: #fff;
}

.q-bodymap-panel > strong {
    display: block;
    margin-bottom: 10px;
}

.q-bodymap-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
    touch-action: none;
    cursor: crosshair;
    user-select: none;
}

.q-bodymap-side-labels {
    fill: #666;
    font-size: 12px;
}

.q-bodymap-figure {
    fill: #f5f5f5;
    stroke: #4b4b4b;
    stroke-width: 2.2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.q-bodymap-detail {
    fill: none;
    stroke: #b8b8b8;
    stroke-width: 1.5;
}

.q-bodymap-marker {
    fill: #7b0505;
    stroke: #fff;
    stroke-width: 2;
}

.q-bodymap-marker-text {
    fill: #fff;
    font-weight: 700;
    font-size: 11px;
    pointer-events: none;
}

.q-bodymap-radiation {
    stroke: #7b0505;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 8 5;
}

.q-bodymap-arrowhead {
    fill: #7b0505;
}

.q-bodymap-list {
    margin: 16px 0 22px;
    padding: 14px 16px;
    border: 1px solid #dedede;
    background: #fafafa;
}

.q-bodymap-list ol {
    margin: 0;
    padding-left: 22px;
}

.q-bodymap-list p {
    margin: 0;
}

.q-details {
    margin: 16px 0;
    border: 1px solid #dedede;
    background: #fff;
}

.q-details > summary {
    position: relative;
    padding: 15px 48px 15px 16px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.q-details > summary::-webkit-details-marker {
    display: none;
}

.q-details > summary::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #7b0505;
    border-radius: 50%;
    color: #7b0505;
    font-weight: 400;
}

.q-details[open] > summary::after {
    content: '−';
}

.q-details__body {
    padding: 4px 16px 18px;
}

.q-gut-questions,
.q-gut-contexts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.q-gut-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 18px;
    align-items: center;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid #ececec;
    font-weight: 400;
}

.q-gut-row select {
    width: 100%;
    min-height: 40px;
    margin: 0;
    border: 1px solid #bdbdbd;
    background: #fff;
    padding: 7px 9px;
    font: inherit;
}

.q-medical-grid .q-field {
    align-self: stretch;
}

.q-medical-grid textarea {
    flex: 1;
}

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

.q-price-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid #dedede;
    background: #fff;
}

.q-price-card > span {
    font-weight: 700;
}

.q-price-card small {
    color: #666;
}

.q-notice p:last-child {
    margin-bottom: 0;
}

.q-notice a {
    color: #7b0505;
    text-decoration: underline;
}

.q-consents {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.q-consent {
    padding: 13px 14px;
    border: 1px solid #dedede;
    background: #fff;
}

.q-anamnesis .q-submit,
.q-anamnesis button.q-submit[type="submit"] {
    width: 100%;
    margin: 26px 0 0;
    padding: 0;
    border: 1px solid #7b0505;
    background: #fff;
    color: #7b0505;
    cursor: pointer;
}

.q-anamnesis .q-submit span,
.q-anamnesis button.q-submit[type="submit"] span {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .03em;
}

.q-anamnesis .q-submit:hover,
.q-anamnesis .q-submit:focus-visible {
    background: #faf4f4;
}

.q-anamnesis .q-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.q-submit-note {
    margin: 9px 0 0;
    color: #666;
    font-size: .92em;
}

.q-form-message {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid #dedede;
    border-left-width: 4px;
    background: #fafafa;
}

.q-form-message.is-success {
    border-left-color: #4d7a4d;
}

.q-form-message.is-error {
    border-left-color: #7b0505;
}

@media (max-width: 900px) {
    .q-grid--3,
    .q-price-grid,
    .q-choice-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .q-bodymap-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .q-bodymap-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .q-anamnesis {
        padding: 28px 0 60px;
    }

    .q-card {
        padding: 20px 16px;
    }

    .q-hero {
        flex-direction: column-reverse;
    }

    .q-hero__logo {
        width: 110px;
    }

    .q-grid--2,
    .q-grid--3,
    .q-choice-grid,
    .q-choice-grid--3,
    .q-bodymap-grid,
    .q-bodymap-controls,
    .q-price-grid {
        grid-template-columns: 1fr;
    }

    .q-bodymap-actions {
        grid-column: auto;
    }

    .q-scale {
        grid-template-columns: repeat(6, minmax(38px, 1fr));
    }

    .q-gut-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .q-section-head {
        grid-template-columns: 32px 1fr;
        gap: 10px;
    }

    .q-anamnesis .q-choice,
    .q-anamnesis .q-consent {
        position: static;
        padding-right: 0;
        padding-left: 0;
    }

    .q-anamnesis .q-choice input,
    .q-anamnesis .q-consent input {
        position: static;
        right: auto;
        left: auto;
    }
}

@media print {
    .q-anamnesis {
        padding: 0;
        background: #fff;
    }

    .q-card {
        break-inside: avoid;
        border-color: #bbb;
    }

    .q-secondary-button,
    .q-submit,
    .q-submit-note,
    .q-form-message {
        display: none !important;
    }

    .q-details:not([open]) > .q-details__body {
        display: block;
    }
}


/* Q-Form 2.1 follow-up layout corrections */
.q-hero__logo {
    width: auto;
    max-width: 210px;
    max-height: 150px;
}

.q-grid--2 > .q-field > span:first-child,
.q-grid--3 > .q-field > span:first-child {
    display: block;
    min-height: 2.8em;
    line-height: 1.35;
}

.q-fieldset .q-choice-grid {
    align-items: start;
}

.q-choice-grid,
.q-choice-grid--3 {
    gap: 12px 26px;
}

.q-choice,
.q-consent {
    justify-content: flex-start;
    text-align: left;
}

.q-choice span,
.q-consent span {
    display: block;
    flex: 1 1 auto;
    text-align: left;
}

.q-scale {
    gap: 10px;
}

.q-scale span {
    min-height: 44px;
    width: 44px;
    min-width: 44px;
    margin: 0 auto;
    border-radius: 999px;
}

.q-bodymap-svg {
    max-width: 190px;
}

.q-bodymap-grid {
    align-items: start;
}

.q-post-submit-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.q-post-submit-actions[hidden] {
    display: none !important;
}

.q-consents {
    gap: 10px;
}

.q-consent {
    align-items: flex-start;
}

@media (max-width: 700px) {
    .q-grid--2 > .q-field > span:first-child,
    .q-grid--3 > .q-field > span:first-child {
        min-height: 0;
    }

    .q-scale span {
        width: 40px;
        min-width: 40px;
    }

    .q-post-submit-actions {
        flex-direction: column;
    }
}
