/**
 * Submission form styles.
 *
 * Everything is scoped under `.pic-events-root` so the form never bleeds into —
 * or gets clobbered by — the host theme. That theme-agnostic scoping is the
 * whole point: zero per-site CSS patching (PROJECT_OVERVIEW criterion 7).
 * Colors come from the mock-ups (the Tribe blue) but are exposed as custom
 * properties so a site owner can rebrand without forking the stylesheet.
 */

.pic-events-root {
	--pic-events-accent: #1a7bb9;
	--pic-events-accent-ink: #fff;
	--pic-events-muted: #8c9196;
	--pic-events-surface: #ededed;
	--pic-events-line: #d6d6d6;

	box-sizing: border-box;
	max-width: 720px;
	margin-inline: auto;
	padding: 2rem 1.5rem;
	background: var(--pic-events-surface);
}

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

/* Honeypot — visually and from assistive tech, but present in the DOM. */
.pic-events-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Stepper -------------------------------------------------------------- */
.pic-events-steps {
	display: flex;
	gap: 0;
	justify-content: space-between;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}

.pic-events-step {
	position: relative;
	flex: 1 1 0;
	text-align: center;
}

/* Connector line between markers. */
.pic-events-step:not(:first-child)::before {
	content: "";
	position: absolute;
	top: 1.25rem;
	right: 50%;
	left: -50%;
	height: 2px;
	border-top: 2px dotted var(--pic-events-line);
}

.pic-events-step__marker {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 2px solid var(--pic-events-line);
	border-radius: 50%;
	background: #fff;
	color: var(--pic-events-muted);
	font-weight: 700;
	cursor: pointer;
}

.pic-events-step__label {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.8rem;
	color: var(--pic-events-muted);
}

.pic-events-step.is-active .pic-events-step__marker,
.pic-events-step.is-complete .pic-events-step__marker {
	border-color: var(--pic-events-accent);
	background: var(--pic-events-accent);
	color: var(--pic-events-accent-ink);
}

.pic-events-step.is-active .pic-events-step__label {
	color: #1a1a1a;
	font-weight: 700;
}

/* Panels & fields ------------------------------------------------------ */
.pic-events-panel[hidden] {
	display: none;
}

.pic-events-field {
	margin: 0 0 1.25rem;
}

/* Block-level so the label always sits ABOVE its control. `inline-block` left
   the label on the control's baseline, which a host theme could drag onto the
   same line (the label-beside-a-narrow-input symptom). */
.pic-events-field label,
.pic-events-field legend {
	display: block;
	width: 100%;
	margin-bottom: 0.4rem;
	font-weight: 600;
}

/* Match every text-like control rather than enumerating types — date, time,
   number and email were previously missed and fell back to the browser's
   default (narrow) width. Checkboxes and radios keep their intrinsic size.
   `display: block` + `max-width` keeps a host theme from re-inlining or
   constraining them. */
.pic-events-field input:not([type="checkbox"]):not([type="radio"]),
.pic-events-field textarea,
.pic-events-field select {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	background: #fff;
	font: inherit;
}

/* Image dropzone (Step 3) ---------------------------------------------- */
.pic-events-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
	padding: 2.5rem 1.5rem;
	border: 1px solid var(--pic-events-line);
	background: #fff;
	text-align: center;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* Dragging a file over the zone. */
.pic-events-dropzone.is-dragging {
	border-color: var(--pic-events-accent);
	background: #f3f9fd;
}

/* The real <input type="file"> stays in the DOM and in the tab order — the
   styled <label> drives it — but is visually hidden. `display:none` would drop
   it out of the tab order and break keyboard access. */
.pic-events-dropzone__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Label styled as the primary button; inherits .pic-events-btn. */
.pic-events-dropzone__choose {
	display: inline-block;
	min-width: 14rem;
	text-align: center;
}

/* Keyboard focus lands on the hidden input, so surface it on the label. */
.pic-events-dropzone__input:focus-visible + .pic-events-dropzone__choose {
	outline: 2px solid var(--pic-events-accent);
	outline-offset: 2px;
}

.pic-events-dropzone__or {
	margin: 0;
	color: var(--pic-events-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.85rem;
}

.pic-events-dropzone__specs {
	margin: 0;
	line-height: 1.5;
}

/* Reset the browser's default fieldset chrome (border/padding). */
.pic-events-root fieldset {
	min-width: 0;
	padding: 0;
	border: 0;
}

.pic-events-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-right: 1rem;
	font-size: 0.9rem;
	font-weight: 400;
}

/* Checkbox rows — all-day toggle, category list. */
.pic-events-check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
	font-weight: 400;
}

/* Date / time rows (Step 2). */
.pic-events-daterow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.pic-events-daterow__label {
	flex: 0 0 4rem;
	font-weight: 600;
}

.pic-events-daterow input {
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	background: #fff;
	font: inherit;
}

.pic-events-daterow input[hidden] {
	display: none;
}

.pic-events-daterow__at {
	color: var(--pic-events-muted);
}

.pic-events-daterow__at[hidden] {
	display: none;
}

.pic-events-datesummary {
	margin: 0 0 1.25rem;
	font-style: italic;
	color: var(--pic-events-muted);
}

.pic-events-datesummary[hidden] {
	display: none;
}

/* Event series / recurrence accordion (Step 2). */
.pic-events-series__title {
	display: inline-block;
	margin-right: 1rem;
	font-weight: 600;
}

.pic-events-series__panel {
	position: relative;
	margin: 0 0 1.25rem;
	padding: 1.25rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	background: #fff;
}

.pic-events-series__panel[hidden] {
	display: none;
}

.pic-events-series__remove {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	padding: 0.4rem 0.6rem;
	border: 0;
	border-radius: 2px;
	background: #b32d2e;
	color: #fff;
	cursor: pointer;
}

.pic-events-series__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.pic-events-series__row > label {
	flex: 0 0 5rem;
	margin: 0;
}

.pic-events-series__row[hidden],
.pic-events-series__row span[hidden],
.pic-events-series__row input[hidden] {
	display: none;
}

.pic-events-series__interval {
	width: 4rem;
	padding: 0.5rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	font: inherit;
}

.pic-events-weekdays {
	display: inline-flex;
	gap: 0.35rem;
}

.pic-events-weekday input {
	position: absolute;
	opacity: 0;
}

.pic-events-weekday span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	cursor: pointer;
}

.pic-events-weekday input:checked + span {
	border-color: var(--pic-events-accent);
	background: var(--pic-events-accent);
	color: var(--pic-events-accent-ink);
}

/* Hints, errors, success. */
.pic-events-hint {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.85rem;
	color: var(--pic-events-muted);
}

.pic-events-formerror {
	margin: 0 0 1rem;
	padding: 0.6rem 0.8rem;
	border-left: 3px solid #b32d2e;
	background: #fcf0f0;
	color: #8a1f1f;
}

.pic-events-formerror[hidden],
.pic-events-done[hidden],
.pic-events-form[hidden] {
	display: none;
}

.pic-events-done {
	padding: 2rem 1rem;
	text-align: center;
}

/* "Add a venue/organizer" toggle + the create fieldset. */
.pic-events-link {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0;
	border: 0;
	background: none;
	color: var(--pic-events-accent);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.pic-events-root .pic-events-newentity {
	margin: 0 0 1.25rem;
	padding: 1rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	background: #fff;
}

.pic-events-newentity[hidden] {
	display: none;
}

.pic-events-newentity legend {
	font-weight: 600;
}

.pic-events-newentity input {
	width: 100%;
	margin-bottom: 0.5rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	background: #fff;
	font: inherit;
}

/* Step 4 token / pill search. */
.pic-events-tokenfield {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	min-height: 2.6rem;
	padding: 0.4rem 0.5rem;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	background: #fff;
}

.pic-events-tokeninput {
	flex: 1 1 8rem;
	min-width: 8rem;
	padding: 0.3rem;
	border: 0;
	font: inherit;
}

.pic-events-tokeninput:focus {
	outline: none;
}

.pic-events-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.5rem;
	border-radius: 2px;
	background: var(--pic-events-muted);
	color: #fff;
	font-size: 0.85rem;
}

.pic-events-pill__x {
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.pic-events-suggestions {
	max-height: 12rem;
	margin: 0.25rem 0 0;
	padding: 0;
	overflow-y: auto;
	border: 1px solid var(--pic-events-line);
	border-radius: 2px;
	background: #fff;
	list-style: none;
}

.pic-events-suggestions[hidden] {
	display: none;
}

.pic-events-suggestions li {
	padding: 0.5rem 0.75rem;
	cursor: pointer;
}

.pic-events-suggestions li:hover {
	background: var(--pic-events-surface);
}

.pic-events-suggestions__add {
	font-weight: 600;
	color: var(--pic-events-accent);
}

.pic-events-suggestions__add[hidden] {
	display: none;
}

/* Navigation & buttons ------------------------------------------------- */
/* Primary action sits right (per the mock-ups). `space-between` put a lone
   Next button on the LEFT; pushing Back out with an auto margin keeps the
   Back/Next pairing correct on later steps without special-casing step 1. */
.pic-events-nav {
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
	margin-top: 1.5rem;
}

.pic-events-nav .pic-events-btn--ghost {
	margin-right: auto;
}

.pic-events-btn {
	padding: 0.7rem 1.6rem;
	border: 0;
	border-radius: 2px;
	background: var(--pic-events-accent);
	color: var(--pic-events-accent-ink);
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	cursor: pointer;
}

.pic-events-btn[hidden] {
	display: none;
}

/* Cloudflare Turnstile sits above the submit row on the last step. */
.pic-events-turnstile {
	margin: 1rem 0 0.5rem;
}

.pic-events-turnstile[hidden] {
	display: none;
}

.pic-events-btn--primary {
	flex: 1 1 auto;
}

.pic-events-btn--ghost {
	background: transparent;
	border: 1px solid var(--pic-events-accent);
	color: var(--pic-events-accent);
}

.pic-events-btn:disabled {
	opacity: 0.6;
	cursor: progress;
}

.tribe-community-events textarea,
.pic-events-description {
	width: 100% !important;
}

/* Mobile-first: stack the stepper labels tighter on small screens. */
@media (max-width: 600px) {

	.pic-events-root {
		padding: 1.25rem 1rem;
	}

	.pic-events-step__label {
		font-size: 0.7rem;
	}
}

.events-add-login-register {
	height: 50px;
}
@media (min-width: 782px) {
	   .tribe-community-events {
    padding: 0px !important;
    }
}
.event-register-form [id^="gform_wrapper_"]  {
	padding: 1.5rem;
}
.tribe-community-events {
    border: none !important;
}

@media (max-width: 500px) {
	#tribe-events-pg-template,
	.tribe-community-events {
		padding: 0px !important;
	}
	.pic-events-step.is-active .pic-events-step__label,
	.pic-events-step__label {
		font-size: 0.6rem !important;
		line-height: 1;
	}
}