/**
 * 4System Baucheck – Styles
 * Version: 1.0.2
 * Alle Klassen mit baucheck- Prefix zur Konfliktvermeidung.
 */

/* ===== RESET & CONTAINER ===== */

.baucheck-wrapper {
    --bc-green: var(--theme-palette-color-1, #4caf50);
    --bc-yellow: var(--theme-palette-color-2, #ffc107);
    --bc-text: var(--theme-palette-color-3, #4b5563);
    --bc-heading: var(--theme-palette-color-4, #1f2937);
    --bc-light1: var(--theme-palette-color-5, #f3f4f6);
    --bc-light2: var(--theme-palette-color-6, #f9fafb);
    --bc-light3: var(--theme-palette-color-7, #fbfcfc);
    --bc-white: var(--theme-palette-color-8, #ffffff);
    --bc-gray: #9ca3af;
    --bc-gray-dark: #6b7280;
    --bc-radius: 10px;
    --bc-transition: 400ms ease;

    max-width: 780px;
    margin: 0 auto;
    font-family: inherit;
    line-height: 1.6;
    color: var(--bc-text);
    -webkit-font-smoothing: antialiased;
}

.baucheck-wrapper *,
.baucheck-wrapper *::before,
.baucheck-wrapper *::after {
    box-sizing: border-box;
}

.baucheck-screen {
    display: none;
    background: var(--bc-white);
    border-radius: var(--bc-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 40px;
    animation: baucheck-fadeIn var(--bc-transition) ease forwards;
}

.baucheck-screen--active {
    display: block;
}

@keyframes baucheck-fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INTRO ===== */

.baucheck-intro-content {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.baucheck-intro-headline {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bc-heading);
    margin: 0 0 16px;
    line-height: 1.3;
}

.baucheck-intro-subline {
    font-size: 1.1rem;
    color: var(--bc-text);
    margin: 0 0 12px;
}

.baucheck-intro-meta {
    font-size: 0.9rem;
    color: var(--bc-gray-dark);
    margin: 0 0 32px;
}

/* ===== BUTTONS ===== */

.baucheck-btn {
    display: inline-block;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.25s ease;
}

/* Update v1.0.2: Alle gelben Buttons weiße Schrift, Hover = dunkleres Gelb, Text bleibt weiß */
.baucheck-btn--cta {
    background: var(--bc-yellow);
    color: #ffffff;
    padding: 16px 40px;
    border-radius: 15px;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.baucheck-btn--cta:hover {
    background: #e6ad00;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.45);
    transform: translateY(-1px);
    color: #ffffff;
}

.baucheck-btn--next {
    background: var(--bc-yellow);
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 15px;
}

.baucheck-btn--next:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.baucheck-btn--next:not(:disabled):hover {
    background: #e6ad00;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.baucheck-btn--back {
    background: none;
    color: var(--bc-gray-dark);
    padding: 14px 16px;
    font-weight: 500;
    font-size: 0.95rem;
}

.baucheck-btn--back:hover {
    color: var(--bc-heading);
}

.baucheck-btn--outline {
    background: none;
    color: var(--bc-gray-dark);
    border: 2px solid var(--bc-gray);
    padding: 14px 36px;
    border-radius: 15px;
}

.baucheck-btn--outline:hover {
    border-color: var(--bc-gray-dark);
    color: var(--bc-heading);
}

.baucheck-btn--consent-required {
    opacity: 0.45;
    pointer-events: none;
}

.baucheck-btn--consent-required.baucheck-btn--enabled {
    opacity: 1;
    pointer-events: auto;
}

/* ===== FORTSCHRITTSBALKEN ===== */

.baucheck-progress {
    margin-bottom: 24px;
}

.baucheck-progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 0;
}

.baucheck-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.baucheck-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bc-light1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--bc-gray);
    transition: all var(--bc-transition);
    border: 2px solid transparent;
}

.baucheck-step.is-active .baucheck-step-dot {
    background: var(--bc-white);
    border-color: var(--bc-green);
    color: var(--bc-green);
}

.baucheck-step.is-completed .baucheck-step-dot {
    background: var(--bc-green);
    border-color: var(--bc-green);
    color: var(--bc-white);
}

.baucheck-step-label {
    font-size: 0.7rem;
    color: var(--bc-gray);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
    transition: color var(--bc-transition);
}

.baucheck-step.is-active .baucheck-step-label {
    color: var(--bc-green);
    font-weight: 600;
}

.baucheck-step.is-completed .baucheck-step-label {
    color: var(--bc-green);
}

.baucheck-step-line {
    flex: 1;
    height: 2px;
    background: var(--bc-light1);
    min-width: 24px;
    max-width: 60px;
    margin: 0 4px;
    margin-bottom: 22px;
    transition: background var(--bc-transition);
}

.baucheck-step-line.is-completed {
    background: var(--bc-green);
}

/* ===== MODUL-BADGE ===== */

.baucheck-module-badge {
    display: inline-block;
    background: rgba(76, 175, 80, 0.1);
    color: var(--bc-green);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}

/* ===== FRAGE ===== */

.baucheck-question-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bc-heading);
    margin: 0 0 28px;
    line-height: 1.35;
}

/* ===== ANTWORT-KARTEN ===== */

.baucheck-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.baucheck-card {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bc-light1);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 18px 20px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--bc-text);
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1.45;
}

.baucheck-card:hover {
    border-color: var(--bc-green);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.baucheck-card.is-selected {
    border-color: var(--bc-green);
    background: rgba(76, 175, 80, 0.08);
    color: var(--bc-heading);
    font-weight: 600;
}

/* ===== NAVIGATION ===== */

.baucheck-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== LADEANIMATION ===== */

.baucheck-loading-content {
    text-align: center;
    padding: 60px 20px;
}

.baucheck-loading-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bc-heading);
    margin: 0 0 28px;
}

.baucheck-loading-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--bc-light1);
    border-radius: 4px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.baucheck-loading-bar-fill {
    width: 0;
    height: 100%;
    background: var(--bc-green);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.baucheck-loading-text {
    font-size: 0.9rem;
    color: var(--bc-gray-dark);
    margin: 0;
}

/* ===== ERGEBNIS ===== */

.baucheck-result {
    padding: 0;
    overflow: hidden;
}

.baucheck-result-bar {
    height: 6px;
    width: 100%;
}

.baucheck-result-bar--green {
    background: var(--bc-green);
}

.baucheck-result-bar--yellow {
    background: var(--bc-yellow);
}

.baucheck-result-bar--gray {
    background: var(--bc-gray);
}

.baucheck-result-content {
    padding: 40px;
}

.baucheck-result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.baucheck-result-icon--green {
    background: rgba(76, 175, 80, 0.1);
    color: var(--bc-green);
    border: 2px solid var(--bc-green);
}

.baucheck-result-icon--yellow {
    background: rgba(255, 193, 7, 0.12);
    color: #e6a800;
    border: 2px solid var(--bc-yellow);
}

.baucheck-result-icon--gray {
    background: var(--bc-light1);
    color: var(--bc-gray-dark);
    border: 2px solid var(--bc-gray);
}

.baucheck-result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bc-heading);
    text-align: center;
    margin: 0 0 16px;
    line-height: 1.35;
}

.baucheck-result-text {
    font-size: 1.05rem;
    color: var(--bc-text);
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.6;
}

/* Update v1.0.1: Checkliste 20px eingerückt */
.baucheck-result-list {
    list-style: none;
    padding: 0 0 0 20px;
    margin: 0 0 32px;
}

.baucheck-result-list-item {
    padding: 10px 0 10px 36px;
    position: relative;
    font-size: 1rem;
    color: var(--bc-text);
    border-bottom: 1px solid var(--bc-light1);
}

.baucheck-result-list-item:last-child {
    border-bottom: none;
}

.baucheck-result-list-item::before {
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 1.15rem;
    font-weight: 700;
}

/* Update v1.0.2: Haken und Warnung explizit grün/gelb, Emoji-Rendering unterbinden */
.baucheck-result-list-item--check::before {
    content: "\2714\FE0E";
    color: #4caf50;
    font-family: "Segoe UI Symbol", "Apple Color Emoji", sans-serif;
}

.baucheck-result-list-item--warn::before {
    content: "\26A0\FE0E";
    color: #e6a800;
    font-family: "Segoe UI Symbol", "Apple Color Emoji", sans-serif;
}

/* ===== CHECKBOX (Profil A) ===== */

.baucheck-result-cta {
    text-align: center;
}

.baucheck-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    max-width: 520px;
    margin: 0 auto 8px;
    cursor: pointer;
}

.baucheck-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--bc-green);
    cursor: pointer;
}

.baucheck-checkbox-text {
    font-size: 0.95rem;
    color: var(--bc-text);
    line-height: 1.45;
}

.baucheck-result-hint {
    font-size: 0.85rem;
    color: var(--bc-gray-dark);
    max-width: 520px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

/* ===== RESPONSIVE (Desktop) ===== */

@media (min-width: 640px) {
    .baucheck-answers:not(.baucheck-answers--grid) {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .baucheck-answers:not(.baucheck-answers--grid) .baucheck-card {
        flex: 1 1 0;
        min-width: 0;
    }

    .baucheck-answers--grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .baucheck-intro-headline {
        font-size: 2rem;
    }

    .baucheck-question-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 639px) {
    .baucheck-screen {
        padding: 24px 18px;
    }

    .baucheck-result-content {
        padding: 24px 18px;
    }

    .baucheck-intro-headline {
        font-size: 1.4rem;
    }

    .baucheck-btn--cta {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
    }

    .baucheck-progress-steps {
        padding: 12px 0;
    }

    .baucheck-step-label {
        font-size: 0.6rem;
    }

    .baucheck-step-dot {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .baucheck-step-line {
        min-width: 12px;
        margin-bottom: 18px;
    }
}
