/* Muurweergave "Bouw mee" — zelfstandige component-stijlen, werkt in beide themes. */

.bm-muur {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: linear-gradient(#eaf1f5, #f8fafb 55%);
    border: 1px solid #dfe6ea;
}

.bm-muur canvas {
    display: block;
    width: 100%;
    touch-action: none;
    cursor: grab;
}

.bm-muur canvas:focus-visible {
    outline: 3px solid #0c4366;
    outline-offset: -3px;
}

.bm-knoppen {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bm-knop {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    border: 1px solid #dfe6ea;
    background: #fff;
    color: #0c4366;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.bm-knop:hover {
    background: #e7ecf0;
}

.bm-knop:focus-visible {
    outline: 3px solid #0c4366;
    outline-offset: 2px;
}

.bm-paneel {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    max-width: min(22rem, calc(100% - 1.5rem));
    background: #fff;
    border: 1px solid #dfe6ea;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 24px rgba(12, 67, 102, 0.18);
}

.bm-paneel img {
    max-height: 4rem;
    width: auto;
    margin-bottom: 0.5rem;
}

.bm-paneel-sluit {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    border: 0;
    background: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #5a6572;
    padding: 0.25rem 0.5rem;
}

.bm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.bm-tab {
    border: 2px solid #e7ecf0;
    background: #fff;
    color: #212529;
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.15s;
}

.bm-tab:hover {
    border-color: #f6b344;
}

.bm-tab.is-actief {
    border-color: #f6b344;
    background: #fce4be;
}

.bm-tab:focus-visible {
    outline: 3px solid #0c4366;
    outline-offset: 2px;
}

.bm-voortgang {
    background: #e7ecf0;
    border-radius: 999px;
    height: 0.9rem;
    overflow: hidden;
}

.bm-voortgang > div {
    height: 100%;
    background: #f6b344;
    border-radius: 999px;
    min-width: 0.9rem;
}

.bm-viering {
    text-align: center;
    padding: 1rem 0;
}

@media (prefers-reduced-motion: reduce) {
    .bm-muur canvas {
        scroll-behavior: auto;
    }
}

/* Bedrag-/tierkeuze: themaonafhankelijke variant (het doneer-thema heeft
   dezelfde klasse; deze definitie zorgt dat het ook in het standaardthema
   en zonder themabuild netjes werkt). */
.donatie-keuze {
    display: block;
    cursor: pointer;
    border: 2px solid #e7ecf0;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    transition: border-color 0.15s;
}

.donatie-keuze:hover {
    border-color: #f6b344;
}

input:checked + .donatie-keuze {
    border-color: #f6b344;
    background: #fce4be;
}

input:focus-visible + .donatie-keuze {
    outline: 3px solid #0c4366;
    outline-offset: 2px;
}

/* 3D-blokkenwereld */
.bm-wereld {
    background: linear-gradient(#f3dcb8, #bcd6e8 70%);
    border-color: #e3d9c9;
    border-radius: 1.5rem;
}

.bm-wereld canvas {
    height: clamp(26rem, 68vh, 44rem);
}

.bm-wereld-laden {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.4rem;
    font-style: italic;
    color: #173b56;
    pointer-events: none;
}

.bm-wereld-laden[hidden] {
    display: none;
}

.bm-mijlpaal {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 2rem);
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    background: #173b56;
    color: #f8f4ed;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgb(23 59 86 / 0.25);
    animation: bm-mijlpaal-in 0.5s ease-out;
}

.bm-mijlpaal strong {
    color: #e2b77a;
    margin-right: 0.35rem;
}

@keyframes bm-mijlpaal-in {
    from { opacity: 0; transform: translate(-50%, -0.75rem); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Voortgangsbalk Bouw mee (component bouwmeeVoortgang) */
.bm-vg {
    display: grid;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1.5rem;
    background: #f2e7d8;
}

.bm-vg-kop {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
}

.bm-vg-bedrag,
.bm-vg-pct {
    margin: 0;
}

.bm-vg-bedrag strong {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem);
    font-weight: 600;
    color: #173b56;
    margin-right: 0.4rem;
}

.bm-vg-bedrag span {
    color: rgb(29 52 71 / 0.8);
}

.bm-vg-pct {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #a54f32;
}

.bm-vg-balk {
    height: 1.1rem;
    border-radius: 999px;
    background: #f8f4ed;
    box-shadow: inset 0 0 0 1px #e3d9c9;
    overflow: hidden;
}

.bm-vg-balk > div {
    height: 100%;
    min-width: 0.6rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #c58b4b, #a54f32);
    transition: width 1.2s ease-out;
}

.bm-vg-dak {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.bm-vg-dak p {
    margin: 0;
    font-size: 0.95rem;
}

.bm-vg-icoon {
    color: #8a5a26;
    margin-right: 0.2rem;
}

.bm-vg-balk--dak {
    height: 0.6rem;
}

.bm-vg-balk--dak > div {
    background: linear-gradient(90deg, #8b9885, #5f6c5a);
}

.bm-vg-stenen {
    margin: 0;
    font-size: 0.85rem;
    color: rgb(29 52 71 / 0.7);
}

.bm-vg-knop {
    justify-self: start;
    margin-top: 0.4rem;
}
