/**
 * Solar Sizing Calculator - front end styles
 * Migrated from the Elementor HTML widget. Scoped to #bicity-calc.
 */

#bicity-calc *, #bicity-calc *::before, #bicity-calc *::after { box-sizing: border-box; margin: 0; padding: 0; }

#bicity-calc {
  width: 100%; min-width: 0;
  --green-900: #1a3a1a; --green-800: #1B5E20; --green-700: #2E7D32; --green-600: #388E3C;
  --green-500: #43A047; --green-400: #66BB6A; --green-300: #81C784; --green-200: #A5D6A7;
  --green-100: #C8E6C9; --green-50: #E8F5E9;
  --amber-500: #FF8F00; --amber-400: #FFA000; --amber-100: #FFECB3; --amber-50: #FFF8E1;
  --slate-900: #0f172a; --slate-800: #1e293b; --slate-700: #334155; --slate-600: #475569;
  --slate-500: #64748b; --slate-400: #94a3b8; --slate-300: #cbd5e1; --slate-200: #e2e8f0;
  --slate-100: #f1f5f9; --slate-50: #f8fafc; --bc-white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08); --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 16px; --radius-sm: 10px; --radius-xs: 6px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--slate-800); line-height: 1.5;
  max-width: 780px; margin: 0 auto; padding: 24px 0 40px; position: relative;
}

#bicity-calc .sun-deco {
  position: absolute; top: -80px; right: -80px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,183,0,0.15) 0%, rgba(255,183,0,0.05) 50%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 0; animation: bcSunPulse 6s ease-in-out infinite;
}
@keyframes bcSunPulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }

#bicity-calc .bc-header { text-align: center; margin-bottom: 32px; position: relative; z-index: 1; }
#bicity-calc .header-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--green-50);
  border: 1px solid var(--green-200); color: var(--green-700); font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 50px; margin-bottom: 16px; letter-spacing: 0.02em;
}
#bicity-calc .header-badge svg { flex-shrink: 0; }
#bicity-calc .bc-header h2 {
  font-family: 'Outfit', sans-serif; font-size: clamp(28px, 5vw, 42px); font-weight: 800;
  color: var(--green-900); line-height: 1.15; margin-bottom: 12px; letter-spacing: -0.02em;
}
#bicity-calc .bc-header h2 span {
  background: linear-gradient(135deg, var(--green-600), var(--amber-500));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#bicity-calc .bc-header p { font-size: 16px; color: var(--slate-500); max-width: 520px; margin: 0 auto; line-height: 1.6; }

#bicity-calc .progress-wrap { margin-bottom: 28px; position: relative; z-index: 1; }
#bicity-calc .progress-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 8px; }
#bicity-calc .progress-step { display: flex; align-items: center; gap: 0; }
#bicity-calc .step-dot {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px; background: var(--slate-200);
  color: var(--slate-400); transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); flex-shrink: 0;
}
#bicity-calc .step-dot.active { background: var(--green-600); color: var(--bc-white); box-shadow: 0 0 0 4px rgba(56,142,60,0.2); transform: scale(1.1); }
#bicity-calc .step-dot.done { background: var(--green-400); color: var(--bc-white); }
#bicity-calc .step-line { width: 60px; height: 3px; background: var(--slate-200); transition: background 0.4s ease; flex-shrink: 0; }
#bicity-calc .step-line.done { background: var(--green-400); }
#bicity-calc .step-labels { display: flex; justify-content: space-between; max-width: 440px; margin: 0 auto; padding: 0 8px; }
#bicity-calc .step-label { font-size: 11px; font-weight: 500; color: var(--slate-400); text-align: center; transition: color 0.3s; width: 80px; }
#bicity-calc .step-label.active { color: var(--green-700); font-weight: 600; }

#bicity-calc .bc-card { background: var(--bc-white); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; position: relative; z-index: 1; }
#bicity-calc .card-accent { height: 4px; background: linear-gradient(90deg, var(--green-600), var(--green-400), var(--amber-400)); }
#bicity-calc .card-body { padding: 32px 28px; }
#bicity-calc .step-content { display: none; }
#bicity-calc .step-content.active { display: block; }
#bicity-calc .step-title { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; color: var(--green-900); margin-bottom: 4px; }
#bicity-calc .step-subtitle { font-size: 14px; color: var(--slate-500); margin-bottom: 24px; line-height: 1.5; }

#bicity-calc .option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 8px; }
#bicity-calc .option-grid.cols-1 { grid-template-columns: 1fr; }
#bicity-calc .option-card {
  border: 2px solid var(--slate-200); border-radius: var(--radius-sm); padding: 16px; cursor: pointer;
  transition: all 0.25s ease; text-align: center; position: relative; background: var(--bc-white); user-select: none;
}
#bicity-calc .option-card:hover { border-color: var(--green-300); background: var(--green-50); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
#bicity-calc .option-card.selected { border-color: var(--green-600); background: var(--green-50); box-shadow: 0 0 0 3px rgba(56,142,60,0.15); }
#bicity-calc .option-card.selected::after {
  content: '\2713'; position: absolute; top: 8px; right: 10px; width: 22px; height: 22px;
  background: var(--green-600); color: #fff; border-radius: 50%; font-size: 12px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
#bicity-calc .option-card.option-wide { text-align: left; display: flex; align-items: center; gap: 14px; padding: 18px; }
#bicity-calc .option-card.option-wide .option-icon { margin: 0; font-size: 36px; }
#bicity-calc .option-card.option-wide .option-label { font-size: 15px; }
#bicity-calc .option-icon { font-size: 32px; margin-bottom: 8px; display: block; line-height: 1; pointer-events: none; }
#bicity-calc .option-label { font-weight: 600; font-size: 14px; color: var(--slate-800); margin-bottom: 2px; pointer-events: none; }
#bicity-calc .option-desc { font-size: 12px; color: var(--slate-500); line-height: 1.4; pointer-events: none; }

#bicity-calc .checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
#bicity-calc .checkbox-item {
  display: flex; align-items: center; gap: 10px; border: 2px solid var(--slate-200);
  border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; transition: all 0.2s ease; background: var(--bc-white); user-select: none;
}
#bicity-calc .checkbox-item:hover { border-color: var(--green-300); background: var(--green-50); }
#bicity-calc .checkbox-item.checked { border-color: var(--green-600); background: var(--green-50); }
#bicity-calc .checkbox-item .check-box {
  width: 20px; height: 20px; border: 2px solid var(--slate-300); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all 0.2s; font-size: 12px; color: transparent; pointer-events: none;
}
#bicity-calc .checkbox-item.checked .check-box { background: var(--green-600); border-color: var(--green-600); color: #fff; }
#bicity-calc .checkbox-item .cb-icon { font-size: 20px; flex-shrink: 0; pointer-events: none; }
#bicity-calc .checkbox-item .cb-text { font-size: 13px; font-weight: 500; color: var(--slate-700); flex: 1; pointer-events: none; }
#bicity-calc .checkbox-item .cb-watts { font-size: 11px; color: var(--slate-400); font-weight: 400; pointer-events: none; }

#bicity-calc .running-total {
  margin-top: 16px; padding: 12px 16px; background: var(--green-50); border: 1px solid var(--green-200);
  border-radius: var(--radius-xs); font-size: 14px; color: var(--slate-700);
}
#bicity-calc .running-total strong { font-family: 'Outfit', sans-serif; color: var(--green-800); font-size: 16px; }

#bicity-calc .bill-section { margin-bottom: 8px; }
#bicity-calc .bill-display {
  text-align: center; margin-bottom: 20px; padding: 20px;
  background: linear-gradient(135deg, var(--green-50), var(--amber-50));
  border-radius: var(--radius-sm); border: 1px solid var(--green-100);
}
#bicity-calc .bill-amount { font-family: 'Outfit', sans-serif; font-size: 42px; font-weight: 800; color: var(--green-800); line-height: 1; }
#bicity-calc .bill-amount span { font-size: 20px; font-weight: 500; }
#bicity-calc .bill-label { font-size: 13px; color: var(--slate-500); margin-top: 4px; }
#bicity-calc .slider-wrap { padding: 0 4px; }
#bicity-calc input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--green-200), var(--green-400), var(--amber-400)); outline: none; cursor: pointer;
}
#bicity-calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bc-white);
  border: 3px solid var(--green-600); box-shadow: var(--shadow-md); cursor: pointer; transition: transform 0.2s;
}
#bicity-calc input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
#bicity-calc input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bc-white);
  border: 3px solid var(--green-600); box-shadow: var(--shadow-md); cursor: pointer;
}
#bicity-calc .slider-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--slate-400); }

#bicity-calc .btn-row { display: flex; gap: 12px; margin-top: 28px; }
#bicity-calc .bc-btn {
  flex: 1; padding: 14px 24px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.25s ease; border: none;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
#bicity-calc .bc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#bicity-calc .bc-btn:focus-visible { outline: 3px solid var(--amber-400); outline-offset: 2px; }
#bicity-calc .btn-primary { background: linear-gradient(135deg, var(--green-700), var(--green-600)); color: var(--bc-white); box-shadow: 0 4px 14px rgba(46,125,50,0.3); }
#bicity-calc .btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--green-800), var(--green-700)); box-shadow: 0 6px 20px rgba(46,125,50,0.4); transform: translateY(-1px); }
#bicity-calc .btn-back { background: var(--slate-100); color: var(--slate-600); flex: 0 0 auto; padding: 14px 20px; }
#bicity-calc .btn-back:hover { background: var(--slate-200); }
#bicity-calc .btn-whatsapp { background: #25D366; color: #fff; box-shadow: 0 4px 14px rgba(37,211,102,0.3); }
#bicity-calc .btn-whatsapp:hover { background: #1da851; transform: translateY(-1px); }
#bicity-calc .btn-quote { background: linear-gradient(135deg, var(--amber-500), var(--amber-400)); color: #fff; box-shadow: 0 4px 14px rgba(255,143,0,0.3); }
#bicity-calc .btn-quote:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,143,0,0.4); }

#bicity-calc .results-hero {
  text-align: center; padding: 28px 20px; background: linear-gradient(135deg, var(--green-800), var(--green-700));
  border-radius: var(--radius-sm); margin-bottom: 20px; position: relative; overflow: hidden;
}
#bicity-calc .results-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,183,0,0.2), transparent 70%); border-radius: 50%;
}
#bicity-calc .results-hero h3 { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 500; color: var(--green-200); margin-bottom: 8px; }
#bicity-calc .results-price { font-family: 'Outfit', sans-serif; font-size: clamp(36px, 7vw, 52px); font-weight: 800; color: var(--bc-white); line-height: 1.1; }
#bicity-calc .results-price small { font-size: 0.45em; font-weight: 400; opacity: 0.75; display: block; margin-top: 4px; }

/* Inverter sizing box */
#bicity-calc .sizing-box {
  border: 2px solid var(--green-200); border-radius: var(--radius-sm);
  padding: 18px 20px; margin-bottom: 20px; background: var(--slate-50);
}
#bicity-calc .sizing-headline {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 6px; border-bottom: 2px solid var(--green-200);
}
#bicity-calc .sizing-headline-label { font-size: 15px; font-weight: 600; color: var(--green-900); }
#bicity-calc .sizing-headline-value {
  font-family: 'Outfit', sans-serif; font-size: 34px; font-weight: 800; line-height: 1;
  color: var(--green-700);
}

/* Suggested inverters */
#bicity-calc .inverter-suggest { margin-top: 14px; }
#bicity-calc .suggest-title { font-size: 13px; font-weight: 700; color: var(--green-900); margin-bottom: 8px; }
#bicity-calc .suggest-list { display: flex; flex-direction: column; gap: 8px; }
#bicity-calc .suggest-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-decoration: none;
  background: var(--bc-white); border: 1px solid var(--slate-200); border-radius: var(--radius-xs);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
#bicity-calc .suggest-item:hover { border-color: var(--green-400); transform: translateY(-1px); }
#bicity-calc .suggest-item.is-out { opacity: 0.68; }
#bicity-calc .suggest-kw {
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 15px; color: var(--green-800);
  background: var(--green-50); border-radius: 6px; padding: 5px 9px; white-space: nowrap; flex-shrink: 0;
}
#bicity-calc .suggest-name { flex: 1; font-size: 13.5px; color: var(--slate-700); line-height: 1.35; }
#bicity-calc .suggest-price { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px; color: var(--green-800); white-space: nowrap; }
#bicity-calc .suggest-price em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--slate-400); display: block; }
#bicity-calc .suggest-all { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--green-700); text-decoration: none; }
#bicity-calc .suggest-all:hover { text-decoration: underline; }
#bicity-calc .suggest-empty { font-size: 13px; color: var(--slate-500); }
#bicity-calc .suggest-empty a { color: var(--green-700); }

@media (max-width: 500px) {
  #bicity-calc .suggest-item { flex-wrap: wrap; }
  #bicity-calc .suggest-name { flex: 1 1 100%; order: 3; }
}
#bicity-calc .sizing-rows { display: flex; flex-direction: column; }
#bicity-calc .sizing-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--slate-200); font-size: 14px; color: var(--slate-600);
}
#bicity-calc .sizing-row:last-child { border-bottom: 0; }
#bicity-calc .sizing-row strong { font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--slate-800); white-space: nowrap; }
#bicity-calc .sizing-row-key { background: var(--green-50); margin: 4px -20px; padding: 10px 20px; border-bottom: 0; }
#bicity-calc .sizing-row-key strong { color: var(--green-800); font-size: 17px; }
#bicity-calc .sizing-note { margin-top: 10px; font-size: 12.5px; color: var(--slate-500); line-height: 1.55; }

#bicity-calc .savings-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: linear-gradient(135deg, var(--amber-50), var(--green-50)); border: 1px solid var(--green-200); border-radius: var(--radius-sm); margin-bottom: 20px; }
#bicity-calc .savings-icon { font-size: 28px; flex-shrink: 0; }
#bicity-calc .savings-text { font-size: 14px; color: var(--slate-700); line-height: 1.5; }
#bicity-calc .savings-text strong { color: var(--green-800); }

#bicity-calc .system-breakdown { margin-bottom: 20px; }
#bicity-calc .system-breakdown h4 { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; color: var(--green-900); margin-bottom: 12px; }
#bicity-calc .component-list { display: flex; flex-direction: column; gap: 8px; }
#bicity-calc .component-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--slate-50); border-radius: var(--radius-xs); border: 1px solid var(--slate-200); flex-wrap: wrap; gap: 8px; }
#bicity-calc .comp-left { display: flex; align-items: center; gap: 10px; }
#bicity-calc .comp-icon { font-size: 22px; }
#bicity-calc .comp-name { font-size: 14px; font-weight: 500; color: var(--slate-700); }
#bicity-calc .comp-name a { color: var(--green-700); text-decoration: none; }
#bicity-calc .comp-name a:hover { text-decoration: underline; }
#bicity-calc .comp-detail { font-size: 12px; color: var(--slate-500); }
#bicity-calc .comp-price { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700; color: var(--green-800); text-align: right; white-space: nowrap; }
#bicity-calc .total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--green-50); border-radius: var(--radius-xs); border: 2px solid var(--green-200); margin-top: 8px; }
#bicity-calc .total-label { font-weight: 700; font-size: 15px; color: var(--green-900); }
#bicity-calc .total-value { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 800; color: var(--green-800); }
#bicity-calc .summary-row { background: var(--amber-50); border-color: var(--amber-100); }
#bicity-calc .summary-row .total-value { font-size: 16px; color: var(--amber-500); }
#bicity-calc .can-power { margin-top: 8px; padding: 10px 16px; background: var(--slate-100); border-radius: var(--radius-xs); font-size: 12px; color: var(--slate-600); line-height: 1.5; }

#bicity-calc .info-note { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-xs); font-size: 13px; color: var(--slate-600); line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; }
#bicity-calc .info-note .fn-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
#bicity-calc .note-labour { background: var(--green-50); border: 1px solid var(--green-200); }
#bicity-calc .note-finance { background: var(--amber-50); border: 1px solid var(--amber-100); }
#bicity-calc .results-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
#bicity-calc .results-actions .bc-btn { flex: unset; width: 100%; }
#bicity-calc .disclaimer { margin-top: 16px; font-size: 11px; color: var(--slate-400); text-align: center; line-height: 1.5; }

@media (max-width: 500px) {
  #bicity-calc .option-grid { grid-template-columns: 1fr; }
  #bicity-calc .checkbox-grid { grid-template-columns: 1fr; }
  #bicity-calc .card-body { padding: 24px 18px; }
  #bicity-calc .step-line { width: 36px; }
  #bicity-calc .btn-row { flex-direction: column; }
  #bicity-calc .btn-back { flex: 1; }
  #bicity-calc .sizing-row-key { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #bicity-calc .sun-deco { animation: none; }
  #bicity-calc * { transition: none !important; }
}

/* =====================================================================
 * Shell: standalone page, tool menu, and the individual tools
/* Reset inside the app so theme styles cannot distort the tools */
.sqbc-app {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b; line-height: 1.5;
  width: 100%; max-width: 100%; min-width: 0; margin: 0 auto;
  container-type: inline-size;
}
/* Only the full page layout gets the reading-width cap */
body.sqbc-standalone .sqbc-app { max-width: 980px; }
.sqbc-app img { max-width: 100%; height: auto; }
.sqbc-app table { max-width: 100%; }
.sqbc-app *, .sqbc-app *::before, .sqbc-app *::after { box-sizing: border-box; }
.sqbc-app h2, .sqbc-app h3, .sqbc-app h4 { margin: 0; padding: 0; text-transform: none; letter-spacing: normal; }
.sqbc-app p { margin: 0; }
.sqbc-app button { font-family: inherit; }
.sqbc-app a { box-shadow: none; }

 * ================================================================== */

body.sqbc-standalone {
  margin: 0; padding: 0; background: #f6f8fb; color: #1e293b;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
body.sqbc-standalone *, body.sqbc-standalone *::before, body.sqbc-standalone *::after { box-sizing: border-box; }

.sqbc-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 28px; background: #fff; border-bottom: 1px solid #e2e8f0;
}
.sqbc-brand { display: inline-flex; align-items: center; text-decoration: none; }
.sqbc-brand img { height: 44px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.sqbc-brand-name { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 18px; color: #1B5E20; }
.sqbc-topnav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sqbc-topnav a { font-size: 14px; font-weight: 600; color: #475569; text-decoration: none; }
.sqbc-topnav a:hover { color: #2E7D32; }
.sqbc-topnav-cta { background: #25D366; color: #fff !important; padding: 9px 16px; border-radius: 8px; }
.sqbc-topnav-cta:hover { background: #1da851; }

.sqbc-main { max-width: 980px; margin: 0 auto; padding: 28px 16px 56px; }
.sqbc-page-head { text-align: center; margin-bottom: 22px; }
.sqbc-page-head h1 {
  font-family: 'Outfit', sans-serif; font-size: clamp(26px, 4.4vw, 38px); font-weight: 800;
  color: #1a3a1a; margin: 0 0 6px; line-height: 1.15; letter-spacing: -0.02em;
}
.sqbc-page-head p { margin: 0; color: #64748b; font-size: 15px; }

/* Tool menu */
.sqbc-app .sqbc-menu {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 10px; margin-bottom: 22px; min-width: 0;
}
.sqbc-app .sqbc-menu-item { min-width: 0; overflow-wrap: break-word; }
.sqbc-app .sqbc-menu-item {
  text-align: left; font: inherit; cursor: pointer; padding: 14px 16px; border-radius: 12px;
  background: #fff; border: 2px solid #e2e8f0; transition: border-color 0.2s ease, transform 0.2s ease;
}
.sqbc-app .sqbc-menu-item:hover { border-color: #81C784; transform: translateY(-1px); }
.sqbc-app .sqbc-menu-item.is-active { border-color: #2E7D32; background: #E8F5E9; }
.sqbc-app .sqbc-menu-item:focus-visible { outline: 3px solid #FFA000; outline-offset: 2px; }
.sqbc-app .sqbc-menu-label {
  display: block; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 15px; color: #1a3a1a; margin-bottom: 3px;
}
.sqbc-app .sqbc-menu-blurb { display: block; font-size: 12.5px; color: #64748b; line-height: 1.4; }

.sqbc-app .sqbc-panel { display: none; }
.sqbc-app .sqbc-panel.is-active { display: block; }

/* Tool layout (used by the individual sizing tools) */
.sqbc-app .tool { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 26px; box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.sqbc-app .tool-head { margin-bottom: 22px; }
.sqbc-app .tool-head h2 { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; color: #1a3a1a; margin: 0 0 4px; }
.sqbc-app .tool-head p { margin: 0; color: #64748b; font-size: 14px; max-width: 60ch; }
.sqbc-app .tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 26px; align-items: start; }
.sqbc-app .tool-grid > * { min-width: 0; }
.sqbc-app .tool-inputs, .sqbc-app .tool-answer { min-width: 0; }

.sqbc-app .tool-field + .tool-field { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e2e8f0; }
.sqbc-app .tool-label { display: block; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.sqbc-app .tool-help { margin: 0 0 10px; font-size: 13.5px; color: #64748b; max-width: 52ch; }
.sqbc-app .tool-input-row { display: flex; gap: 10px; max-width: 330px; }
.sqbc-app .tool-input {
  flex: 1 1 auto; min-width: 0; font: inherit; font-family: 'Outfit', sans-serif;
  font-size: 24px; font-weight: 700; color: #1B5E20; padding: 12px 14px;
  background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 10px;
}
.sqbc-app .tool-select { font: inherit; padding: 12px 10px; background: #fff; border: 2px solid #e2e8f0; border-radius: 10px; cursor: pointer; }
.sqbc-app .tool-input:focus, .sqbc-app .tool-select:focus { border-color: #2E7D32; outline: none; }
.sqbc-app .tool-echo { margin: 8px 0 0; font-size: 13px; color: #64748b; min-height: 1.4em; }
.sqbc-app .tool-factor { margin: 0; font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 700; color: #1B5E20; }

.sqbc-app .tool-working { margin-top: 22px; padding: 14px 16px; background: #f8fafc; border-left: 3px solid #FFA000; border-radius: 0 10px 10px 0; }
.sqbc-app .tool-working-caption { display: block; font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 5px; }
.sqbc-app .tool-equation { margin: 0; font-size: 14.5px; font-weight: 600; color: #334155; line-height: 1.65; }

.sqbc-app .tool-answer { position: sticky; top: 20px; }
.sqbc-app .answer-card {
  background: linear-gradient(160deg, #2E7D32 0%, #1B5E20 60%); border-radius: 14px; padding: 22px 24px 18px; color: #fff;
}
.sqbc-app .answer-label { display: block; font-size: 13px; font-weight: 600; color: #A5D6A7; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.18); }
.sqbc-app .answer-value { margin: 14px 0 16px; font-family: 'Outfit', sans-serif; font-size: 58px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
.sqbc-app .answer-unit { font-size: 22px; font-weight: 700; color: #FFC107; margin-left: 6px; }
.sqbc-app .answer-rows { border-top: 1px solid rgba(255,255,255,0.16); }
.sqbc-app .answer-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 13.5px; }
.sqbc-app .answer-row:last-child { border-bottom: 0; }
.sqbc-app .answer-row span { color: #C8E6C9; }
.sqbc-app .answer-row strong { font-family: 'Outfit', sans-serif; font-weight: 700; }
.sqbc-app .answer-card.is-updated { animation: sqbcPulse 0.45s ease; }
@keyframes sqbcPulse {
0% { box-shadow: 0 0 0 0 rgba(255,193,7,0.5); }
100% { box-shadow: 0 0 0 16px rgba(255,193,7,0); }
}

/* Suggested inverters inside the standalone tools */
.sqbc-app .tool .inverter-suggest { margin-top: 14px; }
.sqbc-app .tool .suggest-title { font-size: 13px; font-weight: 700; color: #1a3a1a; margin-bottom: 8px; }
.sqbc-app .tool .suggest-list { display: flex; flex-direction: column; gap: 8px; }
.sqbc-app .tool .suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; text-decoration: none;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; transition: border-color 0.2s ease;
}
.sqbc-app .tool .suggest-item:hover { border-color: #66BB6A; }
.sqbc-app .tool .suggest-item.is-out { opacity: 0.68; }
.sqbc-app .tool .suggest-kw { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 14px; color: #1B5E20; background: #E8F5E9; border-radius: 6px; padding: 5px 8px; white-space: nowrap; }
.sqbc-app .tool .suggest-name { flex: 1; font-size: 13px; color: #334155; line-height: 1.35; }
.sqbc-app .tool .suggest-price { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13.5px; color: #1B5E20; white-space: nowrap; }
.sqbc-app .tool .suggest-price em { font-style: normal; font-weight: 500; font-size: 11px; color: #94a3b8; display: block; }
.sqbc-app .tool .suggest-all { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: #2E7D32; text-decoration: none; }
.sqbc-app .tool .suggest-empty { font-size: 13px; color: #64748b; }

.sqbc-footer { text-align: center; padding: 24px 16px 34px; color: #94a3b8; font-size: 13px; }
.sqbc-footer a { color: #2E7D32; }
.sqbc-footer-note { margin-top: 6px; font-size: 11.5px; }

/* The embedded wizard sits centred inside the shell */
.sqbc-app .sqbc-panel #bicity-calc { padding-top: 0; padding-left: 0; padding-right: 0; max-width: 100%; }
.sqbc-app .sqbc-panel #bicity-calc .sun-deco { display: none; }
#bicity-calc .checkbox-grid, #bicity-calc .option-grid { min-width: 0; }
#bicity-calc .checkbox-item, #bicity-calc .option-card { min-width: 0; }
#bicity-calc .checkbox-item > div, #bicity-calc .option-card > div { min-width: 0; overflow-wrap: break-word; }
#bicity-calc .component-item { min-width: 0; }
#bicity-calc .comp-left { min-width: 0; }
#bicity-calc .comp-name, #bicity-calc .comp-detail { overflow-wrap: break-word; }

@media (max-width: 860px) {
.sqbc-app .tool-grid { grid-template-columns: 1fr; }
.sqbc-app .tool-answer { position: static; }
.sqbc-app .answer-value { font-size: 46px; }
}

/* Respond to the width of the column the calculator sits in, not the screen.
   This is what keeps the tools usable inside a narrow content area next to a sidebar. */
@container (max-width: 760px) {
  .sqbc-app .tool-grid { grid-template-columns: 1fr; }
  .sqbc-app .tool-answer { position: static; }
  .sqbc-app .answer-value { font-size: 46px; }
  .sqbc-app .sqbc-menu { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
}
@container (max-width: 560px) {
  .sqbc-app .sqbc-menu { grid-template-columns: 1fr 1fr; }
  .sqbc-app .sqbc-menu-blurb { display: none; }
  .sqbc-app .tool { padding: 20px 18px; }
  .sqbc-app .tool-input-row { max-width: none; }
  .sqbc-app #bicity-calc .checkbox-grid { grid-template-columns: 1fr; }
  .sqbc-app #bicity-calc .option-grid { grid-template-columns: 1fr; }
  .sqbc-app #bicity-calc .card-body { padding: 22px 16px; }
  .sqbc-app #bicity-calc .step-line { width: 30px; }
}
@container (max-width: 380px) {
  .sqbc-app .sqbc-menu { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
.sqbc-topbar { padding: 12px 16px; }
.sqbc-topnav { gap: 12px; }
.sqbc-app .tool { padding: 20px 18px; }
.sqbc-app .tool-input-row { max-width: none; }
.sqbc-app .tool .suggest-item { flex-wrap: wrap; }
.sqbc-app .tool .suggest-name { flex: 1 1 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
.sqbc-app .answer-card.is-updated { animation: none; }
}

/* Battery tool additions */
.sqbc-app .tool-unit-tag {
  display: inline-flex; align-items: center; padding: 0 14px; white-space: nowrap;
  background: #f1f5f9; border: 2px solid #e2e8f0; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #64748b;
}
.sqbc-app .tool-select-wide { width: 100%; max-width: 420px; font-size: 14px; }
.sqbc-app .tool-note { margin: 12px 2px 0; font-size: 12.5px; color: #64748b; line-height: 1.55; }
.sqbc-app .answer-unit { font-size: 20px; }
.sqbc-app .tool .suggest-name small { color: #94a3b8; font-size: 11.5px; }
@container (max-width: 560px) {
  .sqbc-app .tool-unit-tag { padding: 10px 14px; }
}

/* Selected battery leads the bank options */
.sqbc-app .tool .suggest-item.is-selected { border-color: #2E7D32; background: #E8F5E9; }
.sqbc-app .tool .suggest-item.is-selected .suggest-kw { background: #2E7D32; color: #fff; }
.sqbc-app .suggest-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: #2E7D32; color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: middle;
}
.sqbc-app .suggest-title-alt { margin-top: 14px; color: #64748b; font-weight: 600; }

/* Staff-only working block */
.sqbc-app .tool-working-caption em {
  font-style: normal; margin-left: 6px; padding: 2px 7px; border-radius: 999px;
  background: #FFECB3; color: #8a5a00; font-size: 10px; font-weight: 700;
}

/* PV tool */
.sqbc-app .tool-factor-note { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; color: #64748b; margin-left: 8px; }

/* Optional inputs on the wizard energy step */
#bicity-calc .bc-extra {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--slate-200);
}
#bicity-calc .bc-extra-field { min-width: 0; }
#bicity-calc .bc-extra-label { display: block; font-size: 13px; font-weight: 600; color: var(--slate-700); margin-bottom: 6px; }
#bicity-calc .bc-extra-label span { font-weight: 400; color: var(--slate-400); font-size: 11.5px; }
#bicity-calc .bc-extra-row { display: flex; gap: 8px; }
#bicity-calc .bc-extra-input {
  flex: 1 1 auto; min-width: 0; font-family: 'DM Sans', sans-serif; font-size: 14px;
  padding: 10px 12px; background: var(--bc-white); border: 2px solid var(--slate-200); border-radius: var(--radius-xs); color: var(--slate-800);
}
#bicity-calc .bc-extra-tag {
  display: inline-flex; align-items: center; padding: 0 12px; background: var(--slate-100);
  border: 2px solid var(--slate-200); border-radius: var(--radius-xs); font-size: 12px; font-weight: 600; color: var(--slate-500);
}
#bicity-calc .bc-extra-select {
  width: 100%; font-family: 'DM Sans', sans-serif; font-size: 14px; padding: 10px 12px;
  background: var(--bc-white); border: 2px solid var(--slate-200); border-radius: var(--radius-xs); color: var(--slate-800); cursor: pointer;
}
#bicity-calc .bc-extra-input:focus, #bicity-calc .bc-extra-select:focus { border-color: var(--green-600); outline: none; }
#bicity-calc .bc-extra-help { margin: 6px 0 0; font-size: 11.5px; color: var(--slate-500); line-height: 1.45; min-height: 1.4em; }

/* Grouped appliance list */
#bicity-calc .cb-group-title {
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; color: var(--green-800);
  text-transform: none; letter-spacing: 0.01em; margin: 18px 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--green-100);
}
#bicity-calc .cb-group-title:first-child { margin-top: 0; }
#bicity-calc .checkbox-grid + .cb-group-title { margin-top: 20px; }
#bicity-calc .cb-surge {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: var(--amber-50); color: #8a5a00; font-size: 10px; font-weight: 600;
}
