/*
 * profit-calculator.css — Furniture flipping profit calculator
 *
 * Follows the depreciation calculator pattern.
 * All values use CSS custom properties from ash-tokens.css — no hardcoded hex.
 */

/* ── Shared tool shell ───────────────────────────────────────────────────── */

.ash-tool {
  background: var(--card, #faf9f5);
  border: 1px solid var(--border, #dad9d4);
  border-radius: var(--radius-md, 10px);
  padding: 32px 28px 28px;
  margin: 36px 0;
}

.ash-tool__heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--foreground, #3d3929);
  margin: 0 0 8px;
}

.ash-tool__lead {
  color: var(--muted-foreground, #7a7568);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ── Profit calculator ───────────────────────────────────────────────────── */

.ash-profit-calc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 599px) {
  .ash-profit-calc__grid {
    grid-template-columns: 1fr;
  }
}

.ash-profit-calc__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ash-profit-calc__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground, #3d3929);
}

.ash-profit-calc__help {
  font-size: 0.8125rem;
  color: var(--muted-foreground, #7a7568);
  margin: 0 0 6px;
  line-height: 1.45;
}

.ash-profit-calc__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #dad9d4);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.9375rem;
  color: var(--foreground, #3d3929);
  background: var(--background, #faf9f5);
  font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
  box-sizing: border-box;
}

.ash-profit-calc__input:focus {
  outline: none;
  border-color: var(--ash-ring, #c96442);
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.15);
}

.ash-profit-calc__input::placeholder {
  color: var(--muted-foreground, #7a7568);
}

/* ── Button ──────────────────────────────────────────────────────────────── */

.ash-profit-calc__btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--ash-ring, #c96442);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 10px);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  margin-top: 8px;
}

.ash-profit-calc__btn:hover {
  background: var(--chart-1, #b05730);
}

.ash-profit-calc__btn--secondary {
  background: var(--foreground, #3d3929);
}

.ash-profit-calc__btn--secondary:hover {
  background: var(--ash-near-black, #141413);
}

/* ── Result panel ────────────────────────────────────────────────────────── */

.ash-profit-calc__result {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border, #dad9d4);
}

.ash-profit-calc__result[hidden] { display: none; }

.ash-profit-calc__result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 599px) {
  .ash-profit-calc__result-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ash-profit-calc__stat {
  background: var(--muted, #ede9de);
  border-radius: var(--radius-sm, 6px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ash-profit-calc__stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground, #7a7568);
}

.ash-profit-calc__stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--foreground, #3d3929);
  line-height: 1.2;
}

.ash-profit-calc__stat-value.is-positive { color: var(--ash-success, #1f6f43); }
.ash-profit-calc__stat-value.is-negative { color: var(--ash-danger, #b42318); }

.ash-profit-calc__verdict {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--foreground, #3d3929);
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border, #dad9d4);
}

.ash-profit-calc__result-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ash-profit-calc__reset {
  background: none;
  border: none;
  font-size: 0.875rem;
  color: var(--muted-foreground, #7a7568);
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  padding: 0;
}

.ash-profit-calc__reset:hover {
  color: var(--foreground, #3d3929);
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ash-profit-calc__input,
  .ash-profit-calc__btn { transition: none; }
}
