/* =========== 
   Clean Freaks – Test Page Styles
   =========== */

:root {
  /* Brand palette tuned to your logo */
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #5b6b7a;
  --brand: #4f6e86;    /* steel blue */
  --brand-600: #3f5a6d;/* hover */
  --accent: #9db9cb;
  --ring: rgba(79,110,134,.25);
  --border: #e5eaf0;
  --shadow: 0 10px 20px rgba(15,23,42,.05);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background: linear-gradient(180deg, #f7f9fc, #f4f7fb 180px, #f5f7fb 100%);
}

/* Header (scoped to test page) */
.cc-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  padding: 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.cc-header .cc-brand-text h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: .2px; }
.cc-header .cc-tagline { margin: 0; color: rgba(255,255,255,.85); }

/* Layout */
.cc-wrap { max-width: 1100px; margin: 24px auto 80px; padding: 0 16px; }

.cc-section { margin-top: 22px; }
.cc-section .cc-h2 { margin: 0 0 8px; font-size: 18px; font-weight: 750; color: var(--brand-600); }
.cc-section p.helper { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.cc-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

/* Grids used on the test page */
.cc-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px){
  .cc-grid-4, .cc-grid-3 { grid-template-columns: 1fr; }
}

/* Controls (scoped) */
label {
  display: block;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: #334155;
  font-weight: 600;
  letter-spacing: .2px;
}

.cc-input,
.cc-box input[type="text"],
.cc-box input[type="number"],
.cc-box select,
.cc-box textarea,
#test-customer-name,
#test-customer-email,
#test-facility-type {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  outline: none;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease, transform .05s ease;
}

.cc-box textarea { min-height: 96px; resize: vertical; }

.cc-input:focus,
.cc-box input:focus,
.cc-box select:focus,
.cc-box textarea:focus,
#test-customer-name:focus,
#test-customer-email:focus,
#test-facility-type:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

/* Buttons (scoped so we don’t fight .cc-btn in styles.css) */
.cc-btn {
  appearance: none;
  border: 1px solid var(--brand);
  color: #fff;
  background: var(--brand);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
}
.cc-btn:hover { background: var(--brand-600); box-shadow: 0 12px 22px rgba(79,110,134,.16); }
.cc-btn:active { transform: translateY(1px); }
.cc-btn.cc-btn-secondary { background: #fff; color: var(--brand); border-color: var(--brand); }

/* Muted text */
.muted { color: var(--muted); font-size: 12px; }

/* Radio/choice cards (Windows section) */
.choice { display: grid; gap: 8px; }
.choice .opt {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  display: flex; justify-content: space-between; align-items: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.choice .opt:hover { border-color: var(--accent); box-shadow: 0 6px 14px rgba(79,110,134,.08); }
.opt small { color: var(--muted); }

/* Fixture counters (if you add +/- later) */
.counter { display: inline-flex; align-items: center; gap: 8px; }
.counter button {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  font-weight: 700; color: var(--brand-600);
}
.counter button:hover { background: #f2f6fa; }
.counter input {
  width: 56px; text-align: center; padding: 6px 8px;
  border-radius: 8px; border: 1px solid var(--border);
}

/* Pricing tier color coding (mirror of styles.css so test page is consistent) */
.cc-tier--good {
  border: 2px solid #4caf50;
  background: #e8f6e9;
}
.cc-tier--better {
  border: 2px solid #2196f3;
  background: #e8f2fb;
}
.cc-tier--best {
  border: 2px solid #ff9800;
  background: #fff5e6;
}

/* Card polish */
.cc-box { border-radius: 16px; padding: 18px; box-shadow: 0 8px 20px rgba(15,23,42,.06); }

/* Inputs uniform height + nicer focus */
.cc-input,
.cc-box input[type="text"],
.cc-box input[type="number"],
.cc-box select {
  height: 44px;
  font-size: 14px;
}
.cc-input:focus,
.cc-box input:focus,
.cc-box select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }

/* Kitchen checklist as a soft panel */
.cc-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fbfe;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.cc-checklist label { display: flex; align-items: center; gap: 8px; color: #344a5f; }

/* On wide screens let the checklist span 2 columns for balance */
@media (min-width: 901px){
  .cc-grid-4 > .cc-checklist { grid-column: span 2; }
}

/* Restroom number “pills” */
.cc-box label > input[type="number"] {
  width: 84px;
  height: 36px;
  border-radius: 10px;
  margin-left: 6px;
}

/* Windows radio rows with selected highlight (no JS needed) */
.choice .opt {
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.choice .opt:hover { border-color: #bcd0de; box-shadow: 0 4px 14px rgba(26,46,69,.06); }
.choice .opt:has(input[type="radio"]:checked) {
  border-color: var(--brand);
  background: #f0f6fb;
  box-shadow: 0 0 0 3px var(--ring);
}
.choice .opt small { color: #6b87a3; }

/* Buttons – softer secondary */
.cc-btn.cc-btn-secondary { background: #eef6fb; color: #2a5b7d; border-color: #cfe2ef; }
.cc-btn.cc-btn-secondary:hover { background: #e7f1f8; }

/* Section spacing + titles */
.cc-section { margin: 28px 0; }
.cc-section .cc-h2 { font-size: 20px; color: #243647; font-weight: 800; }
.cc-fixtures { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.cc-fixtures label { display: flex; justify-content: space-between; align-items: center; }

/* Two-inline controls under the main row */
.cc-row-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* Windows: place example text on the same row */
@media (min-width: 901px){
  .cc-grid-4.windows-top-row {
    grid-template-columns: 1fr 1fr 1fr; /* name | sqft | example */
    align-items: center;
    gap: 16px;
  }
}


/* Keep selects from stretching full width when alone */
.cc-row-controls .cc-input { width: 100%; }

/* Kitchen checklist spans two columns on wide screens */
@media (min-width: 901px){
  .cc-grid-4 > .cc-checklist { grid-column: span 2; }
}

/* Restroom fixtures in one row */
.cc-fixtures { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.cc-fixtures label { display: flex; justify-content: space-between; align-items: center; }

/* Restroom fixtures: span 2 cols and lay out pairs cleanly */
.cc-grid-4 > .cc-fixtures { grid-column: span 2; }

.cc-fixtures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cc-fixtures label {
  display: grid;
  grid-template-columns: auto 84px; /* text | number */
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cc-fixtures input[type="number"] {
  width: 100%;
  height: 36px;
  border-radius: 10px;
}

/* Restroom fixtures take 2 columns in the 4-col grid */
.cc-grid-4 > .cc-fixtures { grid-column: span 2; }

/* Lay out each pair: text | number */
.cc-fixtures label {
  display: grid;
  grid-template-columns: 1fr 84px;   /* text grows, input fixed */
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* Make sure global “pill” style doesn’t push inputs */
.cc-fixtures input[type="number"] {
  height: 36px;
  border-radius: 10px;
  margin-left: 0;       /* override the global label > input margin */
  min-width: 0;
}

/* Optional: keep the text from overflowing */
.cc-fixtures label span { overflow: hidden; text-overflow: ellipsis; }

/* Stack nicely on small screens */
@media (max-width: 900px) {
  .cc-grid-4 > .cc-fixtures { grid-column: span 1; }
  .cc-fixtures { grid-template-columns: repeat(3, 1fr); }
}

/* Group boxes */
.cc-group {
  background: #fbfdff;
  border: 1px solid #e6edf3;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
}
.cc-group-title {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #23384a;
}
.cc-group-help {
  margin: 0 0 10px;
  font-size: 12px;
  color: #6b87a3;
}

/* Radio card list (already present, enhanced) */
.choice { display: grid; gap: 10px; }
.choice .opt {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  display: flex; justify-content: space-between; align-items: center;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.choice .opt:hover { border-color: #bcd0de; box-shadow: 0 4px 14px rgba(26,46,69,.06); }
.choice .opt:has(input[type="radio"]:checked) {
  border-color: var(--brand);
  background: #f0f6fb;
  box-shadow: 0 0 0 3px var(--ring);
}
.choice .opt small { color: #7c94ab; }

/* Visual separator before frequency */
.cc-divider {
  height: 1px;
  background: #e8eef5;
  margin: 14px 0;
  border-radius: 1px;
}

/* Compact frequency row */
.cc-row-controls--single {
  display: grid;
  grid-template-columns: minmax(220px, 320px);
  gap: 12px;
}
.cc-row-controls--single .cc-input { width: 100%; }

/* Card header */
.cc-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 10px;
}
.cc-box-title {
  font-size: 14px;
  font-weight: 700;
  color: #2a4053;
}
.cc-card-actions { display: flex; gap: 8px; }
.cc-chip-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d7e3ee;
  background: #f7fbff;
  color: #2a5b7d;
  font-weight: 600;
  cursor: pointer;
}
.cc-chip-btn:hover { background: #eef6fb; }

/* Grouped section styling (used in Windows / Glass) */
.cc-group{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#f9fbfe;
  margin-top:12px;
}
.cc-group--blue{ background:#f3f8fc; }   /* Glass Height */
.cc-group--mint{ background:#f6fbf8; }   /* Glass Location */

.cc-group-head{ margin-bottom:8px; }
.cc-group-title{
  margin:0;
  font-size:13.5px;
  font-weight:700;
  color:#2a4053;
}
.cc-group-help{
  margin:2px 0 0;
  font-size:12px;
  color:#6b87a3;
}

/* Add-Ons panel */
.addons-panel{background:#f4e9ff;border:1px solid #ead9ff;border-radius:14px;padding:16px;margin:16px 0}
.addons-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.addons-head h3{margin:0;font-size:16px;color:#5a2dbf}
.addons-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cc-addon{display:flex;gap:10px;align-items:center;background:#fff;border:1px solid #ece8f8;border-radius:12px;padding:12px;cursor:pointer;transition:box-shadow .15s,border-color .15s}
.cc-addon:hover{border-color:#d9ccff;box-shadow:0 2px 10px rgba(67,26,167,.08)}
.cc-addon input[type="checkbox"]{width:18px;height:18px;flex:0 0 auto}
.cc-addon > div{display:flex;flex-direction:column;gap:2px}
.cc-addon .name{font-weight:600}
.cc-addon .meta{font-size:12px;color:#6b6f77}
.addons-tip{margin:12px 2px 0;font-size:12px;color:#6b6f77}
.cc-btn.cc-btn--secondary{background:#fff;color:#5a2dbf;border:1px solid #cdbbff;border-radius:10px;padding:8px 12px;font-size:13px}
.cc-btn.cc-btn--secondary:hover{background:#f7f3ff}


/* Keep the choice rows tight inside groups */
.cc-group .choice{ display:grid; gap:8px; }


/* On narrow screens, let fixtures collapse nicely */
@media (max-width: 900px) {
  .cc-grid-4 > .cc-fixtures { grid-column: span 1; }
  .cc-fixtures { grid-template-columns: 1fr 1fr 1fr; }
}


/* Footer */
.cc-footer{display:flex;gap:8px;align-items:center;justify-content:center;color:var(--muted);font-size:13px;margin:24px 0}

/* ---- Legacy selectors kept for safety if older markup remains ---- */
.wrap { max-width: 1100px; margin: 24px auto 80px; padding: 0 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.section { margin-top: 22px; }
.section h2 { margin: 0 0 4px; font-size: 18px; font-weight: 750; color: var(--brand-600); }
.section p.helper { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.top-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
