/*
 * The Send us an event form (templates/submit-form.php and submit-sent.php).
 * Its own stylesheet, printed after the calendar's (handle tpe-calendar), on
 * the form's page only. Every rule is under .tpe-submit, inside the .tpe
 * root, and takes the calendar's tokens (assets/calendar.css): no colour of
 * its own and no text set from a theme's colour. Text straight on the page
 * (the lead, the stepper, the guidelines) inherits the theme's; the steps
 * and the aside are the calendar's white cards with its ink on them; a
 * problem is marked by a line in the danger colour and a word, never by
 * colour alone, and a chip that is on carries a tick as well as its fill.
 *
 * The layout answers the width of the .tpe root (container queries): from
 * 900 px the aside stands beside the form; narrower it goes under it, and
 * under 600 px its preview is left out. Under 40em the stepper gives way to
 * "Step 2 of 6" over a bar.
 *
 * Without the script, what a choice makes unneeded (the online link for an
 * event in person, the place for an online one, the weekly days and the
 * other dates for an event that happens once) is folded away with :has(). A
 * browser without :has() shows every field, and the form still works.
 */

.tpe .tpe-submit { max-width: 72rem; margin-inline: auto; font-size: var(--tpe-fs-md); line-height: var(--tpe-lh); }
/* What is hidden stays hidden, whatever display a rule below or the
   calendar's .tpe-btn gives it. */
.tpe .tpe-submit [hidden] { display: none !important; }
.tpe .tpe-submit .tpe-submit__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tpe .tpe-submit .tpe-icon { width: 1.125rem; height: 1.125rem; flex: none; }

/* ---------- Above the form ---------- */
.tpe .tpe-submit .tpe-submit__lead { margin: 0 0 var(--tpe-s5); font-size: var(--tpe-fs-lg); color: var(--tpe-soft); }
.tpe .tpe-submit .tpe-submit__guidelines { margin: 0 0 var(--tpe-s4); padding: var(--tpe-s4) var(--tpe-s5); border: 1px solid var(--tpe-line); border-radius: var(--tpe-radius-md); background: var(--tpe-card); color: var(--tpe-ink); font-size: var(--tpe-fs-ui); }
.tpe .tpe-submit .tpe-submit__guidelines p + p { margin-top: var(--tpe-s3); }
.tpe .tpe-submit .tpe-submit__guidelines a { text-decoration-color: var(--tpe-accent); text-underline-offset: .15em; }
.tpe .tpe-submit .tpe-submit__notice,
.tpe .tpe-submit .tpe-submit__summary { margin: 0 0 var(--tpe-s5); padding: var(--tpe-s4); border: 2px solid var(--tpe-danger); border-left-width: 6px; border-radius: var(--tpe-radius-sm); background: var(--tpe-danger-bg); color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__notice p { font-weight: 700; }
.tpe .tpe-submit .tpe-submit__summary-title { margin: 0 0 var(--tpe-s2); font-size: var(--tpe-fs-lg); font-weight: 700; line-height: var(--tpe-lh-snug); }
.tpe .tpe-submit .tpe-submit__summary ul { display: grid; gap: var(--tpe-s1-5); }
.tpe .tpe-submit .tpe-submit__summary a { color: var(--tpe-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }

/* ---------- The layout: the form, and the aside beside or under it ---------- */
.tpe .tpe-submit .tpe-submit__layout { display: grid; gap: var(--tpe-s5); }
.tpe .tpe-submit .tpe-submit__main { min-width: 0; }
.tpe .tpe-submit .tpe-submit__aside { display: grid; gap: var(--tpe-s4); align-content: start; min-width: 0; }
@container tpe (min-width: 600px) {
	.tpe .tpe-submit .tpe-submit__aside { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); align-items: start; }
}
@container tpe (min-width: 900px) {
	.tpe .tpe-submit .tpe-submit__layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--tpe-s6); align-items: start; }
	.tpe .tpe-submit .tpe-submit__aside { grid-template-columns: minmax(0, 1fr); position: sticky; top: var(--tpe-s5); }
}
@container tpe (max-width: 599px) {
	.tpe .tpe-submit .tpe-submit__box.tpe-submit__box--preview { display: none; }
}

/* ---------- The steps: each a card ---------- */
.tpe .tpe-submit .tpe-submit__card { margin: 0 0 var(--tpe-s4); padding: var(--tpe-s5) var(--tpe-s4) var(--tpe-s5); border: 1px solid var(--tpe-line); border-radius: var(--tpe-radius); background: var(--tpe-card); color: var(--tpe-ink); scroll-margin-top: var(--tpe-s5); }
@container tpe (min-width: 600px) {
	.tpe .tpe-submit .tpe-submit__card { padding: var(--tpe-s5) var(--tpe-s6) var(--tpe-s6); }
}
.tpe .tpe-submit .tpe-submit__head { display: flex; align-items: flex-start; gap: var(--tpe-s3); margin: 0 0 var(--tpe-s5); }
.tpe .tpe-submit .tpe-submit__icon { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--tpe-pill); background: var(--tpe-tint); color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__head-text { min-width: 0; }
.tpe .tpe-submit .tpe-submit__step-title { margin: .125rem 0 0; font-family: inherit; font-size: var(--tpe-fs-xl); font-weight: 700; line-height: var(--tpe-lh-snug); letter-spacing: var(--tpe-track-tight); color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__step-title:focus { outline: none; }
.tpe .tpe-submit .tpe-submit__step-title:focus-visible { box-shadow: var(--tpe-ring); border-radius: var(--tpe-radius-xs); }
.tpe .tpe-submit .tpe-submit__sub { margin: var(--tpe-s1) 0 0; font-size: var(--tpe-fs-sm); color: var(--tpe-muted); }

/* ---------- Fieldsets and fields ---------- */
.tpe .tpe-submit .tpe-submit__set { min-width: 0; margin: 0; padding: 0; border: 0; }
.tpe .tpe-submit .tpe-submit__set + .tpe-submit__set { margin-top: var(--tpe-s5); padding-top: var(--tpe-s5); border-top: 1px solid var(--tpe-line); }
.tpe .tpe-submit .tpe-submit__legend { float: left; width: 100%; padding: 0; margin: 0 0 var(--tpe-s1); font-size: var(--tpe-fs-lg); font-weight: 700; line-height: var(--tpe-lh-snug); color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__legend + * { clear: both; }
/* A step of one fieldset: its card's question says it; the legend stays for
   assistive technology. */
.tpe .tpe-submit .tpe-submit__step--single > .tpe-submit__set > .tpe-submit__legend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tpe .tpe-submit .tpe-submit__step--single > .tpe-submit__set > .tpe-submit__legend + * { margin-top: 0; }
.tpe .tpe-submit .tpe-submit__field { margin-top: var(--tpe-s5); }
.tpe .tpe-submit .tpe-submit__label { display: block; margin-bottom: var(--tpe-s1-5); font-size: var(--tpe-fs-ui); font-weight: 700; color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__req { font-weight: 400; color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__hint { margin: 0 0 var(--tpe-s1-5); font-size: var(--tpe-fs-sm); color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__count { margin: var(--tpe-s1) 0 0; font-size: var(--tpe-fs-2xs); color: var(--tpe-muted); font-variant-numeric: tabular-nums; }
.tpe .tpe-submit .tpe-submit__error,
.tpe .tpe-submit .tpe-submit__again { margin: 0 0 var(--tpe-s1-5); font-size: var(--tpe-fs-sm); font-weight: 700; color: var(--tpe-danger); }
.tpe .tpe-submit .has-error { padding-left: var(--tpe-s3); border-left: 4px solid var(--tpe-danger); }

.tpe .tpe-submit .tpe-submit__input { display: block; width: 100%; min-height: var(--tpe-control-lg); margin: 0; padding: var(--tpe-s2) var(--tpe-s4); border: 1px solid var(--tpe-line-strong); border-radius: var(--tpe-radius-sm); background: var(--tpe-card); color: var(--tpe-ink); font: inherit; font-size: var(--tpe-fs-md); line-height: var(--tpe-lh); box-shadow: none; }
.tpe .tpe-submit .tpe-submit__input::placeholder { color: var(--tpe-faint); opacity: 1; }
.tpe .tpe-submit .tpe-submit__input:hover { border-color: var(--tpe-ink-2); }
.tpe .tpe-submit textarea.tpe-submit__input { min-height: 9rem; resize: vertical; }
.tpe .tpe-submit select.tpe-submit__input { padding-right: var(--tpe-s6); }
.tpe .tpe-submit .tpe-submit__input[aria-invalid="true"] { border: 2px solid var(--tpe-danger); }
.tpe .tpe-submit input[type="date"].tpe-submit__input,
.tpe .tpe-submit input[type="time"].tpe-submit__input { min-height: var(--tpe-control-lg); }
.tpe .tpe-submit .tpe-submit__input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }

/* The When grid (the reference's): one day, multi-day or repeats beside All
   day, then the dates and the times two by two, then how often. One column
   on a phone. */
.tpe .tpe-submit .tpe-submit__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tpe-s5) var(--tpe-s4); margin-top: var(--tpe-s4); align-items: end; }
.tpe .tpe-submit .tpe-submit__grid > * { min-width: 0; margin-top: 0; }
.tpe .tpe-submit .tpe-submit__grid > .tpe-submit__wide { grid-column: 1 / -1; }
.tpe .tpe-submit .tpe-submit__grid > .tpe-submit__when { grid-column: 1; }
.tpe .tpe-submit .tpe-submit__grid > .tpe-submit__toggle { grid-column: 2; justify-self: end; align-self: center; }
.tpe .tpe-submit .tpe-submit__when > .tpe-submit__sublegend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@container tpe (max-width: 599px) {
	.tpe .tpe-submit .tpe-submit__grid { grid-template-columns: minmax(0, 1fr); }
	.tpe .tpe-submit .tpe-submit__choices--seg { display: flex; flex-wrap: nowrap; width: 100%; }
	.tpe .tpe-submit .tpe-submit__choices--seg .tpe-submit__choice { flex: 1 1 0; min-width: 0; }
	.tpe .tpe-submit .tpe-submit__choices--chips.tpe-submit__choices--seg .tpe-submit__choice label { width: 100%; justify-content: center; padding: 0 var(--tpe-s2); white-space: nowrap; }
	.tpe .tpe-submit .tpe-submit__grid > .tpe-submit__when,
	.tpe .tpe-submit .tpe-submit__grid > .tpe-submit__toggle { grid-column: 1; justify-self: start; }
}

/* A segmented choice (the reference's): the options on a grey pill, the
   chosen one a white pill with a tick. */
.tpe .tpe-submit .tpe-submit__choices--seg { display: inline-flex; flex-wrap: wrap; gap: var(--tpe-s1); padding: var(--tpe-s1); border-radius: var(--tpe-pill); background: var(--tpe-surface); }
.tpe .tpe-submit .tpe-submit__choices--chips.tpe-submit__choices--seg .tpe-submit__choice label { min-height: 2.25rem; border-color: transparent; background: transparent; }
.tpe .tpe-submit .tpe-submit__choices--chips.tpe-submit__choices--seg input:checked + label { border-color: var(--tpe-card); background: var(--tpe-card); color: var(--tpe-ink); box-shadow: var(--tpe-shadow-raised); }

/* A switch (the reference's): All day and Free. The box stays in the page,
   spread over its line and see-through; the label draws the track and the
   knob. */
.tpe .tpe-submit .tpe-submit__toggle .tpe-submit__choice { position: relative; min-height: var(--tpe-target-sm); }
.tpe .tpe-submit .tpe-submit__toggle .tpe-submit__choice input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tpe .tpe-submit .tpe-submit__toggle .tpe-submit__choice label { position: relative; display: inline-flex; align-items: center; min-height: 1.5rem; padding-right: 3.25rem; font-weight: 600; }
.tpe .tpe-submit .tpe-submit__toggle .tpe-submit__choice label::after { content: ""; position: absolute; right: 0; top: 50%; width: 2.5rem; height: 1.375rem; margin-top: -.6875rem; border-radius: var(--tpe-pill); background: var(--tpe-line-mid); box-shadow: inset 0 0 0 1px var(--tpe-line-strong); }
.tpe .tpe-submit .tpe-submit__toggle .tpe-submit__choice label::before { content: ""; position: absolute; z-index: 1; right: 1.3125rem; top: 50%; width: 1rem; height: 1rem; margin-top: -.5rem; border-radius: 50%; background: var(--tpe-card); box-shadow: var(--tpe-shadow-pill); transition: transform .15s ease-out; }
.tpe .tpe-submit .tpe-submit__toggle input:checked + label::after { background: var(--tpe-accent-fill); box-shadow: inset 0 0 0 1px var(--tpe-accent-fill); }
.tpe .tpe-submit .tpe-submit__toggle input:checked + label::before { transform: translateX(1.125rem); }
.tpe .tpe-submit .tpe-submit__toggle input:focus-visible + label::after { box-shadow: var(--tpe-ring); }

/* The photo picker (the reference's): a frame with the preview, the button
   that holds the file input, Remove and the file's name. */
.tpe .tpe-submit .tpe-submit__photo-frame { position: relative; display: grid; place-items: center; width: 100%; max-width: 30rem; aspect-ratio: 16 / 9; margin: 0 0 var(--tpe-s3); overflow: hidden; border: 1px dashed var(--tpe-line-strong); border-radius: var(--tpe-radius-md); background: var(--tpe-quiet-bg); color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__photo-empty .tpe-icon { width: 2rem; height: 2rem; }
.tpe .tpe-submit .tpe-submit__photo-preview:empty { display: none; }
.tpe .tpe-submit .tpe-submit__photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpe .tpe-submit .tpe-submit__photo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tpe-s3); }
.tpe .tpe-submit .tpe-submit__photo-button { position: relative; cursor: pointer; }
.tpe .tpe-submit .tpe-submit__photo-button .tpe-submit__file { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
.tpe .tpe-submit .tpe-submit__photo-button:has(.tpe-submit__file:focus-visible) { box-shadow: var(--tpe-ring); }
.tpe .tpe-submit .tpe-submit__photo-name { font-size: var(--tpe-fs-sm); color: var(--tpe-muted); overflow-wrap: anywhere; }
.tpe .tpe-submit .tpe-submit__photo-remove { min-height: var(--tpe-target-sm); }

/* The description's editor (WordPress's own): a field like the others, its
   toolbar on the quiet grey. */
.tpe .tpe-submit .tpe-submit__editor .wp-editor-container { overflow: hidden; border: 1px solid var(--tpe-line-strong); border-radius: var(--tpe-radius-sm); background: var(--tpe-card); }
.tpe .tpe-submit .tpe-submit__editor .wp-editor-container .tpe-submit__input { border: 0; border-radius: 0; }
.tpe .tpe-submit .tpe-submit__editor .mce-panel { border: 0; background: var(--tpe-card); box-shadow: none; }
.tpe .tpe-submit .tpe-submit__editor .mce-top-part::before { box-shadow: none; }
.tpe .tpe-submit .tpe-submit__editor .mce-toolbar-grp { border-bottom: 1px solid var(--tpe-line); background: var(--tpe-quiet-bg); }
.tpe .tpe-submit .tpe-submit__editor.has-error .wp-editor-container { border: 2px solid var(--tpe-danger); }

/* The place and the organizer: typed, the site's own suggested in a list
   under the field (assets/submit.js). */
.tpe .tpe-submit .tpe-submit__group--bare .tpe-submit__members { padding: 0; border: 0; }
.tpe .tpe-submit .tpe-submit__group--bare > .tpe-submit__sublegend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tpe .tpe-submit .tpe-submit__group--bare > .tpe-submit__members > .tpe-submit__field:first-child { margin-top: 0; }
.tpe .tpe-submit .tpe-submit__field:has(> [data-tpe-suggest], > [data-tpe-places]) { position: relative; }
.tpe .tpe-submit .tpe-submit__suggest { position: absolute; left: 0; right: 0; z-index: 5; margin: var(--tpe-s1) 0 0; padding: var(--tpe-s1); list-style: none; border: 1px solid var(--tpe-line); border-radius: var(--tpe-radius-sm); background: var(--tpe-card); color: var(--tpe-ink); box-shadow: var(--tpe-shadow-pop); max-height: 18rem; overflow-y: auto; }
.tpe .tpe-submit .tpe-submit__suggest li { display: flex; flex-direction: column; gap: .125rem; padding: var(--tpe-s2) var(--tpe-s3); border-radius: var(--tpe-radius-xs); cursor: pointer; font-weight: 600; }
.tpe .tpe-submit .tpe-submit__suggest li span { font-size: var(--tpe-fs-xs); font-weight: 400; color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__suggest li:hover,
.tpe .tpe-submit .tpe-submit__suggest li[aria-selected="true"] { background: var(--tpe-quiet-bg); box-shadow: inset 3px 0 0 var(--tpe-ink); }

/* Fields side by side where there is room: the date and its times, the two
   prices. Narrow, one under another. */
.tpe .tpe-submit .tpe-submit__row { display: grid; gap: 0 var(--tpe-s4); }
@container tpe (min-width: 600px) {
	.tpe .tpe-submit .tpe-submit__row { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); align-items: start; }
}

/* Groups: the choices of a field, and a few fields that belong together. */
.tpe .tpe-submit .tpe-submit__group { min-width: 0; margin: var(--tpe-s5) 0 0; padding: 0; border: 0; }
.tpe .tpe-submit .tpe-submit__group.has-error { padding-left: var(--tpe-s3); }
.tpe .tpe-submit .tpe-submit__sublegend { display: flex; align-items: center; gap: var(--tpe-s1-5); padding: 0; margin: 0 0 var(--tpe-s2); font-size: var(--tpe-fs-ui); font-weight: 700; color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__members { padding: 0 0 0 var(--tpe-s4); border-left: 2px solid var(--tpe-line); }
.tpe .tpe-submit .tpe-submit__members > .tpe-submit__field:first-child,
.tpe .tpe-submit .tpe-submit__members > .tpe-submit__group:first-child { margin-top: var(--tpe-s2); }
.tpe .tpe-submit .tpe-submit__group--plain .tpe-submit__members { padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 0 var(--tpe-s5); }
.tpe .tpe-submit .tpe-submit__group--plain .tpe-submit__members > .tpe-submit__field { margin-top: 0; }
.tpe .tpe-submit .tpe-submit__more-dates .tpe-submit__members { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0 var(--tpe-s3); }
.tpe .tpe-submit .tpe-submit__more-dates .tpe-submit__field { margin-top: var(--tpe-s2); }
.tpe .tpe-submit .tpe-submit__more-dates .tpe-submit__label { font-size: var(--tpe-fs-sm); }
.tpe .tpe-submit .tpe-submit__choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0 var(--tpe-s4); }
.tpe .tpe-submit .tpe-submit__choice { display: flex; align-items: center; gap: var(--tpe-s2); min-height: var(--tpe-target); }
.tpe .tpe-submit .tpe-submit__choice input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__choice label { cursor: pointer; }
.tpe .tpe-submit .tpe-submit__check { margin-top: var(--tpe-s3); }

/* Chips: a box or a radio drawn as a pill. The input stays in the page for
   the keyboard and assistive technology, spread over its label, see-through;
   the label carries the look, and a tick when it is on. */
.tpe .tpe-submit .tpe-submit__choices--chips { display: flex; flex-wrap: wrap; gap: var(--tpe-s2); }
.tpe .tpe-submit .tpe-submit__choices--chips .tpe-submit__choice { position: relative; min-height: 0; }
.tpe .tpe-submit .tpe-submit__choices--chips .tpe-submit__choice input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tpe .tpe-submit .tpe-submit__choices--chips .tpe-submit__choice label { display: inline-flex; align-items: center; gap: var(--tpe-s1); min-height: var(--tpe-target-sm); padding: 0 var(--tpe-s4); border: 1px solid var(--tpe-line-strong); border-radius: var(--tpe-pill); background: var(--tpe-card); color: var(--tpe-ink); font-size: var(--tpe-fs-sm); font-weight: 600; line-height: 1.2; }
.tpe .tpe-submit .tpe-submit__choices--chips .tpe-submit__choice:hover label { border-color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__choices--chips input:checked + label { background: var(--tpe-accent-fill); border-color: var(--tpe-accent-fill); color: var(--tpe-on-accent-fill); }
.tpe .tpe-submit .tpe-submit__choices--chips input:checked + label::before { content: "\2713"; font-weight: 700; }
.tpe .tpe-submit .tpe-submit__choices--chips input:focus-visible + label { box-shadow: var(--tpe-ring); }
.tpe .tpe-submit .tpe-submit__choices--chips input[aria-invalid="true"]:not(:checked) + label { border-color: var(--tpe-danger); }

/* What a choice makes unneeded, folded away without the script (with it,
   assets/submit.js hides and disables the same by data-tpe-show). */
.tpe .tpe-submit:has(#tpe-submit-attendance:checked) .tpe-submit__online,
.tpe .tpe-submit:has(#tpe-submit-attendance-2:checked) .tpe-submit__place,
.tpe .tpe-submit:has(#tpe-submit-when:checked) [data-tpe-show="when:multi"],
.tpe .tpe-submit:has(#tpe-submit-when:checked) [data-tpe-show^="when:repeat"],
.tpe .tpe-submit:has(#tpe-submit-when-2:checked) [data-tpe-show^="when:repeat"],
.tpe .tpe-submit:has(#tpe-submit-when-3:checked) [data-tpe-show="when:multi"],
.tpe .tpe-submit:has(#tpe-submit-all_day:checked) [data-tpe-show="all_day:0"],
.tpe .tpe-submit:has(#tpe-submit-free:checked) [data-tpe-show="free:0"],
.tpe .tpe-submit:has(#tpe-submit-repeat option[value="dates"]:checked) [data-tpe-show*="repeat:weekly"],
.tpe .tpe-submit:has(#tpe-submit-repeat option[value="monthly"]:checked) [data-tpe-show$="biweekly"],
.tpe .tpe-submit:has(#tpe-submit-repeat option[value="monthly"]:checked) [data-tpe-show$="repeat:dates"],
.tpe .tpe-submit:has(#tpe-submit-repeat option[value="weekly"]:checked) [data-tpe-show$="repeat:dates"],
.tpe .tpe-submit:has(#tpe-submit-repeat option[value="biweekly"]:checked) [data-tpe-show$="repeat:dates"] { display: none; }

/* The field people leave empty: off-screen, never displayed none. */
.tpe .tpe-submit .tpe-submit__trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Send your event: Featured, the agree box, Send ---------- */
.tpe .tpe-submit .tpe-submit__featured { padding: var(--tpe-s4); border: 1px solid var(--tpe-line-mid); border-radius: var(--tpe-radius-md); background: var(--tpe-tint); color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__featured > .tpe-submit__sublegend { float: left; width: 100%; margin: 0 0 var(--tpe-s1); font-size: var(--tpe-fs-md); }
.tpe .tpe-submit .tpe-submit__featured > .tpe-submit__sublegend + * { clear: both; }
.tpe .tpe-submit .tpe-submit__featured .tpe-submit__members { padding: 0; border: 0; }
.tpe .tpe-submit .tpe-submit__featured .tpe-submit__check { margin-top: var(--tpe-s1); }
.tpe .tpe-submit .tpe-submit__featured .tpe-submit__check label { font-weight: 700; }
.tpe .tpe-submit .tpe-submit__featured-periods { margin-top: var(--tpe-s3); }
.tpe .tpe-submit .tpe-submit__note { margin: var(--tpe-s3) 0 0; font-size: var(--tpe-fs-sm); color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__agree { margin-top: var(--tpe-s4); padding: var(--tpe-s3) var(--tpe-s4); border: 1px solid var(--tpe-line); border-radius: var(--tpe-radius-md); }
.tpe .tpe-submit .tpe-submit__actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--tpe-s3); margin-top: var(--tpe-s5); }
.tpe .tpe-submit .tpe-submit__send { margin-left: auto; min-width: 10rem; }

/* ---------- The steps (assets/submit.js adds .is-stepped) ----------
   Nothing here applies before the script runs: the page is the long form,
   and what the steps need is hidden by its hidden attribute. */
.tpe .tpe-submit.is-stepped .tpe-submit__stepper { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0 0 var(--tpe-s5); padding: 0; list-style: none; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper li { position: relative; margin: 0; padding: 0; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper li + li::before { content: ""; position: absolute; top: 1rem; left: calc(-50% + 1.375rem); right: calc(50% + 1.375rem); height: 2px; border-radius: 2px; background: var(--tpe-line-mid); }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper li.is-done::before,
.tpe .tpe-submit.is-stepped .tpe-submit__stepper li.is-current::before { background: currentColor; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper-link { display: flex; flex-direction: column; align-items: center; gap: var(--tpe-s1-5); min-height: var(--tpe-target); color: inherit; text-decoration: none; text-align: center; font-size: var(--tpe-fs-xs); font-weight: 600; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper-link:not([href]) { cursor: default; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper-link:not([href]) .tpe-submit__stepper-name { color: var(--tpe-soft); }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper-link[href] .tpe-submit__stepper-name { text-decoration: underline; text-underline-offset: .15em; text-decoration-color: var(--tpe-accent); }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper-num { display: grid; place-items: center; width: 2rem; height: 2rem; border: 2px solid var(--tpe-line-strong); border-radius: 50%; background: var(--tpe-card); color: var(--tpe-ink); font-size: var(--tpe-fs-sm); font-weight: 700; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper li.is-done .tpe-submit__stepper-num { border-color: var(--tpe-ink); }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper li.is-current .tpe-submit__stepper-num { border-color: var(--tpe-accent-fill); background: var(--tpe-accent-fill); color: var(--tpe-on-accent-fill); box-shadow: 0 0 0 4px var(--tpe-tint); }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper li.is-current .tpe-submit__stepper-name { color: inherit; font-weight: 700; text-decoration: none; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper-link:focus-visible { box-shadow: none; }
.tpe .tpe-submit.is-stepped .tpe-submit__stepper-link:focus-visible .tpe-submit__stepper-num { box-shadow: var(--tpe-ring); }
.tpe .tpe-submit.is-stepped .tpe-submit__progress { display: none; margin: 0 0 var(--tpe-s4); }
.tpe .tpe-submit .tpe-submit__progress-text { margin: 0 0 var(--tpe-s2); font-weight: 700; }
.tpe .tpe-submit .tpe-submit__bar { display: block; height: .375rem; border-radius: var(--tpe-pill); background: var(--tpe-line); overflow: hidden; }
.tpe .tpe-submit .tpe-submit__bar-fill { display: block; width: 0; height: 100%; border-radius: var(--tpe-pill); background: var(--tpe-accent-fill); transition: width .2s ease-out; }
@container tpe (max-width: 40em) {
	.tpe .tpe-submit.is-stepped .tpe-submit__stepper { display: none; }
	.tpe .tpe-submit.is-stepped .tpe-submit__progress { display: block; }
}
.tpe .tpe-submit.is-stepped .tpe-submit__nav { display: flex; justify-content: space-between; gap: var(--tpe-s3); margin-top: var(--tpe-s6); padding-top: var(--tpe-s4); border-top: 1px solid var(--tpe-line); }
.tpe .tpe-submit.is-stepped .tpe-submit__nav [data-tpe-next] { margin-left: auto; min-width: 10rem; }
.tpe .tpe-submit.is-stepped .tpe-submit__nav [aria-disabled="true"] { opacity: .6; cursor: progress; }
/* On a phone, Back and Next stay at the foot of the screen while the step
   scrolls. */
@container tpe (max-width: 599px) {
	.tpe .tpe-submit.is-stepped .tpe-submit__nav { position: sticky; bottom: 0; z-index: 2; margin: var(--tpe-s5) calc(-1 * var(--tpe-s4)) calc(-1 * var(--tpe-s5)); padding: var(--tpe-s3) var(--tpe-s4); background: var(--tpe-card); border-radius: 0 0 var(--tpe-radius) var(--tpe-radius); }
	.tpe .tpe-submit.is-stepped .tpe-submit__nav [data-tpe-next] { flex: 1; min-width: 0; }
	.tpe .tpe-submit .tpe-submit__actions .tpe-submit__send { flex: 1; }
}
.tpe .tpe-submit .tpe-submit__status:empty { display: none; }
.tpe .tpe-submit .tpe-submit__status { margin: 0 0 var(--tpe-s3); font-size: var(--tpe-fs-sm); color: var(--tpe-soft); }

/* The answers on the last step. */
.tpe .tpe-submit .tpe-submit__review { margin: 0 0 var(--tpe-s5); border: 1px solid var(--tpe-line); border-radius: var(--tpe-radius-md); }
.tpe .tpe-submit .tpe-submit__review-step { position: relative; padding: var(--tpe-s3) var(--tpe-s4); }
.tpe .tpe-submit .tpe-submit__review-step + .tpe-submit__review-step { border-top: 1px solid var(--tpe-line); }
.tpe .tpe-submit .tpe-submit__review-step h3 { margin: 0 4rem var(--tpe-s2) 0; font-size: var(--tpe-fs-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__review-step dl { display: grid; grid-template-columns: minmax(7rem, 1fr) 2fr; gap: var(--tpe-s1) var(--tpe-s3); margin: 0; font-size: var(--tpe-fs-sm); }
.tpe .tpe-submit .tpe-submit__review-step dt { font-weight: 700; }
.tpe .tpe-submit .tpe-submit__review-step dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.tpe .tpe-submit .tpe-submit__edit { position: absolute; top: var(--tpe-s2); right: var(--tpe-s4); display: inline-flex; align-items: center; min-height: var(--tpe-target-sm); font-size: var(--tpe-fs-sm); font-weight: 700; text-underline-offset: .15em; }
@container tpe (max-width: 599px) {
	.tpe .tpe-submit .tpe-submit__review-step dl { grid-template-columns: minmax(0, 1fr); }
	.tpe .tpe-submit .tpe-submit__review-step dd + dt { margin-top: var(--tpe-s2); }
}

/* ---------- The aside: how it will look, good to know ---------- */
.tpe .tpe-submit .tpe-submit__box { display: grid; gap: var(--tpe-s3); padding: var(--tpe-s5); border: 1px solid var(--tpe-line); border-radius: var(--tpe-radius); background: var(--tpe-card); color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__box-title { margin: 0; font-family: inherit; font-size: var(--tpe-fs-3xs); font-weight: 700; letter-spacing: .08em; line-height: var(--tpe-lh-snug); text-transform: uppercase; color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__preview { display: grid; gap: var(--tpe-s3); }
.tpe .tpe-submit .tpe-submit__preview-photo { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--tpe-radius-sm); background: var(--tpe-surface); }
.tpe .tpe-submit .tpe-submit__preview-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpe .tpe-submit .tpe-submit__preview-ph { display: inline-flex; align-items: center; gap: var(--tpe-s1-5); font-size: var(--tpe-fs-xs); font-weight: 600; color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__preview-photo.has-photo .tpe-submit__preview-ph { display: none; }
.tpe .tpe-submit .tpe-submit__preview-body { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--tpe-s3); }
.tpe .tpe-submit .tpe-submit__preview-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 4rem; border-radius: var(--tpe-radius-sm); background: var(--tpe-accent-fill); color: var(--tpe-on-accent-fill); font-size: var(--tpe-fs-2xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tpe .tpe-submit .tpe-submit__preview-tile b { font-size: var(--tpe-fs-2xl); font-weight: 800; line-height: 1; letter-spacing: 0; }
.tpe .tpe-submit .tpe-submit__preview-tile b:empty,
.tpe .tpe-submit .tpe-submit__preview-tile span:empty { display: none; }
.tpe .tpe-submit .tpe-submit__preview-tile b:not(:empty) ~ .tpe-icon { display: none; }
.tpe .tpe-submit .tpe-submit__preview-text { display: flex; flex-direction: column; gap: .1875rem; min-width: 0; font-size: var(--tpe-fs-sm); color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__preview-cat { font-size: var(--tpe-fs-3xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tpe-accent-text); }
.tpe .tpe-submit .tpe-submit__preview-name { font-size: var(--tpe-fs-md); font-weight: 700; line-height: var(--tpe-lh-snug); color: var(--tpe-ink); overflow-wrap: anywhere; }
.tpe .tpe-submit .tpe-submit__preview-name.is-empty { color: var(--tpe-muted); }
.tpe .tpe-submit .tpe-submit__preview-price:not(:empty)::before { content: "\00B7"; margin: 0 var(--tpe-s1-5); }
.tpe .tpe-submit .tpe-submit__know { display: grid; gap: var(--tpe-s2); margin: 0; padding: 0; list-style: none; font-size: var(--tpe-fs-sm); color: var(--tpe-ink-2); }
.tpe .tpe-submit .tpe-submit__know li { display: flex; align-items: flex-start; gap: var(--tpe-s2); }
.tpe .tpe-submit .tpe-submit__know .tpe-icon { margin-top: .125rem; color: var(--tpe-ok); }

/* ---------- The thank-you page and the paused page ---------- */
.tpe .tpe-submit .tpe-submit__done { display: grid; justify-items: center; gap: var(--tpe-s3); max-width: 38rem; margin: 0 auto; padding: var(--tpe-s6) var(--tpe-s5); border: 1px solid var(--tpe-line); border-radius: var(--tpe-radius); background: var(--tpe-card); color: var(--tpe-ink); text-align: center; }
.tpe .tpe-submit .tpe-submit__done-icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: var(--tpe-pill); background: var(--tpe-ok-bg); color: var(--tpe-ok); }
.tpe .tpe-submit .tpe-submit__done-icon .tpe-icon { width: 2rem; height: 2rem; }
.tpe .tpe-submit .tpe-submit__done-title { margin: var(--tpe-s2) 0 0; font-family: inherit; font-size: var(--tpe-fs-2xl); font-weight: 700; line-height: var(--tpe-lh-snug); color: var(--tpe-ink); }
.tpe .tpe-submit .tpe-submit__done .tpe-submit__actions { justify-content: center; }
.tpe .tpe-submit .tpe-submit__thanks { font-size: var(--tpe-fs-md); color: var(--tpe-ink-2); }
.tpe .tpe-submit .tpe-submit__paused { font-size: var(--tpe-fs-lg); font-weight: 600; }
.tpe .tpe-submit .tpe-editor-note { margin-top: var(--tpe-s4); }
.tpe .tpe-submit .tpe-submit__thanks-featured { margin-top: 0; color: var(--tpe-ink-2); }

/* Forced colours: no fills or shadows; the fields keep their borders, a
   field with a problem a thicker one, a chip that is on its tick and a
   thicker edge. */
@media (forced-colors: active) {
	.tpe .tpe-submit .tpe-submit__input[aria-invalid="true"] { border-width: 3px; }
	.tpe .tpe-submit .tpe-submit__choices--chips input:checked + label { border-width: 3px; }
	.tpe .tpe-submit.is-stepped .tpe-submit__stepper li.is-current .tpe-submit__stepper-num { border-width: 4px; }
}
