.stas-widget {
  --stas-bg: #f4efe7;
  --stas-card: transparent;
  --stas-ink: #1e1d1b;
  --stas-muted: #6f665e;
  --stas-line: rgba(30, 29, 27, 0.12);
  --stas-button-bg: #cc5a12;
  --stas-button-text: #ffffff;
  --stas-button-border-color: #cc5a12;
  --stas-button-border-width: 0px;
  --stas-button-radius: 999px;
  --stas-font-family: inherit;
  --stas-modal-bg: #fff7eb;
  --stas-modal-text: #1e1d1b;
  --stas-accent: #cc5a12;
  --stas-modal-padding: 26px;
  --stas-results-padding: 18px;
  --stas-results-margin-top: 16px;
  --stas-success: #1f7a4c;
  --stas-danger: #a12c2c;
  --stas-shadow: 0 24px 80px rgba(45, 23, 8, 0.2);
  --stas-radius: 22px;
}

.stas-widget * {
  box-sizing: border-box;
  font-family: var(--stas-font-family);
}

.stas-widget .stas-eligibility-trigger,
.stas-widget .stas-submit {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.stas-widget .stas-eligibility-trigger {
  color: var(--stas-button-text);
  background: var(--stas-button-bg);
  border: var(--stas-button-border-width) solid var(--stas-button-border-color);
  border-radius: var(--stas-button-radius);
  box-shadow: 0 14px 34px rgba(142, 52, 0, 0.22);
}

.stas-widget .stas-eligibility-trigger:hover,
.stas-widget .stas-submit:hover {
  transform: translateY(-1px);
}

.stas-widget .stas-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.stas-widget .stas-modal.is-open {
  display: block;
}

.stas-widget .stas-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 14, 8, 0.5);
  backdrop-filter: blur(4px);
}

.stas-widget .stas-modal__dialog {
  position: relative;
  width: min(92vw, 760px);
  max-height: min(88vh, 920px);
  overflow: auto;
  margin: 6vh auto;
  padding: var(--stas-modal-padding);
  border-radius: var(--stas-radius);
  background: var(--stas-modal-bg);
  color: var(--stas-modal-text);
  box-shadow: var(--stas-shadow);
}

.stas-widget .stas-modal__eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--stas-accent);
  font-weight: 700;
}

.stas-widget .stas-modal__header h2 {
  margin: 0;
  line-height: 1.05;
}

.stas-widget .stas-modal__header p {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--stas-muted);
}

.stas-widget .stas-form {
  margin-top: 24px;
}

.stas-widget .stas-field {
  display: block;
  margin-bottom: 18px;
}

.stas-widget .stas-field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.stas-widget .stas-field input,
.stas-widget .stas-field select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--stas-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0 16px;
  font-size: 16px;
  color: var(--stas-modal-text);
}

.stas-widget .stas-field input:focus,
.stas-widget .stas-field select:focus {
  outline: 2px solid rgba(204, 90, 18, 0.28);
  border-color: rgba(204, 90, 18, 0.4);
}

.stas-widget .stas-autocomplete {
  margin-top: -8px;
  margin-bottom: 18px;
  border: 1px solid var(--stas-line);
  border-radius: 18px;
  background: var(--stas-card);
  overflow: hidden;
}

.stas-widget .stas-autocomplete__item {
  width: 100%;
  display: block;
  padding: 14px 16px;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
  color: var(--stas-modal-text);
}

.stas-widget .stas-autocomplete__item + .stas-autocomplete__item {
  border-top: 1px solid var(--stas-line);
}

.stas-widget .stas-autocomplete__item:hover,
.stas-widget .stas-autocomplete__item.is-active {
  background: rgba(204, 90, 18, 0.08);
}

.stas-widget .stas-autocomplete__meta {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--stas-muted);
}

.stas-widget .stas-submit {
  color: #fff;
  background: linear-gradient(135deg, var(--stas-accent), #7a2f07);
  box-shadow: 0 12px 28px rgba(18, 91, 55, 0.2);
}

.stas-widget .stas-submit[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.stas-widget .stas-feedback {
  min-height: 28px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--stas-muted);
}

.stas-widget .stas-feedback.is-error {
  color: var(--stas-danger);
}

.stas-widget .stas-feedback.is-success {
  color: var(--stas-success);
}

.stas-widget .stas-results {
  margin-top: 22px;
}

.stas-widget .stas-results__handoff {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--stas-line);
  background: var(--stas-card);
}

.stas-widget .stas-results__handoff h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.stas-widget .stas-results__handoff p {
  margin: 0;
  line-height: 1.55;
  color: var(--stas-muted);
}

.stas-widget .stas-results__extra {
  margin-top: var(--stas-results-margin-top);
  color: var(--stas-modal-text);
}

.stas-widget .stas-results__handoff,
.stas-widget .stas-results__extra {
  padding: var(--stas-results-padding);
}

.stas-widget .stas-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 122, 76, 0.12);
  color: var(--stas-success);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 768px) {
  .stas-widget .stas-modal__dialog {
    width: calc(100vw - 20px);
    margin: 10px auto;
    padding: 20px;
    max-height: calc(100vh - 20px);
  }

  .stas-widget .stas-eligibility-trigger,
  .stas-widget .stas-submit {
    width: 100%;
  }
}
