/* Palestra form card. Homepage (/) sits inside her larger card, so it has no shadow.
   Every other route is the standalone card. Measurements from site/css/site.css. */
.palestra-html-form,
.palestra-html-form * { box-sizing: border-box; }

.palestra-html-form {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding: 26px;
  border: 1.5px solid #e6ddcf;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 48px -28px rgba(60, 40, 20, .35);
  color: #2b2620;
  font: 400 19px/1.6 "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
}

.palestra-html-form[data-source-page-path="/"] {
  max-width: none;
  box-shadow: none;
}

.palestra-html-form[hidden],
.palestra-html-form [hidden] { display: none !important; }

.palestra-html-form h2 {
  margin: 0;
  color: #1d1915;
  font: 800 1.55rem/1.2 "Mukta", "Segoe UI", Arial, sans-serif;
}

.palestra-html-form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
  margin: 16px 0 0;
}

.palestra-html-form form > * { grid-column: 1 / -1; min-width: 0; }

.palestra-html-form form > label:has([name="email"]) { grid-column: 1; }
.palestra-html-form form > label:has([name="phone"]) { grid-column: 2; }

.palestra-html-form form > label {
  display: grid;
  gap: 6px;
  color: #2b2620;
  font-weight: 700;
  font-size: .98rem;
}

.palestra-html-form :is(input:not([type="radio"], [type="checkbox"]), textarea, select) {
  display: block;
  width: 100%;
  margin: 0;
  padding: 13px 14px;
  border: 2px solid #767067;
  border-radius: 12px;
  background: #fff;
  color: #2b2620;
  font: 400 1.05rem/1.6 "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  appearance: none;
}

.palestra-html-form textarea { min-height: 110px; resize: vertical; }

.palestra-html-form :is(input, textarea, select):focus {
  outline: none;
  border-color: #1d1915;
  box-shadow: 0 0 0 3px #ffd43b;
}

.palestra-html-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.palestra-html-form legend {
  margin-bottom: 8px;
  padding: 0;
  color: #2b2620;
  font-weight: 700;
  font-size: .98rem;
}

.palestra-html-form fieldset[aria-label] .palestra-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palestra-html-form fieldset[aria-label] .palestra-choice {
  position: relative;
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 700;
}

.palestra-html-form fieldset[aria-label] .palestra-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.palestra-html-form fieldset[aria-label] .palestra-choice span {
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid #e6ddcf;
  border-radius: 999px;
  background: #fff;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}

.palestra-html-form fieldset[aria-label] .palestra-choice:has(:checked) span {
  border-color: #1d1915;
  background: #1d1915;
  color: #fff;
}

.palestra-html-form :is([data-programs], [data-variants], [data-durations]) .palestra-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.palestra-html-form :is([data-programs], [data-variants], [data-durations]) .palestra-choice {
  display: grid;
  height: 100%;
  padding: 10px 12px;
  border: 2px solid #e6ddcf;
  border-radius: 8px;
  background: #fff;
  color: #5c544a;
  font-size: .9rem;
  cursor: pointer;
}

.palestra-html-form :is([data-programs], [data-variants], [data-durations]) .palestra-choice:has(:checked) {
  border-color: #1d1915;
  background: #fff6d6;
  color: #1d1915;
}

.palestra-html-form .palestra-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
  padding: 16px 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #ffd43b;
  box-shadow: 0 8px 18px -10px rgba(150, 110, 0, .65);
  color: #1d1915;
  font: 700 1.05rem/1.2 "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  text-align: center;
  cursor: pointer;
}

.palestra-html-form .palestra-submit:enabled:hover { background: #f2c418; }

.palestra-html-form .palestra-submit:disabled { opacity: .6; cursor: default; }

.palestra-html-form :focus-visible {
  outline: 3px solid #1d1915;
  outline-offset: 2px;
}

.palestra-html-form :is([data-status], [data-membership-status]) {
  margin: 0;
  color: #5c544a;
  font-size: .88rem;
  font-weight: 400;
}

.palestra-html-form :is([data-status], [data-membership-status]):empty { display: none; }

.palestra-html-form iframe {
  display: block;
  width: 100%;
  border: 0;
}

@media (max-width: 460px) {
  .palestra-html-form { padding: 20px 16px; }
  .palestra-html-form form > label:has([name="email"]),
  .palestra-html-form form > label:has([name="phone"]) { grid-column: 1 / -1; }
  .palestra-html-form :is([data-programs], [data-variants], [data-durations]) .palestra-choices {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Later steps, only on /html-form-engine. The studio home does not load this file. */
.palestra-engine {
  color: #2b2620;
  font: 400 19px/1.6 "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
}

.palestra-engine :is(h1, h2, h3) {
  color: #1d1915;
  font-family: "Mukta", "Segoe UI", Arial, sans-serif;
  line-height: 1.2;
}

.palestra-engine :is(input:not([type="radio"], [type="checkbox"]), textarea, select) {
  border: 2px solid #767067 !important;
  border-radius: 12px !important;
  background: #fff;
  color: #2b2620;
  font: 400 1.05rem/1.6 "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
}

.palestra-engine :is(input, textarea, select):focus {
  outline: none;
  border-color: #1d1915 !important;
  box-shadow: 0 0 0 3px #ffd43b;
}

.palestra-engine button.bg-primary {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #ffd43b;
  box-shadow: 0 8px 18px -10px rgba(150, 110, 0, .65);
  color: #1d1915;
  font: 700 1.05rem/1.2 "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
}

.palestra-engine button.bg-primary:enabled:hover { background: #f2c418; }
