/* ================================================================
   Kozijnen Calculator — Frontend v4
   ================================================================ */

.kc-calculator {
    margin: 24px 0;
    font-family: inherit;
    max-width: 520px;
}
.kc-calc-title {
    font-size: 17px; font-weight: 700;
    margin: 0 0 14px; padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0; color: #1a1a1a;
}

/* ---- Sections ---- */
.kc-section {
    background: #f9f9f9; border: 1px solid #e8e8e8;
    border-radius: 8px; padding: 15px 17px; margin-bottom: 12px;
}
.kc-section h4 {
    margin: 0 0 12px; font-size: 11px; text-transform: uppercase;
    letter-spacing: .7px; color: #aaa; font-weight: 700;
}

/* ---- Dims ---- */
.kc-dims-grid { display: flex; align-items: flex-end; gap: 10px; }
.kc-dim-group { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.kc-dim-group label { font-size: 12px; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: .4px; }
.kc-dim-separator { font-size: 22px; color: #ddd; padding-bottom: 20px; flex-shrink: 0; line-height: 1; }
.kc-input-wrap { position: relative; }
.kc-input-wrap input {
    width: 100%; padding: 10px 36px 10px 12px;
    border: 2px solid #e0e0e0; border-radius: 7px;
    font-size: 16px; font-weight: 600;
    box-sizing: border-box; transition: border-color .15s, box-shadow .15s;
    -moz-appearance: textfield; background: #fff;
}
.kc-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.kc-input-wrap input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.kc-input-wrap input.kc-input-error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.kc-unit { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #bbb; font-weight: 600; pointer-events: none; }
.kc-dim-hint { font-size: 11px; color: #bbb; }
.kc-dim-hint.kc-error-text { color: #ef4444; font-weight: 600; }

/* ---- Variable groups ---- */
.kc-var-group { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #ececec; }
.kc-var-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

/* Inline label row with info button */
.kc-var-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.kc-var-label {
    font-size: 14px; font-weight: 700; color: #222;
    margin: 0;
}

/* Info button — inline pill */
.kc-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 99px;
    cursor: pointer;
    color: #2563eb;
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    transition: all .15s;
    white-space: nowrap;
    line-height: 1.4;
}
.kc-info-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.kc-info-btn svg { flex-shrink: 0; }

.kc-var-desc { font-size: 12px; color: #999; margin: 0 0 8px; line-height: 1.5; }

/* Select & Radio */
.kc-select {
    width: 100%; padding: 9px 12px;
    border: 2px solid #e0e0e0; border-radius: 7px;
    font-size: 14px; background: #fff; transition: border-color .15s;
}
.kc-select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

.kc-radio-group { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-radio-label {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border: 2px solid #e0e0e0; border-radius: 7px;
    font-size: 13px; background: #fff; cursor: pointer;
    transition: border-color .12s, background .12s; user-select: none;
}
.kc-radio-label:hover { border-color: #93c5fd; background: #f0f7ff; }
.kc-radio-label input { display: none; }
.kc-radio-label:has(input:checked) { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 700; }

/* Price note */
.kc-var-price-note {
    display: none; font-size: 12px; color: #6b7280;
    margin-top: 5px; font-style: italic;
}
.kc-var-price-note strong { color: #111827; font-style: normal; }

/* ---- Klant-toelichting ---- */
.kc-klant-toelichting { margin-top: 10px; }
.kc-klant-toelichting-label {
    display: block; font-size: 12.5px; color: #374151; margin-bottom: 5px;
}
.kc-klant-toelichting-label em { font-style: normal; font-weight: 700; }
.kc-opt-label { color: #9ca3af; font-size: 11px; }
.kc-klant-toelichting-input {
    width: 100%; box-sizing: border-box;
    padding: 9px 11px; border: 2px solid #e0e0e0; border-radius: 7px;
    font-size: 13px; font-family: inherit; resize: vertical; line-height: 1.5;
    color: #1a1a1a; background: #fff; transition: border-color .15s;
}
.kc-klant-toelichting-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* ---- Price section ---- */
.kc-price-section { background: #fff; border: 2px solid #e8e8e8; }
.kc-price-breakdown { margin-bottom: 10px; }
.kc-price-breakdown h4 { color: #ccc; }
.kc-breakdown-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px solid #f5f5f5; }
.kc-breakdown-line:last-child { border-bottom: none; }
.kc-bl-label { color: #777; flex: 1; padding-right: 12px; }
.kc-bl-amount { font-weight: 600; color: #333; white-space: nowrap; }
.kc-price-divider { height: 1px; background: #e8e8e8; margin: 8px 0; }
.kc-total-row { display: flex; justify-content: space-between; align-items: center; }
.kc-total-label { font-size: 15px; font-weight: 700; color: #111; }
.kc-total-amount { font-size: 22px; font-weight: 800; color: #ccc; transition: color .2s; }
.kc-total-amount.kc-price-ready { color: #16a34a; }
.kc-tax-note { margin: 8px 0 0; font-size: 11px; color: #9ca3af; }

/* ---- Frontend popup modal ---- */
.kc-fe-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(2px);
}
.kc-fe-modal {
    width: 80vw; height: 80vh; background: #fff;
    border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
    position: relative; overflow-y: auto;
    padding: 44px 40px 40px; box-sizing: border-box;
}
.kc-fe-modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: #f3f4f6; border: none; border-radius: 6px;
    cursor: pointer; font-size: 15px; color: #6b7280;
    transition: all .12s;
}
.kc-fe-modal-close:hover { background: #fee2e2; color: #ef4444; }
.kc-fe-modal-content { font-size: 15px; line-height: 1.7; color: #374151; }
.kc-fe-modal-content h1, .kc-fe-modal-content h2, .kc-fe-modal-content h3 { margin-top: 0; color: #111827; }
.kc-fe-modal-content img { max-width: 100%; height: auto; border-radius: 6px; }

@media (max-width: 480px) {
    .kc-dims-grid { flex-wrap: wrap; }
    .kc-dim-separator { display: none; }
    .kc-radio-group { flex-direction: column; }
    .kc-fe-modal { width: 95vw; height: 90vh; padding: 44px 18px 24px; }
}
