/* ═══════════════════════════════════════════
   UCB Frontend CSS
   CSS variabelen worden via JavaScript
   ingesteld op basis van de admin styling.
═══════════════════════════════════════════ */

.ucb-configurator-wrap {
    --ucb-primair:     #3AACCF;
    --ucb-secundair:   #2589A8;
    --ucb-achtergrond: #F4F8FA;
    --ucb-tekst:       #1C3A45;
    --ucb-knop:        #3AACCF;
    --ucb-knop-tekst:  #FFFFFF;
    --ucb-radius:      14px;
    --ucb-progress:    #3AACCF;
    --ucb-font:        Poppins, system-ui, sans-serif;

    font-family: var(--ucb-font);
    color: var(--ucb-tekst);
    background: var(--ucb-achtergrond);
    border-radius: var(--ucb-radius);
    padding: 2rem;
    max-width: 820px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Voortgangsbalk ── */
.ucb-progress-wrap { margin-bottom: 1.5rem; }
.ucb-progress-bar  { height: 6px; background: #E0F4FA; border-radius: 100px; overflow: hidden; }
.ucb-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ucb-primair), var(--ucb-secundair));
    border-radius: 100px;
    transition: width .5s ease;
}

/* ── Stap ── */
.ucb-stap { animation: ucb-fade-in .25s ease; }
@keyframes ucb-fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ucb-stap-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--ucb-primair);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .35rem;
}
.ucb-stap-titel {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--ucb-tekst);
    margin: 0 0 .5rem;
    line-height: 1.2;
}
.ucb-stap-sub {
    color: #5A7A88;
    margin: 0 0 1rem;
    font-size: .95rem;
}
.ucb-stap-lijn {
    width: 48px;
    height: 3px;
    background: var(--ucb-primair);
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

/* ── Intro grid ── */
.ucb-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 600px) {
    .ucb-intro-grid { grid-template-columns: 1fr; }
}

.ucb-veld { display: flex; flex-direction: column; gap: .3rem; }
.ucb-label { font-size: .85rem; font-weight: 600; }
.ucb-req { color: #E05050; }
.ucb-input {
    padding: .65rem .9rem;
    border: 1.5px solid #D0E8F0;
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s;
    background: #fff;
}
.ucb-input:focus { outline: none; border-color: var(--ucb-primair); }
.ucb-tip {
    font-size: .78rem;
    color: #5A7A88;
    background: #E8F6FB;
    padding: .35rem .75rem;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 1.25rem;
}
.ucb-fout { font-size: .82rem; color: #C0392B; font-weight: 600; min-height: 1rem; }

/* ── Kaarten grid ── */
.ucb-kaarten {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .65rem;
    margin-bottom: 1.25rem;
}
.ucb-ja-nee { grid-template-columns: 1fr 1fr; max-width: 400px; }

.ucb-kaart {
    background: #fff;
    border: 1.5px solid #D0E8F0;
    border-radius: var(--ucb-radius);
    padding: 1rem .85rem;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    user-select: none;
    position: relative;
}
.ucb-kaart:hover {
    border-color: var(--ucb-primair);
    background: #EBF7FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58,172,207,.15);
}
.ucb-kaart.sel {
    border-color: var(--ucb-primair);
    background: #E0F4FA;
    box-shadow: 0 0 0 2px var(--ucb-primair);
}
.ucb-kaart-icoon  { font-size: 2rem; margin-bottom: .4rem; line-height: 1; }
.ucb-kaart-img    { width: 100%; height: 80px; object-fit: contain; margin-bottom: .5rem; border-radius: 8px; }
.ucb-kaart-titel  { font-weight: 700; font-size: .9rem; color: var(--ucb-tekst); }
.ucb-kaart-sub    { font-size: .78rem; color: #5A7A88; margin-top: .25rem; }
.ucb-kaart-populair {
    position: absolute;
    top: -.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ucb-primair);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    white-space: nowrap;
}

/* ── Slider ── */
.ucb-slider-box {
    background: #fff;
    border: 1.5px solid #D0E8F0;
    border-radius: var(--ucb-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.ucb-slider-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}
.ucb-slider-naam  { font-weight: 600; font-size: .95rem; }
.ucb-slider-waarde{ font-size: 1.5rem; font-weight: 800; color: var(--ucb-primair); }
.ucb-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--ucb-primair) var(--val,50%), #E0F4FA var(--val,50%));
    border-radius: 100px;
    outline: none;
    cursor: pointer;
}
.ucb-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ucb-primair);
    box-shadow: 0 2px 8px rgba(58,172,207,.4);
    cursor: pointer;
}
.ucb-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ucb-primair);
    cursor: pointer;
    border: none;
}
.ucb-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: #5A7A88;
    margin-top: .4rem;
}

/* ── Schaal ── */
.ucb-schaal { margin-bottom: 1.25rem; }
.ucb-schaal-labels {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: #5A7A88;
    margin-bottom: .5rem;
}
.ucb-schaal-knoppen { display: flex; gap: .4rem; flex-wrap: wrap; }
.ucb-schaal-knop {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #D0E8F0;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: .9rem;
    transition: all .2s;
}
.ucb-schaal-knop:hover { border-color: var(--ucb-primair); background: #EBF7FF; }
.ucb-schaal-knop.sel  { background: var(--ucb-primair); color: #fff; border-color: var(--ucb-primair); }

/* ── Dropdown ── */
.ucb-dropdown {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid #D0E8F0;
    border-radius: var(--ucb-radius);
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
    margin-bottom: 1.25rem;
    cursor: pointer;
}
.ucb-dropdown:focus { outline: none; border-color: var(--ucb-primair); }

/* ── Invoer ── */
.ucb-input-groot {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid #D0E8F0;
    border-radius: var(--ucb-radius);
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
    margin-bottom: 1.25rem;
    box-sizing: border-box;
}
.ucb-input-groot:focus { outline: none; border-color: var(--ucb-primair); }
.ucb-textarea {
    width: 100%;
    min-height: 120px;
    padding: .75rem 1rem;
    border: 1.5px solid #D0E8F0;
    border-radius: var(--ucb-radius);
    font-size: .95rem;
    font-family: inherit;
    resize: vertical;
    background: #fff;
    margin-bottom: 1.25rem;
    box-sizing: border-box;
}
.ucb-textarea:focus { outline: none; border-color: var(--ucb-primair); }

/* ── Voortgang onderaan stap ── */
.ucb-voortgang-balk-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0 .5rem;
}
.ucb-voortgang-balk  { flex: 1; height: 5px; background: #E0F4FA; border-radius: 100px; overflow: hidden; }
.ucb-voortgang-fill  { height: 100%; background: linear-gradient(90deg, var(--ucb-primair), var(--ucb-secundair)); border-radius: 100px; transition: width .4s ease; }
.ucb-voortgang-label { font-size: .78rem; color: #5A7A88; white-space: nowrap; font-weight: 600; }

/* ── Navigatie knoppen ── */
.ucb-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-top: .5rem;
}
.ucb-btn {
    padding: .75rem 1.75rem;
    border-radius: 100px;
    border: none;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    text-decoration: none;
    display: inline-block;
}
.ucb-btn-next {
    background: linear-gradient(135deg, var(--ucb-primair), var(--ucb-secundair));
    color: var(--ucb-knop-tekst);
    box-shadow: 0 4px 14px rgba(58,172,207,.3);
}
.ucb-btn-next:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(58,172,207,.4); }
.ucb-btn-prev {
    background: transparent;
    border: 1.5px solid #D0E8F0;
    color: #5A7A88;
}
.ucb-btn-prev:hover { border-color: var(--ucb-primair); color: var(--ucb-primair); }
.ucb-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--ucb-primair);
    color: var(--ucb-primair);
}
.ucb-btn-ghost:hover { background: var(--ucb-primair); color: #fff; }
.ucb-btn-prod {
    background: linear-gradient(135deg, var(--ucb-primair), var(--ucb-secundair));
    color: #fff;
    font-size: .85rem;
    padding: .6rem 1.25rem;
}

/* ── Laden spinner ── */
.ucb-laden {
    text-align: center;
    padding: 3rem 0;
    color: #5A7A88;
}
.ucb-spin {
    width: 40px;
    height: 40px;
    border: 4px solid #E0F4FA;
    border-top-color: var(--ucb-primair);
    border-radius: 50%;
    animation: ucb-spin .8s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes ucb-spin { to { transform: rotate(360deg); } }

/* ── Resultaat ── */
.ucb-resultaat-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E0F4FA;
}

.ucb-prod-kaart {
    background: #fff;
    border: 1.5px solid #D0E8F0;
    border-radius: var(--ucb-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: box-shadow .2s;
}
.ucb-prod-kaart.top {
    border-color: var(--ucb-primair);
    box-shadow: 0 0 0 2px var(--ucb-primair);
}
.ucb-prod-cirkel-wrap { flex-shrink: 0; text-align: center; }
.ucb-prod-cirkel {
    position: relative;
    width: 70px;
    height: 70px;
}
.ucb-prod-pct {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: .95rem;
    font-weight: 800;
    color: var(--ucb-primair);
}
.ucb-prod-match-label { font-size: .65rem; color: #5A7A88; font-weight: 600; text-transform: uppercase; margin-top: 2px; }

.ucb-prod-info  { flex: 1; min-width: 0; }
.ucb-prod-badge {
    display: inline-block;
    background: var(--ucb-primair);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}
.ucb-prod-img  { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; float: right; margin-left: .75rem; }
.ucb-prod-naam { font-size: 1rem; font-weight: 700; color: var(--ucb-tekst); margin-bottom: .4rem; }
.ucb-prod-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .5rem; }
.ucb-prod-tag  {
    background: #E8F6FB;
    color: var(--ucb-secundair);
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
}
.ucb-prod-uitleg { font-size: .85rem; color: #5A7A88; margin-bottom: .75rem; line-height: 1.5; }
.ucb-prod-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.ucb-prod-prijs  { font-size: 1.4rem; font-weight: 800; color: var(--ucb-tekst); }

.ucb-resultaat-footer { text-align: center; margin-top: 1.5rem; }

.ucb-fout-box {
    background: #fde8e8;
    border-left: 4px solid #E05050;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    color: #C0392B;
    font-weight: 600;
}

/* ── Mobiel ── */
@media (max-width: 600px) {
    .ucb-configurator-wrap { padding: 1.25rem; }
    .ucb-kaarten { grid-template-columns: repeat(2, 1fr); }
    .ucb-prod-kaart { flex-direction: column; }
    .ucb-prod-img { float: none; width: 100%; height: 120px; margin: 0 0 .75rem; }
}
