/* ========================================
   Deeded Cost Estimator — Styles
   Brand: Deeded Style Guide
   ======================================== */

:root {
  /* Primary (Coral/Salmon Pink) */
  --primary-700: #C15B50;
  --primary-600: #F0686A;
  --primary-500: #F4797B;
  --primary-400: #FCABAA;
  --primary-300: #FFD4D1;
  --primary-200: #FFE2E0;
  --primary-100: #FFF1F0;
  --primary-50: #FFF7F7;

  /* Neutrals */
  --black: #0D0D0D;
  --white: #FFFCFC;
  --neutral-700: #363636;
  --neutral-600: #616060;
  --neutral-500: #8A8D8E;
  --neutral-400: #A9ADAE;
  --neutral-300: #D2D4D3;

  /* Auxiliary */
  --aux-700: #80175A;
  --aux-600: #D2377D;
  --aux-50: #FBEFFF;

  /* Semantic aliases */
  --color-accent: var(--primary-500);
  --color-accent-hover: var(--primary-600);
  --color-accent-dark: var(--primary-700);
  --color-accent-light: var(--primary-100);
  --color-accent-bg: var(--primary-50);
  --color-bg: var(--primary-50);
  --color-white: var(--white);
  --color-text: var(--neutral-700);
  --color-text-dark: var(--black);
  --color-text-light: var(--neutral-500);
  --color-text-muted: var(--neutral-400);
  --color-border: var(--neutral-300);
  --color-border-light: #E8E9E8;
  --color-error: #D93025;
  --color-success: var(--primary-700);

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(13, 13, 13, 0.06);
  --shadow-lg: 0 4px 24px rgba(13, 13, 13, 0.10);
  --transition: 0.25s ease;
  --max-width: 720px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Satoshi", Arial, Helvetica, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px;
}

/* ----------------------------------------
   Header
   ---------------------------------------- */
.header {
  text-align: center;
  margin-bottom: 36px;
}

.logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-dark);
  letter-spacing: -0.5px;
}

.logo-accent {
  color: var(--color-accent);
}

.tagline {
  font-size: 15px;
  color: var(--color-text-light);
  margin-top: 4px;
  font-weight: 400;
}

/* ----------------------------------------
   Progress Bar
   ---------------------------------------- */
.progress-bar {
  margin-bottom: 40px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  position: relative;
}

/* Connecting line */
.progress-steps::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 32px;
  right: 32px;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-light);
  transition: all var(--transition);
}

.step-label {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 6px;
  text-align: center;
  font-weight: 500;
  transition: color var(--transition);
}

/* Active step */
.progress-step.active .step-circle {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 0 0 4px var(--primary-200);
}

.progress-step.active .step-label {
  color: var(--color-accent-dark);
  font-weight: 600;
}

/* Completed step */
.progress-step.completed .step-circle {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
}

.progress-step.completed .step-circle::after {
  content: "\2713";
  font-size: 16px;
}

.progress-step.completed .step-circle {
  font-size: 0;
}

.progress-step.completed .step-label {
  color: var(--color-accent-dark);
}

/* ----------------------------------------
   Wizard Steps
   ---------------------------------------- */
.wizard {
  position: relative;
}

.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 28px;
  text-align: center;
  color: var(--color-text-dark);
}

/* ----------------------------------------
   Cards (Province / Transaction selection)
   ---------------------------------------- */
.card-grid {
  display: grid;
  gap: 16px;
}

.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: var(--color-white);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  text-align: center;
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  background: var(--primary-50);
}

.card:active {
  transform: translateY(0);
  background: var(--primary-100);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-dark);
}

.card-sub {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* ----------------------------------------
   Form Inputs
   ---------------------------------------- */
.form-group {
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-dark);
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--primary-200);
}

.input-prefix {
  padding: 12px 0 12px 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-light);
  user-select: none;
}

.input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px 12px 8px;
  font-size: 18px;
  font-family: inherit;
  color: var(--color-text-dark);
  background: transparent;
}

.input-wrapper input::placeholder {
  color: var(--color-text-muted);
}

.input-hint {
  display: block;
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 6px;
}

.input-error {
  display: block;
  font-size: 12px;
  color: var(--color-error);
  margin-top: 4px;
  min-height: 16px;
}

.input-wrapper.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12);
}

/* ----------------------------------------
   Add-ons
   ---------------------------------------- */
.addons-list {
  max-width: 480px;
  margin: 0 auto;
}

.addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--color-white);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  transition: all var(--transition);
}

.addon-item:hover {
  border-color: var(--primary-400);
}

.addon-item.active {
  border-color: var(--color-accent);
  background: var(--primary-50);
}

.addon-info {
  flex: 1;
}

.addon-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-dark);
}

.addon-price {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 2px;
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin-left: 16px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-border);
  border-radius: 26px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--color-white);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle input:checked + .toggle-slider {
  background: var(--color-accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Express radio options */
.express-options {
  display: none;
  margin-top: 12px;
  padding-left: 0;
}

.express-options.visible {
  display: block;
}

.express-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.express-option:hover {
  border-color: var(--color-accent);
}

.express-option input[type="radio"] {
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
}

.express-option label {
  font-size: 14px;
  cursor: pointer;
  flex: 1;
}

.express-option .express-fee {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent-dark);
}

/* Stepper (debt payout) */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
}

.stepper button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all var(--transition);
}

.stepper button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--primary-50);
}

.stepper-value {
  font-size: 18px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.addons-empty {
  text-align: center;
  color: var(--color-text-light);
  font-size: 15px;
  padding: 24px 0;
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-back {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-light);
}

.btn-back:hover {
  border-color: var(--neutral-600);
  color: var(--color-text-dark);
}

.btn-next, .btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-next:hover, .btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-next:active, .btn-primary:active {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn-secondary {
  background: var(--color-white);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--primary-50);
  color: var(--color-accent-hover);
}

/* ----------------------------------------
   Results
   ---------------------------------------- */
.results-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--color-border-light);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-light);
  padding: 8px 12px 12px;
  text-align: right;
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
}

.results-table th.results-label-col {
  text-align: left;
}

.results-table td {
  padding: 12px;
  font-size: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.results-table td:first-child {
  font-weight: 500;
  color: var(--color-text);
}

.results-table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dark);
}

.results-table tfoot td {
  font-weight: 700;
  font-size: 18px;
  border-bottom: none;
  border-top: 2px solid var(--color-text-dark);
  padding-top: 16px;
  color: var(--color-text-dark);
}

.results-table .row-subtotal td {
  font-weight: 600;
  border-bottom: 1px solid var(--neutral-600);
}

.results-table .row-tax td {
  color: var(--color-text-light);
  font-size: 14px;
}

.row-sublabel {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--neutral-500);
  margin-top: 2px;
  line-height: 1.3;
}

.addon-details {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.addon-details h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-light);
  margin-bottom: 8px;
  font-weight: 600;
}

.addon-details ul {
  list-style: none;
}

.addon-details li {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  color: var(--color-text);
}

.results-notes {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.results-notes p {
  font-size: 13px;
  color: var(--color-text-light);
  padding: 4px 0;
  line-height: 1.5;
}

/* ----------------------------------------
   Footer
   ---------------------------------------- */
.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

.footer-disclaimer {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
  max-width: 560px;
  margin: 0 auto;
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */
@media (max-width: 640px) {
  .container {
    padding: 20px 14px;
  }

  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px 16px;
  }

  .step h2 {
    font-size: 20px;
  }

  .progress-steps::before {
    left: 20px;
    right: 20px;
  }

  .step-label {
    font-size: 10px;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .results-card {
    padding: 16px 12px;
  }

  .results-table td,
  .results-table th {
    padding: 8px 6px;
    font-size: 13px;
  }

  .results-table tfoot td {
    font-size: 16px;
  }
}

/* ----------------------------------------
   Print-only elements (hidden on screen)
   ---------------------------------------- */
.print-header,
.print-footer,
.print-value-prop {
  display: none;
}

/* ----------------------------------------
   Print
   ---------------------------------------- */
@media print {
  @page {
    margin: 12mm 14mm;
    size: letter;
  }

  .nav-buttons,
  .progress-bar,
  .footer,
  .header,
  .step[data-step="5"] > h2 {
    display: none !important;
  }

  .step { display: none !important; }
  .step[data-step="5"] { display: block !important; }

  body {
    background: white;
    font-size: 14px;
    line-height: 1.4;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .container {
    padding: 0;
    max-width: 100%;
  }

  /* ---- Header ---- */
  .print-header {
    display: block !important;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0D0D0D;
  }

  .print-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .print-title {
    font-size: 22px;
    font-weight: 700;
    color: #0D0D0D;
    margin: 0;
    line-height: 1.2;
  }

  .print-header-left .print-date {
    font-size: 12px;
    color: #8A8D8E;
    margin-top: 2px;
  }

  .print-header-right {
    text-align: right;
    font-size: 12px;
    color: #363636;
    line-height: 1.4;
  }

  .print-logo {
    display: block;
    width: 120px;
    height: auto;
    margin-left: auto;
    margin-bottom: 4px;
  }

  .print-header-right span { display: block; }

  /* ---- Results card ---- */
  .results-card {
    box-shadow: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 0;
  }

  .results-table td {
    padding: 6px 10px;
    font-size: 13px;
  }

  .results-table th {
    padding: 4px 10px 6px;
    font-size: 10px;
  }

  .results-table tfoot td {
    font-size: 15px;
    padding-top: 8px;
  }

  .results-table .row-subtotal td { font-size: 13px; }
  .results-table .row-tax td { font-size: 12px; }

  .row-sublabel { font-size: 10px; }

  .results-notes {
    margin-top: 8px;
    padding-top: 6px;
  }

  .results-notes p {
    font-size: 11px;
    padding: 1px 0;
    line-height: 1.3;
  }

  .addon-details {
    margin-top: 8px;
    padding-top: 6px;
  }

  .addon-details h4 {
    font-size: 10px;
    margin-bottom: 3px;
  }

  .addon-details li {
    font-size: 12px;
    padding: 1px 0;
  }

  /* ---- Value prop — single row ---- */
  .print-value-prop {
    display: block !important;
    margin-top: 12px;
    padding: 10px 16px;
    border: 1px solid #D2D4D3;
    border-radius: 6px;
    background: #f9f9f9;
  }

  .print-value-prop h3 {
    font-size: 13px;
    font-weight: 700;
    color: #0D0D0D;
    margin: 0 0 2px;
    text-align: center;
  }

  .print-vp-tagline {
    font-size: 11px;
    color: #8A8D8E;
    text-align: center;
    margin-bottom: 8px;
    font-style: italic;
  }

  .print-vp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0 16px;
  }

  .print-vp-item strong {
    display: block;
    font-size: 11px;
    color: #0D0D0D;
    margin-bottom: 1px;
  }

  .print-vp-item span {
    font-size: 10px;
    color: #8A8D8E;
    line-height: 1.3;
  }

  /* ---- Footer ---- */
  .print-footer {
    display: block !important;
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
  }

  .print-footer .print-validity {
    font-style: italic;
    color: #8A8D8E;
  }

  .print-footer .print-disclaimer {
    margin-top: 6px;
    font-size: 11px;
    color: #363636;
    font-style: normal;
    line-height: 1.4;
  }
}
