/* ============================================================
   ResetMate — style.css
   Workshop-style dark UI, mobile-first
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   Change colours, fonts, and radii here — nowhere else.
   ============================================================ */
:root {
  --bg:               #0f1114;
  --surface:          #181b20;
  --surface-2:        #1f2329;
  --surface-3:        #262b33;
  --border:           #2a2f38;
  --border-light:     #323840;
  --primary:          #2878e8;
  --primary-dark:     #1f66cc;
  --primary-glow:     rgba(40, 120, 232, 0.18);
  --accent:           #e8843a;
  --accent-dim:       rgba(232, 132, 58, 0.10);
  --step-badge:       #2878e8;
  --step-badge-bg:    rgba(40, 120, 232, 0.12);
  --result-header-bg: #111827;
  --text:             #e6eaf0;
  --text-muted:       #7a8494;
  --text-dim:         #4e5665;
  --font-ui:          'IBM Plex Sans', sans-serif;
  --font-mono:        'IBM Plex Mono', monospace;
  --radius:           14px;
  --radius-sm:        10px;
  --radius-xs:        6px;
}

/* ============================================================
   SEO & ACCESSIBILITY UTILITIES
   ============================================================ */

/*
  .seo-description — visible to search engine crawlers and screen
  readers but hidden from sighted users. Do not use display:none
  or visibility:hidden as those are ignored by crawlers too.
*/
.seo-description {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.header-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.header-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-content {
  flex: 1;
  padding: 20px 16px 40px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
}

/* ============================================================
   SELECTOR CARD
   ============================================================ */
.selector-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Select --- */
.select-wrapper {
  position: relative;
}

.field-select {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 15px 46px 15px 16px;
  font-family: var(--font-ui);
  font-size: 0.975rem;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.field-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Manufacturer group headings inside the vehicle dropdown */
.field-select optgroup {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
}

.field-select optgroup option {
  color: var(--text);
  font-weight: 500;
  padding-left: 8px;
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

/* --- Button --- */
.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 17px 20px;
  font-family: var(--font-ui);
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.4);
  transition: background 0.12s, transform 0.08s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 2px;
}

.btn-primary:hover {
  background: #2d84f5;
}

.btn-primary:active {
  background: var(--primary-dark);
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
}

/* ============================================================
   RESULT AREA
   ============================================================ */
.result-area {
  display: flex;
  flex-direction: column;
}

/* --- Warning card --- */
.warning-card {
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.warning-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.warning-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.warning-text strong {
  font-size: 0.95rem;
  color: var(--text);
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

/* --- Result card --- */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.result-header {
  background: var(--result-header-bg);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 16px 20px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.result-vehicle {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.result-sep {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.result-reset-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* --- Steps --- */
.steps-list {
  list-style: none;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

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

.step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: var(--step-badge-bg);
  border: 1px solid rgba(40, 120, 232, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--step-badge);
  margin-top: 2px;
  line-height: 1;
}

.step-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  text-align: center;
  padding: 18px 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 400px) {
  .main-content {
    padding: 24px 20px 48px;
    gap: 16px;
  }

  .card {
    padding: 24px 22px;
  }

  .step-text {
    font-size: 1rem;
  }
}

@media (min-width: 560px) {
  .main-content {
    padding-top: 32px;
  }
}