/* =========================================================
   Inmeet Tool — by Kendrix
   ========================================================= */

:root {
    --im-navy:    #12294a;
    --im-teal:    #1e6b4d;
    --im-green:   #2dbd5c;
    --im-orange:  #e87d1c;
    --im-muted:   #4a6080;
    --im-border:  #dce8f0;
    --im-bg:      #f5f8fa;
    --im-bg-teal: #eef8f3;
    --im-radius:  10px;
    --im-shadow:  0 2px 12px rgba(18,41,74,.08);
}

.inmeet-tool *, .inmeet-tool *::before, .inmeet-tool *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.inmeet-tool {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 28px 16px 56px;
    color: var(--im-navy);
    line-height: 1.55;
}

/* ── Utility ── */
.im-hidden { display: none !important; }

/* ── Progress bar ── */
.im-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 48px;
}

.im-prog-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.im-prog-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--im-border);
    color: #8a9ab0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    transition: background .25s, color .25s;
}

.im-prog-step.active .im-prog-num  { background: var(--im-teal);  color: #fff; }
.im-prog-step.done   .im-prog-num  { background: var(--im-green); color: #fff; }

.im-prog-lbl {
    font-size: 11px;
    color: #8a9ab0;
    font-weight: 600;
    white-space: nowrap;
}
.im-prog-step.active .im-prog-lbl  { color: var(--im-navy); }
.im-prog-step.done   .im-prog-lbl  { color: var(--im-teal); }

.im-prog-line {
    width: 64px;
    height: 2px;
    background: var(--im-border);
    margin-bottom: 22px;
    flex-shrink: 0;
    transition: background .25s;
}
.im-prog-line.done { background: var(--im-green); }

@media (max-width: 400px) {
    .im-prog-line   { width: 24px; }
    .im-prog-lbl    { display: none; }
}

/* ── Pane ── */
.im-pane { animation: imFade .28s ease; }

@keyframes imFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Typography ── */
.im-title {
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 800;
    color: var(--im-navy);
    margin-bottom: 8px;
}

.im-lead {
    font-size: 15px;
    color: var(--im-muted);
    margin-bottom: 28px;
}

/* ─────────────────────────────────────────────────────────
   STAP 1 — Plaatsing
───────────────────────────────────────────────────────── */
.im-placement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 8px;
}

@media (max-width: 500px) {
    .im-placement-grid { grid-template-columns: 1fr; }
}

.im-placement-card {
    background: #fff;
    border: 2px solid var(--im-border);
    border-radius: var(--im-radius);
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.im-placement-card:hover,
.im-placement-card:focus {
    border-color: var(--im-teal);
    box-shadow: var(--im-shadow);
    outline: none;
}

.im-placement-card[aria-pressed="true"],
.im-placement-card.selected {
    border-color: var(--im-teal);
    background: var(--im-bg-teal);
}

/* Foto of placeholder boven op de kaart */
.im-card-photo {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.im-photo-ph {
    background: #e8eef4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #8a9ab0;
    font-size: 28px;
    height: 140px;
}

.im-photo-ph small {
    font-size: 11px;
    color: #aab8c8;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.im-photo-ph--wide    { height: 200px; }
.im-photo-ph--diagram { height: 220px; }

.im-card-body {
    padding: 16px 18px 8px;
    flex: 1;
}

.im-card-body strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--im-navy);
    margin-bottom: 4px;
}

.im-card-body span {
    font-size: 13px;
    color: var(--im-muted);
}

.im-card-select {
    display: block;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--im-teal);
    border-top: 1px solid var(--im-border);
}

.im-placement-card[aria-pressed="true"] .im-card-select,
.im-placement-card.selected             .im-card-select {
    color: var(--im-green);
}

/* ─────────────────────────────────────────────────────────
   STAP 2 — Situatie
───────────────────────────────────────────────────────── */
.im-situatie-card {
    background: #fff;
    border: 1px solid var(--im-border);
    border-radius: var(--im-radius);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--im-shadow);
}

.im-situatie-foto {
    position: relative;
}

.im-situatie-foto .im-diagram-foto {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
}

.im-situatie-checks {
    padding: 22px 24px;
}

.im-check-intro {
    font-size: 14px;
    color: var(--im-muted);
    margin-bottom: 18px;
    line-height: 1.6;
}

.im-chk {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    cursor: pointer;
    border-bottom: 1px solid var(--im-bg);
}

.im-chk:last-child { border-bottom: none; }

.im-chkbox {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--im-teal);
    border-radius: 5px;
}

.im-chk span {
    font-size: 14px;
    color: var(--im-navy);
    line-height: 1.4;
}

.im-chk small {
    display: block;
    font-size: 12px;
    color: var(--im-muted);
    margin-top: 3px;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   STAP 3 — Meten
───────────────────────────────────────────────────────── */
.im-diagram-wrap {
    margin-bottom: 24px;
    border-radius: var(--im-radius);
    overflow: hidden;
    border: 1px solid var(--im-border);
}

.im-diagram-foto {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: var(--im-bg);
    display: block;
}

.im-meting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}

@media (max-width: 560px) {
    .im-meting-grid { grid-template-columns: 1fr; }
}

.im-meting-card {
    background: #fff;
    border: 1px solid var(--im-border);
    border-radius: var(--im-radius);
    padding: 20px;
    box-shadow: var(--im-shadow);
}

.im-meting-card h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.im-unit { font-size: 13px; font-weight: 400; color: var(--im-muted); }

.im-meting-hint {
    font-size: 12px;
    color: var(--im-muted);
    margin-bottom: 14px;
}

.im-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.im-inputs label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--im-muted);
    font-weight: 500;
}

.im-num {
    width: 100%;
    padding: 11px 12px;
    border: 1.5px solid #c8d8e8;
    border-radius: 7px;
    font-size: 17px;
    color: var(--im-navy);
    outline: none;
    transition: border-color .2s;
    -moz-appearance: textfield;
}
.im-num::-webkit-inner-spin-button,
.im-num::-webkit-outer-spin-button { opacity: 0; }
.im-num:focus { border-color: var(--im-teal); }

.im-calc-row {
    background: var(--im-bg-teal);
    border: 1px solid #c2e0d0;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--im-teal);
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.im-calc-row.ready { font-weight: 700; }

/* ─────────────────────────────────────────────────────────
   STAP 4 — Bestelmaat
───────────────────────────────────────────────────────── */

/* Samenvatting voltooide stappen */
.im-checklist-done {
    background: var(--im-bg-teal);
    border: 1px solid #c2e0d0;
    border-radius: var(--im-radius);
    padding: 16px 20px;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.im-done-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--im-navy);
}

.im-done-check {
    color: var(--im-green);
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Resultaatkaart */
.im-result-card {
    background: #fff;
    border: 2px solid var(--im-teal);
    border-radius: var(--im-radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--im-shadow);
}

.im-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--im-border);
    gap: 12px;
}

.im-result-row:last-of-type { border-bottom: none; }

.im-result-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.im-result-lbl {
    font-size: 12px;
    color: var(--im-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
}

.im-result-val {
    font-size: 28px;
    font-weight: 900;
    color: var(--im-teal);
    line-height: 1;
}

.im-result-explain {
    padding: 12px 24px;
    font-size: 12px;
    color: var(--im-muted);
    background: var(--im-bg);
    line-height: 1.6;
}

.im-copy-btn {
    background: var(--im-bg-teal);
    border: 1.5px solid #c2e0d0;
    border-radius: 7px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--im-teal);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.im-copy-btn:hover   { background: #d4ede4; }
.im-copy-btn.copied  { background: var(--im-green); color: #fff; border-color: var(--im-green); }

/* Eindbevestiging */
.im-final-check {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 0;
    cursor: pointer;
    font-size: 15px;
    color: var(--im-navy);
    font-weight: 600;
    line-height: 1.4;
}

.im-final-check input {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--im-teal);
}

.im-final-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

/* Bevestigd */
.im-bevestigd {
    background: var(--im-bg-teal);
    border: 2px solid var(--im-green);
    border-radius: var(--im-radius);
    padding: 36px 24px;
    text-align: center;
    margin-top: 28px;
    animation: imFade .3s ease;
}

.im-bevestigd-icon {
    width: 64px;
    height: 64px;
    background: var(--im-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    margin: 0 auto 16px;
}

.im-bevestigd h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.im-bevestigd p  { font-size: 14px; color: var(--im-muted); margin-bottom: 24px; }

.im-bevestigd-maten {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.im-bevestigd-maat {
    background: #fff;
    border: 1px solid #c2e0d0;
    border-radius: 9px;
    padding: 14px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.im-bevestigd-maat span {
    font-size: 11px;
    color: #5a8870;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
}

.im-bevestigd-maat strong {
    font-size: 28px;
    color: var(--im-teal);
    font-weight: 900;
}

.im-final-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.im-nav {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.im-btn {
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background .18s, transform .1s, opacity .15s;
    white-space: nowrap;
}

.im-btn-primary {
    background: var(--im-teal);
    color: #fff;
}
.im-btn-primary:hover:not(:disabled) {
    background: #185a40;
    transform: translateY(-1px);
}

.im-btn-ghost {
    background: #fff;
    color: var(--im-navy);
    border: 2px solid var(--im-border);
}
.im-btn-ghost:hover { border-color: var(--im-navy); }

.im-btn-akkoord {
    background: var(--im-green);
    color: #fff;
    flex: 1;
}
.im-btn-akkoord:hover:not(:disabled) { background: #25a04d; }

.im-btn-print {
    background: var(--im-navy);
    color: #fff;
}
.im-btn-print:hover { background: #0d1e38; }

.im-btn:disabled { opacity: .38; cursor: not-allowed; }

/* ── Print ── */
@media print {
    .im-progress,
    .im-nav,
    .im-final-bar,
    .im-final-btns,
    .im-copy-btn,
    #im-opnieuw         { display: none !important; }
    .im-inmeet-tool     { padding: 0; }
    .im-bevestigd       { border-color: #000; }
}
