/**
 * m47_bewertungstool - Online-Bewertung im dunklen Panel (Figma 112:21).
 */

.m47_bewertungstool {
    position: relative;
}

/* === Panel: dunkler Kasten mit V-Cut unten (wie m32/m33) === */
.m47_panel {
    position: relative;
    background: var(--hs-dark);
    padding: clamp(40px, 5vw, 90px) clamp(24px, 6vw, 120px) clamp(120px, 12vw, 190px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 70px), 50% 100%, 0 calc(100% - 70px));
}
@media (max-width: 767.98px) {
    .m47_panel {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 50% 100%, 0 calc(100% - 30px));
        padding-bottom: 90px;
    }
}

/* === Fortschritt === */
.m47_progress_track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
}
.m47_progress_fill {
    height: 100%;
    background: var(--hs-gold);
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.m47_progress_label {
    margin: 16px 0 0;
    text-align: right;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.03em;
    color: #fff;
}
.m47_progress_label strong { font-weight: 600; }

/* === Headline & Subline pro Schritt === */
.m47_headline {
    margin: 40px 0 12px;
    font-family: var(--hs-font-display);
    font-weight: 600;
    font-size: clamp(24px, 2.4vw, 35px);
    line-height: 1.28;
    letter-spacing: 1.2px;
    color: #fff;
}
.m47_subline {
    margin: 0 0 40px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.48px;
    color: rgba(255, 255, 255, 0.85);
}

/* === Schritte === */
.m47_step { display: none; }
.m47_step.is-active { display: block; animation: m47FadeIn 0.4s ease both; }
@keyframes m47FadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === Schritt 1: Kategorie-Karten === */
.m47_cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, 2vw, 30px);
}
@media (max-width: 991.98px) { .m47_cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)    { .m47_cards { grid-template-columns: 1fr; } }

.m47_card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
    min-height: 224px;
    padding: 30px 16px 34px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.m47_card:hover,
.m47_card:focus-visible {
    border-color: var(--hs-gold);
    background: rgba(171, 143, 80, 0.12);
    transform: translateY(-4px);
    outline: none;
}
.m47_card.is-selected {
    border-color: var(--hs-gold);
    background: rgba(171, 143, 80, 0.18);
}
.m47_card_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
}
.m47_card_icon img {
    width: auto;
    height: 88px;
    max-width: 110px;
    object-fit: contain;
    object-position: center;
}
.m47_card_label {
    font-family: var(--hs-font-display);
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 0.66px;
    text-align: center;
}

/* === Formularfelder === */
.m47_fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 30px;
}
@media (max-width: 700px) { .m47_fields { grid-template-columns: 1fr; } }

.m47_field { display: block; }
.m47_field_wide { grid-column: 1 / -1; }
.m47_field_label {
    display: block;
    margin: 0 0 10px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}
.m47_field_label em {
    font-style: normal;
    text-transform: none;
    color: rgba(255, 255, 255, 0.45);
}
.m47_field input,
.m47_field select {
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0;
    color: #fff;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.03em;
    transition: border-color 0.3s ease, background 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}
.m47_field select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23AB8F50' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 46px;
}
.m47_field select option { color: var(--hs-text); background: #fff; }
.m47_field input::placeholder { color: rgba(255, 255, 255, 0.35); }
.m47_field input:focus,
.m47_field select:focus {
    outline: none;
    border-color: var(--hs-gold);
    background: rgba(171, 143, 80, 0.1);
}
.m47_field input.m47_invalid,
.m47_field select.m47_invalid { border-color: #d26a5c; }
/* Number-Spinner ausblenden (Optik) */
.m47_field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.m47_field input[type="number"]::-webkit-outer-spin-button,
.m47_field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* === Pills (Zustand / Zeithorizont) === */
.m47_pills_group { margin-top: 34px; }
.m47_pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.m47_pill {
    padding: 15px 26px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 15px;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.m47_pill:hover, .m47_pill:focus-visible {
    border-color: var(--hs-gold);
    outline: none;
}
.m47_pill.is-selected {
    border-color: var(--hs-gold);
    background: var(--hs-gold);
    color: #fff;
    font-weight: 600;
}
.m47_pill.m47_invalid { border-color: #d26a5c; }

/* Kategorie-abhaengige Felder */
[data-m47-only].m47_hidden { display: none; }

/* === Uebersicht der Angaben (Schritt 4) === */
.m47_summary {
    margin: 0 0 44px;
    padding: 26px 28px 28px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
}
.m47_summary_title {
    margin: 0 0 20px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: var(--hs-gold);
}
.m47_summary_hint {
    text-transform: none;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.45);
}
.m47_summary_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}
.m47_summary_item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.m47_summary_item:hover,
.m47_summary_item:focus-visible {
    border-color: var(--hs-gold);
    background: rgba(171, 143, 80, 0.12);
    outline: none;
}
.m47_summary_label {
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.m47_summary_value {
    font-family: var(--hs-font-body);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    color: #fff;
    overflow-wrap: anywhere;
}
/* Stift-Andeutung beim Hover */
.m47_summary_item::after {
    content: "Ändern";
    margin-top: 2px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: var(--hs-gold);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.m47_summary_item:hover::after,
.m47_summary_item:focus-visible::after { opacity: 1; }

/* === Datenschutz-Checkbox === */
.m47_check {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 34px;
    cursor: pointer;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}
.m47_check input {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: var(--hs-gold);
    cursor: pointer;
}
.m47_check.m47_invalid { color: #d26a5c; }
.m47_check a { color: var(--hs-gold); text-decoration: underline; }

/* === Navigation === */
.m47_nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap;
}
.m47_back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.3s ease;
}
.m47_back:hover { color: #fff; }
.m47_nav .m47_next[hidden],
.m47_nav .m47_submit[hidden],
.m47_back[hidden] { display: none; }
/* Nur "Weiter" sichtbar: rechts ausrichten */
.m47_nav .m47_next:first-child,
.m47_nav .m47_submit:first-child { margin-left: auto; }

/* === Fehlermeldung === */
.m47_error {
    margin: 30px 0 0;
    padding: 14px 18px;
    border: 1px solid #d26a5c;
    background: rgba(210, 106, 92, 0.12);
    color: #f2b9b0;
    font-family: var(--hs-font-body);
    font-size: 15px;
}
.m47_error[hidden] { display: none; }

/* Honeypot */
.m47_hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* === Lade-Ansicht === */
.m47_loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(40px, 6vw, 90px) 20px;
    animation: m47FadeIn 0.4s ease both;
}
.m47_loading[hidden] { display: none; }
.m47_spinner {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--hs-gold);
    border-radius: 50%;
    animation: m47Spin 0.9s linear infinite;
}
@keyframes m47Spin { to { transform: rotate(360deg); } }
.m47_loading_status {
    margin: 34px 0 8px;
    font-family: var(--hs-font-display);
    font-weight: 600;
    font-size: clamp(18px, 1.8vw, 24px);
    letter-spacing: 0.6px;
    color: #fff;
    min-height: 1.4em;
}
.m47_loading_note {
    margin: 0;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

/* === Ergebnis === */
.m47_result { animation: m47FadeIn 0.5s ease both; text-align: center; }
.m47_result[hidden] { display: none; }
.m47_result_topline {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    margin: 30px 0 6px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: var(--hs-gold);
}
.m47_result_topline::before,
.m47_result_topline::after {
    content: "";
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--hs-gold);
}
.m47_result .m47_headline { margin-top: 6px; }
.m47_result_value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 28px 0 10px;
    font-family: var(--hs-font-display);
    font-weight: 600;
    font-size: clamp(34px, 4.2vw, 64px);
    letter-spacing: 1.5px;
    color: var(--hs-gold);
    line-height: 1.1;
}
.m47_result_range_sep { color: rgba(255, 255, 255, 0.5); }
.m47_result_mid {
    margin: 0 0 34px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.85);
}
.m47_result_mid strong { font-weight: 600; color: #fff; }
.m47_result_meta {
    max-width: 640px;
    margin: 0 auto 26px;
    padding: 20px 26px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
}
.m47_result_datasource {
    margin: 0 0 8px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.m47_result_pdf {
    margin: 0;
    font-family: var(--hs-font-body);
    font-weight: 400;
    font-size: 15px;
    color: #fff;
}
.m47_result_hint {
    max-width: 720px;
    margin: 0 auto 40px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}
.m47_result_actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px 40px;
    flex-wrap: wrap;
}
.m47_restart { text-transform: uppercase; }
