/* =================================================
   EMBS Energy Savings Calculator v2 — Styles
   Font: Outfit | Primary: #007BFF
   Theme overrides baked in
   ================================================= */

/* --- Reset & Container --- */
#embs-calc-wrap {
    font-family: 'Outfit', sans-serif !important;
    max-width: 1250px !important;
    margin: 0 auto !important;
    padding: 0 20px 40px !important;
    color: #1a1f36 !important;
    -webkit-font-smoothing: antialiased;
}
#embs-calc-wrap *, #embs-calc-wrap *::before, #embs-calc-wrap *::after {
    box-sizing: border-box;
}

/* --- Progress Bar --- */
.embs-progress { margin-bottom: 36px; }
.embs-progress-steps {
    display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 16px;
}
.embs-step-dot {
    display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 2;
}
.embs-step-dot span {
    width: 38px; height: 38px; border-radius: 50%; background: #e2e8f0; color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 15px; transition: all 0.35s cubic-bezier(0.4,0,0.2,1); border: 2px solid transparent;
}
.embs-step-dot small { font-size: 12px; color: #94a3b8; font-weight: 500; transition: color 0.3s; white-space: nowrap; }
.embs-step-dot.active span { background: #007BFF !important; color: #fff !important; border-color: #007BFF; box-shadow: 0 0 0 4px rgba(0,123,255,0.15); }
.embs-step-dot.active small { color: #007BFF; font-weight: 600; }
.embs-step-dot.done span { background: #007BFF !important; color: #fff !important; border-color: #007BFF; }
.embs-step-dot.done small { color: #475569; }
.embs-step-line {
    flex: 1; max-width: 80px; height: 3px; background: #e2e8f0; border-radius: 2px;
    margin: 0 4px; margin-bottom: 22px; transition: background 0.35s;
}
.embs-step-line.done { background: #007BFF; }
.embs-progress-bar { height: 4px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.embs-progress-fill {
    height: 100%; background: linear-gradient(90deg, #007BFF 0%, #4da3ff 100%);
    border-radius: 4px; transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* --- Step Panels --- */
.embs-step-panel { animation: embsFadeIn 0.35s ease; }
@keyframes embsFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
#embs-calc-wrap .embs-step-panel h2 {
    font-family: 'Outfit', sans-serif !important; font-size: 26px !important; font-weight: 700 !important;
    margin: 0 0 6px !important; color: #0f172a !important; text-transform: none !important; letter-spacing: 0 !important;
}
.embs-subtitle { color: #64748b; font-size: 15px; margin: 0 0 28px; line-height: 1.5; }

/* --- Fields --- */
.embs-field { margin-bottom: 24px; }
.embs-field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: #334155; }
#embs-calc-wrap input[type="text"],
#embs-calc-wrap input[type="email"],
#embs-calc-wrap input[type="tel"],
#embs-calc-wrap input[type="number"],
#embs-calc-wrap select {
    width: 100% !important; padding: 12px 16px !important; border: 1.5px solid #d1d5db !important; border-radius: 10px !important;
    font-family: 'Outfit', sans-serif !important; font-size: 15px !important; color: #1a1f36 !important;
    background: #fff !important; transition: border-color 0.2s, box-shadow 0.2s; outline: none !important;
    height: auto !important; box-shadow: none !important;
}
#embs-calc-wrap input:focus, #embs-calc-wrap select:focus {
    border-color: #007BFF !important; box-shadow: 0 0 0 3px rgba(0,123,255,0.12) !important;
}
#embs-calc-wrap input::placeholder { color: #a0aec0; }
.embs-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Input prefix (£) --- */
.embs-input-prefix { position: relative; max-width: 260px; }
.embs-input-prefix span {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: #64748b; font-weight: 600; font-size: 15px; pointer-events: none;
}
.embs-input-prefix input { padding-left: 36px !important; }

/* --- Radio Cards --- */
.embs-radio-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.embs-radio-group--half { grid-template-columns: repeat(2, 1fr); max-width: 440px; }
.embs-radio-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 16px 12px; border: 1.5px solid #e2e8f0; border-radius: 12px;
    cursor: pointer; background: #fff; transition: all 0.2s; gap: 2px;
}
.embs-radio-card:hover { border-color: #93c5fd; background: #f8faff; }
.embs-radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.embs-radio-card:has(input:checked) {
    border-color: #007BFF; background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}
.embs-radio-label { font-weight: 600; font-size: 15px; color: #1a1f36; }
.embs-radio-desc { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* --- Checkbox Cards --- */
.embs-checkbox-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.embs-check-card {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px;
    border: 1.5px solid #e2e8f0; border-radius: 12px; cursor: pointer;
    background: #fff; transition: all 0.2s; font-size: 14px; font-weight: 500; color: #334155;
}
.embs-check-card:hover { border-color: #93c5fd; background: #f8faff; }
.embs-check-card input[type="checkbox"] { width: 18px; height: 18px; accent-color: #007BFF; flex-shrink: 0; }
.embs-check-card:has(input:checked) {
    border-color: #007BFF; background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
}

/* --- Solution Cards (Step 3) --- */
.embs-solution-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.embs-solution-card { flex-direction: column; align-items: flex-start; padding: 20px; gap: 6px; }
.embs-sol-icon { color: #007BFF; margin-bottom: 4px; line-height: 1; }
.embs-sol-icon svg { display: block; }
.embs-sol-name { font-weight: 700; font-size: 16px; color: #0f172a; }
.embs-sol-desc { font-size: 13px; color: #64748b; font-weight: 400; line-height: 1.4; }

/* --- File Upload --- */
.embs-file-upload { position: relative; max-width: 400px; }
.embs-file-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.embs-file-label {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 28px 20px; border: 2px dashed #d1d5db; border-radius: 12px;
    text-align: center; transition: border-color 0.2s, background 0.2s;
}
.embs-file-upload:hover .embs-file-label, .embs-file-label.has-file { border-color: #007BFF; background: #f8faff; }
.embs-file-icon { color: #007BFF; line-height: 1; }
.embs-file-text { font-weight: 600; font-size: 14px; color: #334155; }
.embs-file-label small { font-size: 12px; color: #94a3b8; }

/* --- Consent --- */
.embs-consent label {
    display: flex; align-items: flex-start; gap: 10px; font-size: 13px;
    color: #475569; line-height: 1.5; cursor: pointer;
}
.embs-consent input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; accent-color: #007BFF; flex-shrink: 0; }
.embs-consent a { color: #007BFF; text-decoration: underline; }

/* --- Navigation Buttons (theme-proof) --- */
.embs-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 32px; padding-top: 24px; border-top: 1px solid #f1f5f9;
}
.embs-btn {
    font-family: 'Outfit', sans-serif !important; font-size: 15px !important; font-weight: 600 !important;
    padding: 13px 28px !important; border-radius: 10px !important; border: none !important;
    cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
    text-transform: none !important; letter-spacing: 0 !important; line-height: 1.4 !important;
}
#embs-calc-wrap .embs-btn--back {
    background: transparent !important; color: #64748b !important; border: 1.5px solid #e2e8f0 !important; box-shadow: none !important;
}
#embs-calc-wrap .embs-btn--back:hover { background: #f8fafc !important; border-color: #cbd5e1 !important; color: #334155 !important; }
#embs-calc-wrap .embs-btn--next,
#embs-calc-wrap .embs-btn--submit {
    background: #007BFF !important; color: #fff !important; box-shadow: 0 2px 8px rgba(0,123,255,0.25) !important;
}
#embs-calc-wrap .embs-btn--next:hover,
#embs-calc-wrap .embs-btn--submit:hover {
    background: #0062cc !important; box-shadow: 0 4px 14px rgba(0,123,255,0.35) !important; transform: translateY(-1px);
}
.embs-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.embs-btn-spinner {
    width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%; animation: embsSpin 0.6s linear infinite;
}
@keyframes embsSpin { to { transform: rotate(360deg); } }

/* --- Validation --- */
.embs-field.embs-error input, .embs-field.embs-error select { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.1) !important; }
.embs-error-msg { color: #ef4444; font-size: 12px; margin-top: 4px; font-weight: 500; }

/* =================================================
   RESULTS
   ================================================= */
.embs-results-inner { animation: embsFadeIn 0.5s ease; }
.embs-results-header { text-align: center; margin-bottom: 32px; }
#embs-calc-wrap .embs-results-header h2 {
    font-family: 'Outfit', sans-serif !important; font-size: 28px !important; font-weight: 700 !important;
    color: #0f172a !important; margin: 0 0 8px !important;
}
.embs-results-header p { color: #64748b; font-size: 15px; margin: 0; }

/* Summary cards */
.embs-summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.embs-summary-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    border: 1px solid #dbeafe; border-radius: 14px; padding: 24px 20px; text-align: center;
}
.embs-summary-card.embs-card--accent {
    background: linear-gradient(135deg, #007BFF 0%, #339dff 100%) !important;
    border-color: transparent; color: #fff;
}
.embs-summary-card .embs-card-label {
    font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; opacity: 0.75;
}
.embs-card--accent .embs-card-label { opacity: 0.9; }
.embs-summary-card .embs-card-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.embs-summary-card .embs-card-sub { font-size: 13px; margin-top: 6px; opacity: 0.7; }

/* Solution tags */
.embs-sol-tags { margin-bottom: 32px; }

/* Solution breakdown table */
.embs-sol-table {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    overflow: hidden; margin-bottom: 32px;
}
#embs-calc-wrap .embs-sol-table h3 {
    font-family: 'Outfit', sans-serif !important; font-size: 18px !important; font-weight: 700 !important;
    padding: 20px 24px 0 !important; margin: 0 !important; color: #0f172a !important;
}
.embs-sol-table table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.embs-sol-table th {
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: #64748b; padding: 10px 24px; text-align: right; border-bottom: 1px solid #f1f5f9;
}
.embs-sol-table th:first-child { text-align: left; }
.embs-sol-table td {
    padding: 14px 24px; font-size: 15px; text-align: right; border-bottom: 1px solid #f8fafc;
}
.embs-sol-table td:first-child { text-align: left; font-weight: 600; color: #0f172a; }
.embs-sol-table tr:last-child td { border-bottom: none; }
.embs-sol-ev-note { color: #64748b; font-style: italic; font-size: 13px; text-align: right; }
.embs-sol-table-note {
    padding: 12px 24px 16px; font-size: 13px; color: #64748b; border-top: 1px solid #f1f5f9;
}
#embs-calc-wrap .embs-sol-tags h3 {
    font-family: 'Outfit', sans-serif !important; font-size: 18px !important; font-weight: 700 !important;
    margin: 0 0 16px !important; color: #0f172a !important;
}
.embs-tags-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.embs-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f0f7ff; border: 1px solid #dbeafe; border-radius: 8px;
    padding: 8px 16px; font-size: 14px; font-weight: 500; color: #1e40af;
}
.embs-tag svg { width: 18px; height: 18px; }

/* Recommendations */
.embs-recs { margin-bottom: 32px; }
#embs-calc-wrap .embs-recs h3 {
    font-family: 'Outfit', sans-serif !important; font-size: 18px !important; font-weight: 700 !important;
    margin: 0 0 16px !important; color: #0f172a !important;
}
.embs-recs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.embs-rec-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 24px; transition: box-shadow 0.2s;
}
.embs-rec-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.embs-rec-card .embs-rec-icon { color: #007BFF; margin-bottom: 8px; line-height: 1; }
.embs-rec-card .embs-rec-icon svg { display: block; }
.embs-rec-card .embs-rec-name { font-weight: 700; font-size: 16px; color: #0f172a; margin-bottom: 6px; }
.embs-rec-card .embs-rec-why { font-size: 14px; color: #475569; line-height: 1.5; }
.embs-rec-badge {
    display: inline-block; background: linear-gradient(135deg, #007BFF, #4da3ff);
    color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
}

/* Disclaimer */
.embs-disclaimer {
    background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid #f59e0b;
    border-radius: 10px; padding: 16px 20px; font-size: 13px; color: #78350f; line-height: 1.6; margin-bottom: 32px;
}

/* CTA */
.embs-cta {
    text-align: center; padding: 32px 20px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    border-radius: 16px; border: 1px solid #dbeafe;
}
#embs-calc-wrap .embs-cta h3 {
    font-family: 'Outfit', sans-serif !important; font-size: 22px !important; font-weight: 700 !important;
    margin: 0 0 8px !important; color: #0f172a !important;
}
.embs-cta p { color: #475569; font-size: 15px; margin: 0 0 20px; }
#embs-calc-wrap .embs-btn--cta {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Outfit', sans-serif !important; font-size: 17px !important; font-weight: 700 !important;
    padding: 16px 36px !important; background: #007BFF !important; color: #fff !important;
    border: none !important; border-radius: 12px !important; cursor: pointer; text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(0,123,255,0.3) !important; transition: all 0.2s;
    text-transform: none !important; letter-spacing: 0 !important;
}
#embs-calc-wrap .embs-btn--cta:hover {
    background: #0062cc !important; box-shadow: 0 6px 24px rgba(0,123,255,0.4) !important; transform: translateY(-2px);
}

/* =================================================
   RESPONSIVE
   ================================================= */
@media (max-width: 768px) {
    .embs-radio-group { grid-template-columns: 1fr; }
    .embs-radio-group--half { grid-template-columns: 1fr 1fr; }
    .embs-field-row { grid-template-columns: 1fr; }
    .embs-solution-cards { grid-template-columns: 1fr; }
    .embs-summary-row { grid-template-columns: 1fr; }
    .embs-step-dot small { font-size: 10px; }
    .embs-step-dot span { width: 32px; height: 32px; font-size: 13px; }
    #embs-calc-wrap .embs-step-panel h2 { font-size: 22px !important; }
    .embs-recs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .embs-progress-steps { gap: 0; }
    .embs-step-line { max-width: 32px; }
    .embs-step-dot small { display: none; }
    .embs-step-dot span { width: 28px; height: 28px; font-size: 12px; }
    .embs-checkbox-group { grid-template-columns: 1fr; }
}
