/* ==========================================================================
   Components — Buttons, inputs, cards, badges, accordion, rate table
   ========================================================================== */

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background var(--ease-fast), border-color var(--ease-fast), color var(--ease-fast);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover {
  border-bottom: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--text-on-accent);
}

.btn-primary--lg {
  font-size: 18px;
  padding: 18px 40px;
  border-radius: 10px;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-on-dark {
  background: var(--accent);
  color: var(--text-on-accent);
}

.btn-on-dark:hover {
  background: var(--accent-hover);
}

.btn--full {
  width: 100%;
}

/* --- Form Inputs --- */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  height: 48px;
  width: 100%;
  padding: 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

.form-input--error {
  border-color: #EF4444;
}

.form-error {
  font-size: var(--text-small);
  color: #EF4444;
  margin-top: 4px;
}

.form-select {
  height: 48px;
  width: 100%;
  padding: 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}

.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea.form-input {
  height: auto;
  min-height: 120px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

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

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: var(--radius-pill);
  position: relative;
  transition: background var(--ease-fast);
}

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

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--ease-fast);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: var(--text-small);
  color: var(--text-secondary);
}

/* --- Cards --- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color var(--ease-normal);
}

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

.card-compact {
  padding: var(--space-6);
}

@media (max-width: 640px) {
  .card {
    padding: var(--space-6);
  }
  .card-compact {
    padding: var(--space-4);
  }
}

/* --- Badge --- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: var(--weight-medium);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  line-height: 1;
}

.badge-green {
  color: var(--green);
  background: var(--green-bg);
}

.badge-blue {
  color: var(--blue);
  background: var(--blue-bg);
}

.badge-accent {
  color: var(--accent);
  background: var(--accent-light);
}

/* --- FAQ Accordion --- */

.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border-light);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.accordion-trigger:hover {
  background: var(--surface-hover);
}

.accordion-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--ease-normal);
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--ease-normal);
}

.accordion-body {
  padding: 0 var(--space-6) var(--space-5);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Rate Table --- */

.rate-table {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.rate-table thead th {
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-5);
  text-align: left;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.rate-table tbody td {
  font-size: var(--text-body);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}

.rate-table tbody tr:last-child td {
  border-bottom: none;
}

.rate-table tbody tr:hover td {
  background: var(--surface-hover);
}

.rate-table .rate-value {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
}

.rate-table-note {
  font-size: var(--text-small);
  color: var(--text-muted);
  margin-top: var(--space-3);
}

/* --- Testimonial --- */

.testimonial {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.testimonial-quote {
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.testimonial-author {
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.testimonial-author strong {
  display: block;
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  font-size: var(--text-body);
  margin-bottom: 2px;
}

/* Dots */
.dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--ease-fast);
}

.dot.is-active {
  background: var(--accent);
}

/* --- Progress Bar (form wizard) --- */

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-10);
}

.progress-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.progress-step.is-active {
  color: var(--accent);
}

.progress-step.is-done {
  color: var(--green);
}

.progress-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.progress-step.is-active .progress-step-dot {
  background: var(--accent);
}

.progress-step.is-done .progress-step-dot {
  background: var(--green);
}

.progress-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 var(--space-3);
}

.progress-line.is-done {
  background: var(--green);
}

/* --- More Details Toggle --- */

.more-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--space-4);
}

.more-details-toggle:hover {
  color: var(--accent-hover);
}

.more-details-arrow {
  font-size: 10px;
  transition: transform 0.15s;
}

.more-details {
  margin-bottom: var(--space-4);
}

/* --- Inline CTA Box (for blog/content pages) --- */

.cta-box {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  margin: var(--space-10) 0;
}

.cta-box p {
  margin: 0 auto var(--space-4);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

/* --- Breadcrumb --- */

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.breadcrumb a {
  color: var(--text-muted);
  font-weight: var(--weight-regular);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  margin: 0 var(--space-2);
}

/* --- Stat Card (trust bar) --- */

.stat {
  text-align: center;
}

.stat-value {
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-small);
  color: var(--text-secondary);
}

/* --- Feature Card (Why Choose Us) --- */

.feature-card {
  padding: var(--space-6);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.feature-card h3 {
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.feature-card p {
  font-size: var(--text-small);
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* --- Service Card --- */

.service-card {
  display: block;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  text-decoration: none;
  color: var(--text-primary);
}

.service-card:hover {
  border-bottom: none;
}

.service-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--accent);
}

.service-card h3 {
  font-size: var(--text-body);
  margin-bottom: var(--space-2);
}

.service-card p {
  font-size: var(--text-small);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.service-card .link-arrow {
  font-size: var(--text-small);
  color: var(--accent);
  font-weight: var(--weight-medium);
}

/* --- Lane Row (popular lanes) --- */

a.lane-row,
div.lane-row,
.lane-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: var(--weight-regular);
  transition: background var(--ease-fast);
}

a.lane-row:hover,
div.lane-row:hover,
.lane-row:hover {
  background: var(--surface-hover);
  border-bottom-color: var(--border-light);
  color: var(--text-primary);
}

.lane-route {
  font-weight: var(--weight-medium);
}

.lane-distance,
.lane-transit {
  font-size: var(--text-small);
  color: var(--text-secondary);
  white-space: nowrap;
}

.lane-rate {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .lane-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
  }
  .lane-distance {
    display: none;
  }
}

/* --- Timeline (thank-you page) --- */

.timeline {
  list-style: none;
  padding: 0;
  margin: var(--space-8) 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  margin-bottom: 0;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 4px;
}

.timeline-dot.is-active {
  background: var(--accent);
}

.timeline-label {
  font-size: var(--text-small);
  color: var(--text-muted);
  min-width: 60px;
  font-weight: var(--weight-medium);
}

.timeline-text {
  font-size: var(--text-body);
  color: var(--text-primary);
}
