/* ── Fuel Cost Calculator page styles ── */

.fcc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.fcc-card + .fcc-card {
  margin-top: var(--space-5);
}
.fcc-error[hidden],
.fcc-result[hidden],
.fcc-hint[hidden],
.fcc-copy[hidden] {
  display: none;
}

.fcc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 520px;
}
.fcc-field + .fcc-field,
.fcc-check + .fcc-field {
  margin-top: var(--space-4);
}
.fcc-field label {
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-2);
}
/* Number on the left, its unit on the right */
.fcc-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-2);
}
#fcc-tool .fcc-field input,
#fcc-tool .fcc-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 16px;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
#fcc-tool .fcc-field input {
  font-family: var(--mono);
}
#fcc-tool .fcc-field input:focus-visible,
#fcc-tool .fcc-field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
#fcc-tool .fcc-field input[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.6);
}
#fcc-tool .fcc-people input {
  max-width: 120px;
}

.fcc-hint {
  display: block;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-3);
}
/* Holds one line so the fields below do not move when the conversions appear */
.fcc-equiv {
  min-height: 1.45em;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.fcc-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-top: var(--space-3);
  color: var(--text);
  cursor: pointer;
}
.fcc-check input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--accent);
}

.fcc-error {
  margin: var(--space-4) 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
  font-size: 13px;
}
.fcc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.fcc-h2 {
  margin: 0 0 var(--space-3);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}
.fcc-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin: 0;
}
.fcc-result {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.fcc-result dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.fcc-result dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.fcc-result-main dd {
  font-size: 24px;
  color: var(--accent);
}
#fcc-empty-price {
  margin-top: var(--space-3);
}
.fcc-copy {
  margin-top: var(--space-4);
}
.fcc-copy.is-copied {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 480px) {
  /* The conversions wrap onto two lines on a phone */
  .fcc-equiv {
    min-height: 2.9em;
  }
  .fcc-card {
    padding: var(--space-4);
  }
  #fcc-tool .fcc-field input,
  #fcc-tool .fcc-field select {
    padding: 8px 6px;
  }
}
