/* regulation-checker.css — Regulation Checker tool styles */

/* ── Step Indicator ──────────────────────────────────── */
.reg-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.reg-steps__dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  border: 2px solid var(--color-border);
  color: var(--color-text-light);
  background: var(--color-white);
  transition: all 0.25s ease;
}

.reg-steps__dot.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
}

.reg-steps__dot.is-complete {
  border-color: var(--color-primary);
  background: var(--green-100);
  color: var(--color-primary);
}

.reg-steps__line {
  width: 48px;
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  transition: background 0.25s ease;
}

.reg-steps__line.is-active {
  background: var(--color-primary);
}

.reg-steps__label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  text-align: center;
  margin-top: var(--space-xs);
}

/* ── Radio Grid Layout ──────────────────────────────── */
.reg-radio-grid {
  display: grid;
  gap: var(--space-sm);
  max-width: 400px;
  margin-inline: auto;
}

.reg-radio-grid--1col { grid-template-columns: 1fr; }
.reg-radio-grid--2col { grid-template-columns: 1fr 1fr; }
.reg-radio-grid--4col { grid-template-columns: repeat(4, 1fr); }
.reg-radio-grid--span-full { grid-column: 1 / -1; }

/* ── Scroll Offset for Sticky Header ───────────────── */
#reg-results,
#reg-form-section,
#reg-form {
  scroll-margin-top: 80px;
}

/* ── Fieldset Reset (for accessible radio groups) ──── */
.reg-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.reg-fieldset__legend {
  font-size: var(--text-lg);
  font-weight: 700;
  text-align: center;
  width: 100%;
  margin-bottom: var(--space-md);
}

/* ── Validation Feedback ───────────────────────────── */
.radio-card.is-unanswered {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.reg-validation-msg {
  text-align: center;
  color: #dc2626;
  font-size: var(--text-sm);
  margin-top: var(--space-md);
}

/* ── Municipality Select ─────────────────────────────── */
.reg-select-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.reg-select-wrap select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  font-family: var(--font-body);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.reg-select-wrap select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-color: var(--color-primary);
}

.reg-select-wrap select optgroup {
  font-weight: 600;
  font-style: normal;
  color: var(--color-text);
}

.reg-select-wrap select option {
  font-weight: 400;
  padding: var(--space-xs);
}

/* ── Checklist Output ────────────────────────────────── */
.reg-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reg-checklist__category {
  margin-bottom: calc(var(--space-xl) * 1.5);
}

.reg-checklist__category-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.reg-checklist__category-icon {
  font-size: var(--text-xl);
  line-height: 1;
}

.reg-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 2px solid var(--color-border);
  margin-bottom: var(--space-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reg-checklist__item:hover {
  border-color: var(--green-500, #5d7652);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.reg-checklist__checkbox {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  /* Expand tap area to 44px without changing visual size */
  padding: 11px;
  margin: -11px;
  margin-right: 0;
}

.reg-checklist__checkbox.is-checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.reg-checklist__checkbox.is-checked::after {
  content: "";
  display: block;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.reg-checklist__content {
  flex: 1;
  min-width: 0;
}

.reg-checklist__item-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.reg-checklist__item-detail {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

.reg-checklist__item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
}

.reg-checklist__fee {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-text);
}

.reg-checklist__source {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--text-xs);
}

.reg-checklist__source:hover {
  text-decoration: underline;
}

/* Status badges */
.reg-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.reg-badge--required {
  background: var(--green-100);
  color: var(--green-900, #3a4a33);
}

.reg-badge--conditional {
  background: var(--gold-100);
  color: var(--gold-700, #7a5c1a);
}

.reg-badge--recommended {
  background: #e8f4fd;
  color: #1565c0;
}

.reg-badge--info {
  background: var(--gray-100, #f5f5f5);
  color: var(--gray-700, #374151);
}

/* ── Warning Cards ───────────────────────────────────── */
.reg-warning {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.reg-warning__icon {
  flex-shrink: 0;
  font-size: var(--text-lg);
  line-height: 1;
}

.reg-warning--critical {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.reg-warning--warning {
  background: var(--gold-100);
  border: 1px solid var(--gold-400, #f5ca7a);
  color: #92400e;
}

.reg-warning--info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

/* ── Summary Card ────────────────────────────────────── */
.reg-summary {
  background: var(--green-100);
  border: 2px solid var(--green-300);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.reg-summary__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.reg-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
}

.reg-summary__stat {
  text-align: center;
}

.reg-summary__stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-primary);
}

.reg-summary__stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: 2px;
}

/* ── Actions Bar ─────────────────────────────────────── */
.reg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* ── Contact Info ────────────────────────────────────── */
.reg-contacts {
  background: var(--gray-50, #fafafa);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: var(--text-sm);
  margin-top: var(--space-lg);
}

.reg-contacts__title {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.reg-contacts p {
  margin: 0;
  color: var(--color-text-light);
}

/* ── Print Styles ────────────────────────────────────── */
@media print {
  .header, .footer, .mobile-menu, .floating-phone,
  .chatbot, .cookie-consent, .skip-link,
  #reg-form-section, .reg-actions, #reg-capture,
  .reg-steps, .form__nav, .faq-item,
  .section--cta, .hero {
    display: none !important;
  }

  #reg-results {
    display: block !important;
  }

  .reg-checklist__item {
    break-inside: avoid;
    border: 1px solid #ccc;
  }

  .reg-warning {
    break-inside: avoid;
  }

  body::before {
    content: "Casa Scotia — STR Regulation Checklist";
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
  }

  body::after {
    content: "casascotia.com | (902) 707-0329 | info@casascotia.com";
    display: block;
    margin-top: 32px;
    font-size: 12px;
    color: #666;
  }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
  .reg-steps__dot {
    width: 30px;
    height: 30px;
    font-size: var(--text-xs);
  }

  .reg-steps__line {
    width: 24px;
  }

  .reg-radio-grid--4col {
    grid-template-columns: repeat(2, 1fr);
  }

  .reg-checklist__item {
    padding: var(--space-md);
  }

  .reg-checklist__item-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .reg-summary__grid {
    grid-template-columns: 1fr 1fr;
  }

  .reg-actions {
    flex-direction: column;
  }

  .reg-actions .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .reg-radio-grid--2col {
    grid-template-columns: 1fr;
  }

  .reg-radio-grid--span-full {
    grid-column: auto;
  }
}
