/* ════════════════════════════════════════════════════════════════
   VerandaFlow — Configurator Wizard Frontend
   Modern premium design: dark/light/nature themes via CSS vars
   ════════════════════════════════════════════════════════════════ */

/* Default dark theme — overridden inline by PHP CSS vars */
#vf-configurator {
    --cfg-bg:       #1a1a2e;
    --cfg-surface:  #16213e;
    --cfg-card:     #2d2d3a;
    --cfg-card-sel: #3d3d50;
    --cfg-accent:   #c9a84c;
    --cfg-btn-bg:   #c9a84c;
    --cfg-btn-text: #1a1a2e;
    --cfg-text:     #ffffff;
    --cfg-subtext:  #a0a0b8;
    --cfg-border:   rgba(255,255,255,.08);
    --cfg-radius:   14px;
}

/* ─── Wrapper ──────────────────────────────────────────────── */
.vf-cfg-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cfg-bg);
    border-radius: 20px;
    overflow: hidden;
    max-width: 1040px;
    margin: 0 auto;
    position: relative;
    color: var(--cfg-text);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* ─── Progress ─────────────────────────────────────────────── */
.vf-cfg-progress-wrap {
    padding: 20px 32px 0;
    background: var(--cfg-bg);
}
.vf-cfg-progress-track {
    height: 3px;
    background: var(--cfg-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}
.vf-cfg-progress-fill {
    height: 100%;
    background: var(--cfg-accent);
    border-radius: 2px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
    width: 8%;
}
.vf-cfg-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
}
.vf-cfg-step-counter {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--cfg-subtext);
    letter-spacing: .5px;
    text-transform: uppercase;
}
.vf-cfg-step-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--cfg-accent);
    letter-spacing: .3px;
}

/* ─── Step slide-in animation ──────────────────────────────── */
.vf-cfg-step {
    animation: vfSlideIn .28s cubic-bezier(.4,0,.2,1);
}
@keyframes vfSlideIn {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ─── Main layout: photo left | choices right ──────────────── */
.vf-cfg-main {
    display: grid;
    grid-template-columns: 55fr 45fr;
}
.vf-cfg-main--full {
    grid-template-columns: 1fr;
}

/* ─── Photo panel (left column) ────────────────────────────── */
.vf-cfg-photo-panel {
    position: relative;
    overflow: hidden;
    min-height: 500px;
}
.vf-cfg-photo-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity .55s ease;
}
.vf-cfg-photo-layer.active   { opacity: 1; z-index: 2; }
.vf-cfg-photo-layer.inactive { opacity: 0; z-index: 1; }
.vf-cfg-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.38) 100%);
    pointer-events: none;
    z-index: 3;
}
/* CSS gradient fallbacks */
.vf-photo-antraciet { background-image: linear-gradient(135deg, #2d3436 0%, #636e72 100%); }
.vf-photo-zwart     { background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.vf-photo-grijs     { background-image: linear-gradient(135deg, #636e72 0%, #b2bec3 100%); }
.vf-photo-dak       { background-image: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%); }
.vf-photo-zijkant   { background-image: linear-gradient(135deg, #55efc4 0%, #00cec9 100%); }
.vf-photo-spie      { background-image: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%); }
.vf-photo-voorkant  { background-image: linear-gradient(135deg, #fd79a8 0%, #e84393 100%); }
.vf-photo-zonwering { background-image: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%); }
.vf-photo-led       { background-image: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%); }
.vf-photo-maat      { background-image: linear-gradient(135deg, #00b894 0%, #00cec9 100%); }
.vf-photo-default   { background-image: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%); }

/* ─── Choices panel (right column) ─────────────────────────── */
.vf-cfg-choices-panel {
    background: var(--cfg-surface, var(--cfg-bg));
    padding: 28px 24px 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    max-height: 560px;
}
.vf-cfg-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--cfg-text);
    margin: 0 0 4px;
    line-height: 1.2;
    letter-spacing: -.3px;
}
.vf-cfg-desc {
    font-size: 13.5px;
    color: var(--cfg-subtext);
    margin: 0 0 6px;
    line-height: 1.55;
}

/* ─── Option cards ──────────────────────────────────────────── */
.vf-cfg-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.vf-cfg-opt {
    position: relative;
    background: var(--cfg-card);
    border: 2px solid transparent;
    border-radius: var(--cfg-radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    text-align: left;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    outline: none;
}
.vf-cfg-opt:hover {
    border-color: rgba(201,168,76,.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.vf-cfg-opt.active {
    border-color: var(--cfg-accent) !important;
    box-shadow: 0 0 0 1px var(--cfg-accent), 0 6px 28px rgba(201,168,76,.2) !important;
    background: var(--cfg-card-sel) !important;
}
/* Option thumbnail */
.vf-cfg-opt-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--cfg-border);
    flex-shrink: 0;
}
.vf-cfg-opt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    display: block;
}
.vf-cfg-opt:hover .vf-cfg-opt-thumb img { transform: scale(1.06); }
.vf-cfg-opt-thumb-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    opacity: .3;
}
/* Option text */
.vf-cfg-opt-info {
    padding: 9px 12px 11px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vf-cfg-opt-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--cfg-text);
    line-height: 1.3;
    display: block;
}
.vf-cfg-opt-sdesc {
    font-size: 11px;
    color: var(--cfg-subtext);
    line-height: 1.4;
    display: block;
    opacity: .8;
}
.vf-cfg-opt-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--cfg-accent);
    display: block;
    margin-top: 5px;
}
/* Checkmark badge */
.vf-cfg-opt-check {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 22px;
    height: 22px;
    background: var(--cfg-accent);
    color: var(--cfg-btn-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .2s, transform .22s cubic-bezier(.34,1.56,.64,1);
    z-index: 4;
    pointer-events: none;
    line-height: 1;
}
.vf-cfg-opt.active .vf-cfg-opt-check {
    opacity: 1;
    transform: scale(1);
}

/* ─── Full-width steps (contact / summary) ──────────────────── */
.vf-cfg-choices-panel--full {
    max-height: none;
    padding: 32px 40px;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

/* ─── Dimensions / Contact inputs ───────────────────────────── */
.vf-cfg-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.vf-cfg-form-group label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--cfg-subtext);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.vf-cfg-hint { font-weight: 400; opacity: .65; font-size: 10.5px; }
.vf-cfg-input {
    background: var(--cfg-card);
    border: 2px solid var(--cfg-border);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 15px;
    color: var(--cfg-text);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}
.vf-cfg-input:focus {
    outline: none;
    border-color: var(--cfg-accent);
    box-shadow: 0 0 0 3px rgba(201,168,76,.12);
}
.vf-cfg-input::placeholder { color: var(--cfg-subtext); opacity: .55; }
.vf-cfg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ─── Summary ───────────────────────────────────────────────── */
.vf-cfg-sum-table { width: 100%; border-collapse: collapse; }
.vf-cfg-sum-table tr td { padding: 9px 0; border-bottom: 1px solid var(--cfg-border); }
.vf-cfg-sum-label { color: var(--cfg-subtext); font-size: 13px; font-weight: 500; width: 45%; }
.vf-cfg-sum-val   { font-size: 14px; font-weight: 600; color: var(--cfg-text); padding-left: 12px; }
.vf-cfg-price-block {
    background: var(--cfg-card);
    border: 2px solid var(--cfg-accent);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.vf-cfg-price-label  { font-size: 13px; color: var(--cfg-subtext); line-height: 1.5; }
.vf-cfg-price-amount { font-size: 26px; font-weight: 800; color: var(--cfg-accent); letter-spacing: -.5px; }

/* ─── Live price bar ────────────────────────────────────────── */
#vf-cfg-price-bar {
    background: var(--cfg-surface, var(--cfg-bg));
    border-top: 1px solid var(--cfg-border);
    padding: 9px 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    min-height: 0;
    transition: all .3s;
}
.vf-cfg-price-live-lbl { font-size: 12px; color: var(--cfg-subtext); }
.vf-cfg-price-live-val { font-size: 17px; font-weight: 700; color: var(--cfg-accent); }

/* ─── Navigation buttons ────────────────────────────────────── */
.vf-cfg-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 18px 28px 26px;
    background: var(--cfg-bg);
    border-top: 1px solid var(--cfg-border);
}
.vf-cfg-btn {
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    font-family: inherit;
    letter-spacing: -.1px;
    width: 100%;
    line-height: 1;
}
.vf-cfg-btn:hover { opacity: .87; transform: translateY(-1px); }
.vf-cfg-btn:active { transform: translateY(0); }
.vf-cfg-btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }
.vf-cfg-btn--prev {
    background: var(--cfg-border);
    color: var(--cfg-subtext);
    border: 2px solid var(--cfg-border);
}
.vf-cfg-btn--next {
    background: var(--cfg-btn-bg);
    color: var(--cfg-btn-text);
    box-shadow: 0 4px 14px rgba(201,168,76,.22);
}
.vf-cfg-btn--submit {
    background: var(--cfg-btn-bg);
    color: var(--cfg-btn-text);
    padding: 18px;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(201,168,76,.32);
    grid-column: 1 / -1;
}

/* ─── Success state ─────────────────────────────────────────── */
#vf-cfg-success { text-align: center; padding: 80px 40px; background: var(--cfg-bg); }
.vf-cfg-success-icon { font-size: 72px; display: block; margin-bottom: 24px; animation: vfPop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes vfPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#vf-cfg-success h2 { color: var(--cfg-text); font-size: 28px; margin: 0 0 14px; font-weight: 700; }
#vf-cfg-success p  { color: var(--cfg-subtext); font-size: 16px; line-height: 1.7; max-width: 420px; margin: 0 auto; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .vf-cfg-wrap             { border-radius: 0; box-shadow: none; }
    .vf-cfg-main             { grid-template-columns: 1fr; }
    .vf-cfg-photo-panel      { min-height: 220px; max-height: 250px; }
    .vf-cfg-choices-panel    { max-height: none; padding: 20px 16px 8px; }
    .vf-cfg-choices-panel--full { padding: 24px 16px; }
    .vf-cfg-progress-wrap    { padding: 16px 16px 0; }
    .vf-cfg-nav              { padding: 14px 16px 20px; }
    .vf-cfg-title            { font-size: 18px; }
    #vf-cfg-price-bar        { padding: 8px 16px; }
}
@media (max-width: 480px) {
    .vf-cfg-options          { grid-template-columns: 1fr 1fr; }
    .vf-cfg-form-row         { grid-template-columns: 1fr; }
    .vf-cfg-opt-info         { padding: 7px 10px 9px; }
    .vf-cfg-opt-name         { font-size: 12px; }
    .vf-cfg-btn              { padding: 14px 16px; font-size: 14px; }
}
