/*
 * Scoped reset so hostile theme CSS can't break the widget — see docs/PLAN.md §5.2.
 * Real component styles land in Phase 2 (rich UI features). Budget: <= 10 KB gzipped
 * for the whole stylesheet once built out.
 */

.caedd-root {
  all: revert-layer;
  box-sizing: border-box;
}

.caedd-root *,
.caedd-root *::before,
.caedd-root *::after {
  box-sizing: inherit;
}

/*
 * Baseline, functional styling only — this is the Phase 1 MVP. Full visual design,
 * responsive layout polish, and dark-mode/theme handling land in Phase 6 (docs/PLAN.md).
 */

.caedd-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 32rem;
}

.caedd-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.caedd-field label {
  font-weight: 600;
}

.caedd-field input {
  padding: 0.5rem;
  border: 1px solid #767676;
  border-radius: 4px;
  font-size: 1rem;
}

.caedd-quarters {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.caedd-results {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #767676;
  border-radius: 4px;
}

.caedd-verdict {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.caedd-note {
  font-style: italic;
  margin: 0 0 0.75rem;
}

.caedd-result-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  margin: 0;
}

.caedd-result-list dt {
  grid-column: 1;
}

.caedd-result-list dd {
  grid-column: 2;
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.caedd-disclaimer {
  margin-top: 1rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.caedd-partial-benefit {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #767676;
}

.caedd-partial-benefit label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.caedd-partial-benefit input[type='range'] {
  width: 100%;
}

.caedd-partial-output {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 0;
  font-weight: 600;
}

.caedd-copy-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #767676;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
}

.caedd-copy-link:hover,
.caedd-copy-link:focus-visible {
  background: rgba(0, 0, 0, 0.05);
}
