/**
 * Renotect Service Portal — Stylesheet
 * Brand variables per confirmed Renotect Brand Guidelines & Color System.
 * Muted colors (cream, gray) for large areas; vivid colors (blue, orange)
 * reserved for accents and CTAs, per brand direction.
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --brand-blue:    #00AEEF;
  --blue-dark:     #0088BD;
  --blue-light:    #33BFEF;
  --brand-orange:  #F8AC54;
  --orange-dark:   #E69633;
  --orange-light:  #FBC176;
  --brand-cream:   #F7F2E0;
  --cream-dark:    #EDE7CF;
  --brand-gray:    #555555;
  --gray-dark:     #333333;
  --gray-medium:   #777777;
  --gray-light:    #E8E8E8;
  --white:         #FFFFFF;
  --error:         #E69633;
  --radius:        6px;
  --shadow:        0 2px 16px rgba(0,0,0,0.10);
}

#renotect-portal-root, #renotect-portal-root * {
  box-sizing: border-box;
}

#renotect-portal-root {
  font-family: 'Work Sans', sans-serif;
  color: var(--gray-dark);
}

#renotect-portal-root h1,
#renotect-portal-root h2,
#renotect-portal-root h3,
#renotect-portal-root h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--brand-gray);
}

/* ── Launch button ─────────────────────────────────────────── */

.rn-launch-btn {
  display: inline-block;
  background: var(--brand-orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 18px 36px;
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.rn-launch-btn:hover { background: var(--orange-light); }

/* ── Modal shell ────────────────────────────────────────────── */

.rn-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(51,51,51,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.rn-modal {
  background: var(--brand-cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.rn-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--brand-gray);
  cursor: pointer;
  z-index: 2;
}
.rn-close:hover { color: var(--orange-dark); }

.rn-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.96);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.rn-confirm-box {
  padding: 2rem;
  text-align: center;
  max-width: 320px;
}
.rn-confirm-msg {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}
.rn-confirm-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.terms-accept-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--brand-gray);
  line-height: 1.5;
  cursor: pointer;
}
.terms-accept-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.terms-accept-row a {
  color: var(--brand-blue);
  text-decoration: underline;
}

.progress-bar {
  height: 4px;
  background: var(--gray-light);
  width: 100%;
}
.progress-fill {
  height: 100%;
  background: var(--brand-orange);
  transition: width 0.3s ease;
}

.rn-modal-body {
  padding: 2rem 1.75rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.rn-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--cream-dark);
}
.rn-modal-footer.single { justify-content: flex-start; }

/* ── Typography helpers ────────────────────────────────────── */

.step-title { font-size: 1.6rem; margin-bottom: 0.4rem; }
.step-desc  { font-family: 'Work Sans', sans-serif; color: var(--gray-medium); margin-bottom: 1.25rem; font-size: 0.95rem; }
.section-divider {
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-gray);
  margin: 1.25rem 0 0.6rem;
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn-primary {
  background: var(--brand-orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--orange-light); }
.btn-primary.btn-disabled,
.btn-primary:disabled {
  background: var(--gray-light);
  color: var(--gray-medium);
  cursor: not-allowed;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--brand-gray);
  color: var(--brand-gray);
  border-radius: var(--radius);
  padding: 14px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { border-color: var(--brand-orange); color: var(--orange-dark); }
.btn-remove {
  background: transparent;
  border: none;
  color: var(--orange-dark);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}
.btn-add-scope {
  background: var(--white);
  border: 1px dashed var(--gray-medium);
  border-radius: var(--radius);
  padding: 12px 20px;
  width: 100%;
  font-weight: 600;
  color: var(--brand-gray);
  cursor: pointer;
  margin-top: 0.5rem;
}
.btn-add-scope:hover { border-color: var(--brand-orange); color: var(--orange-dark); }

.cta-group { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }

/* ── Path selector ──────────────────────────────────────────── */

.path-grid { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.path-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.path-card:hover { border-color: var(--brand-blue); box-shadow: var(--shadow); }
.path-icon { font-size: 1.75rem; margin-bottom: 0.4rem; }
.path-card h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.path-card p { font-size: 0.88rem; color: var(--gray-medium); font-family: 'Work Sans', sans-serif; }

/* ── Callouts ───────────────────────────────────────────────── */

.callout {
  background: var(--cream-dark);
  border-left: 3px solid var(--brand-orange);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
  margin-bottom: 1rem;
}
.callout.blue { border-left-color: var(--brand-blue); background: rgba(0,174,239,0.08); }
.callout.green { border-left-color: #5a9c63; background: rgba(90,156,99,0.08); }

.mismatch-box {
  background: rgba(230,150,51,0.12);
  border: 1px solid var(--orange-dark);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.mismatch-box p { font-weight: 600; margin-bottom: 0.25rem; color: var(--orange-dark); }

/* ── Urgency buttons ────────────────────────────────────────── */

.urgency-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.urgency-btn {
  background: var(--white);
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 0.9rem;
  text-align: left;
  cursor: pointer;
}
.urgency-btn.active { border-color: var(--brand-orange); background: rgba(248,172,84,0.08); }
.urgency-btn.muted { opacity: 0.6; }
.ub-title { font-weight: 600; margin-bottom: 0.2rem; }
.ub-desc { font-size: 0.78rem; color: var(--gray-medium); }

/* ── Checklist / services ──────────────────────────────────── */

.check-list { display: grid; gap: 0.6rem; }
.check-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
}
.check-item.checked { border-color: var(--brand-blue); background: rgba(0,174,239,0.06); }
.check-item input { width: 18px; height: 18px; accent-color: var(--brand-blue); }
.cib h4 { font-size: 0.92rem; font-family: 'Work Sans', sans-serif; font-weight: 600; color: var(--gray-dark); }

/* ── Pills ──────────────────────────────────────────────────── */

.pill-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--brand-gray);
}
.pill.active { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--white); }

/* ── Form fields ────────────────────────────────────────────── */

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-row.full { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-gray);
}
.field input,
.field select,
.field textarea {
  background: var(--white);
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.92rem;
  color: var(--gray-dark);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
}
.field textarea { min-height: 70px; resize: vertical; }

.cb-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; margin-bottom: 0.75rem; cursor: pointer; }

/* ── Choice cards ───────────────────────────────────────────── */

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.choice-grid.single { grid-template-columns: 1fr; }
.choice-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.choice-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 0.85rem;
  cursor: pointer;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.choice-card.selected { border-color: var(--brand-orange); background: rgba(248,172,84,0.08); }
.choice-card .ci { font-size: 1.3rem; }
.choice-card h4 { font-size: 0.9rem; font-family: 'Work Sans', sans-serif; font-weight: 600; color: var(--gray-dark); }
.choice-card p { font-size: 0.78rem; color: var(--gray-medium); }

/* ── File inputs ────────────────────────────────────────────── */

.file-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.file-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 1px dashed var(--gray-medium);
  border-radius: var(--radius);
  padding: 0.85rem;
  cursor: pointer;
  position: relative;
}
.file-input-wrap input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-input-wrap.camera-btn {
  border-style: solid;
  border-color: var(--brand-blue);
  background: rgba(0,174,239,0.06);
}
.file-input-wrap.camera-btn .fi-label { color: var(--blue-dark); font-weight: 600; }
.fi-icon { font-size: 1.3rem; }
.fi-label { font-size: 0.85rem; color: var(--brand-gray); flex: 1; }
.fi-done { font-size: 0.78rem; color: var(--blue-dark); font-weight: 600; }

/* ── Time slots ─────────────────────────────────────────────── */

.time-slots { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.time-slot {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--brand-gray);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.time-slot.selected { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--white); }
.time-slot.selected .ts-rate { color: rgba(255,255,255,0.85); }
.time-slot-rated { border-color: var(--cream-dark); }
.ts-label { font-weight: 500; }
.ts-rate { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; }
.ts-rate-priority { color: var(--brand-orange); }
.ts-rate-urgent { color: #c0392b; }

/* ── Scope entries (project path) ──────────────────────────── */

.scope-entry {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.scope-entry-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.scope-entry-header h4 { font-size: 1rem; }

/* ── Review / quote card ───────────────────────────────────── */

.quote-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}
.quote-header {
  background: var(--brand-blue);
  color: var(--white);
  padding: 0.9rem 1.1rem;
}
.quote-header h3 { color: var(--white); font-size: 1.1rem; }
.quote-rows { padding: 0.5rem 1.1rem 0.9rem; }
.quote-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.86rem;
}
.quote-row:last-child { border-bottom: none; }
.ql { color: var(--gray-medium); font-weight: 600; flex-shrink: 0; }
.qv { color: var(--gray-dark); text-align: right; }
.tag {
  display: inline-block;
  background: var(--cream-dark);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  margin: 0.1rem;
}

/* ── Result screens ─────────────────────────────────────────── */

.result-wrap { text-align: center; padding: 1rem 0; }
.result-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.result-wrap h2 { margin-bottom: 0.6rem; }
.result-wrap p { color: var(--gray-medium); font-family: 'Work Sans', sans-serif; margin-bottom: 1rem; }
.conf-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--blue-dark);
  margin-bottom: 1rem;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (min-width: 560px) {
  .path-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .choice-grid, .choice-grid.three { grid-template-columns: 1fr; }
  .urgency-row { grid-template-columns: 1fr; }
}
