/*
 * Workshop & data-recovery pages — service page and intake forms.
 *
 * Scoped to `.nx-workshop` and `.nx-form`, and enqueued on those two templates
 * only (registered in inc/enqueue.php, enqueued from inc/workshop/api.php), so
 * nothing here is shipped to a shop page.
 *
 * LOGICAL PROPERTIES THROUGHOUT. The storefront is Hebrew-first and RTL, and a
 * physical `margin-left` is the kind of detail that looks fine in the default
 * language and breaks in the other two. Everything below uses
 * margin-inline / padding-inline / border-inline-*, and the few places that
 * genuinely need a side (the numbered step disc) are positioned with
 * `inset-inline-start`.
 *
 * COLOUR COMES FROM THE PALETTE TOKENS ONLY, never from a literal: the theme
 * ships three palettes and the owner can switch between them, so a hardcoded
 * green would be the one element that ignores the toggle. `--accent` is a fill
 * and `--accent-text` is the written form of the same colour — using `--accent`
 * for type is a contrast failure the palette gate already documents.
 */

/* --- Page shell ------------------------------------------------------- */

.nx-workshop {
	max-width: var(--max-w);
	margin-inline: auto;
	padding-block: clamp(1.5rem, 4vw, 3rem);
}

.nx-workshop__hero {
	margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
}

.nx-workshop__title {
	margin: 0 0 0.75rem;
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	line-height: 1.15;
	color: var(--text-bright);
}

.nx-workshop__lead {
	margin: 0 0 1.25rem;
	max-width: 60ch;
	font-size: clamp(1rem, 1.6vw, 1.15rem);
	line-height: 1.7;
	color: var(--text-dim);
}

.nx-workshop__cta {
	margin: 0;
}

.nx-workshop__intro {
	margin-block-end: clamp(1.5rem, 3vw, 2.25rem);
	max-width: 68ch;
	line-height: 1.8;
	color: var(--text);
}

/* The page body is owner-editable, so it may contain anything WordPress
   allows: images, lists, headings. Only the spacing is normalised here. */
.nx-workshop__intro > * + * {
	margin-block-start: 1rem;
}

.nx-workshop__block {
	margin-block-end: clamp(1.75rem, 3.5vw, 3rem);
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.nx-workshop__block--recovery {
	background: var(--surface-2);
	border-color: var(--border-light);
}

.nx-workshop__heading {
	margin: 0 0 0.85rem;
	font-family: var(--font-display);
	font-size: clamp(1.2rem, 2.2vw, 1.6rem);
	line-height: 1.25;
	color: var(--text-bright);
}

.nx-workshop__note {
	margin-block-start: 1rem;
	font-size: 0.925rem;
	line-height: 1.7;
	color: var(--text-dim);
}

/* --- Device / media list ---------------------------------------------- */

/*
 * Icons over labels — NOT pills.
 *
 * Valery, 2026-11-10: "אתזה אני לא רוצה ככה, זה נראה כמו כפתורים אבל לא לחיצים,
 * תשנה את זה לטקסט כמו של כותרת ואייקון מעל".
 *
 * The old rule drew a bordered card with an accent bar per item, which reads as
 * a button — and nothing in this list is clickable. So the box, the border, the
 * background and the accent bar are all gone; what is left is an icon above a
 * label that reads like a small heading. Nothing may look pressable here.
 */
.nx-workshop__devices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
	gap: 1.5rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: center;
}

.nx-workshop__device {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.55rem;
}

.nx-workshop__device-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent-text);
}

.nx-workshop__device-label {
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--text-bright);
}

/* --- Four steps ------------------------------------------------------- */

.nx-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: nx-step;
}

.nx-steps__item {
	position: relative;
	padding: 1rem;
	padding-inline-start: 3.25rem;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.nx-steps__num {
	position: absolute;
	inset-block-start: 1rem;
	inset-inline-start: 1rem;
	display: grid;
	place-items: center;
	inline-size: 1.75rem;
	block-size: 1.75rem;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--on-accent);
	background: var(--accent);
	border-radius: 50%;
}

.nx-steps__title {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
	color: var(--text-bright);
}

.nx-steps__text {
	margin: 0;
	font-size: 0.925rem;
	line-height: 1.65;
	color: var(--text-dim);
}

/* --- Recovery care list ----------------------------------------------- */

.nx-workshop__care {
	margin: 0;
	padding-inline-start: 1.15rem;
	line-height: 1.75;
	color: var(--text);
}

.nx-workshop__care li + li {
	margin-block-start: 0.5rem;
}

.nx-workshop__care li::marker {
	color: var(--accent-text);
}

/* --- FAQ -------------------------------------------------------------- */

.nx-faq {
	border-block-end: 1px solid var(--border);
}

.nx-faq__q {
	padding-block: 0.85rem;
	cursor: pointer;
	font-weight: 600;
	color: var(--text-bright);
}

.nx-faq__q:focus-visible {
	outline: 2px solid var(--accent-ring);
	outline-offset: 3px;
}

.nx-faq__a {
	margin: 0 0 1rem;
	max-width: 66ch;
	line-height: 1.75;
	color: var(--text-dim);
}

/* --- Form ------------------------------------------------------------- */

.nx-form {
	margin-block-start: 0.5rem;
}

.nx-form__group {
	margin: 0 0 1.5rem;
	padding: 1rem;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.nx-form__legend {
	padding-inline: 0.5rem;
	font-weight: 600;
	color: var(--text-bright);
}

.nx-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 0 1rem;
}

.nx-form__label {
	font-size: 0.9rem;
	color: var(--text-dim);
}

.nx-form__input {
	inline-size: 100%;
	min-block-size: 2.75rem;
	padding-block: 0.6rem;
	padding-inline: 0.75rem;
	font-family: inherit;
	font-size: 1rem;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-sm);
}

.nx-form__input--area {
	min-block-size: 6rem;
	line-height: 1.6;
	resize: vertical;
}

.nx-form__input:focus-visible {
	outline: 2px solid var(--accent-ring);
	outline-offset: 2px;
}

/* An invalid field is marked by its message AND its border: colour alone is
   not a signal everybody receives. */
.nx-form__input[aria-invalid="true"] {
	border-color: var(--danger);
}

.nx-form__error {
	font-size: 0.875rem;
	color: var(--danger);
}

.nx-form__field--consent {
	margin-block-start: 0.5rem;
}

.nx-form__check {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: 0.925rem;
	line-height: 1.6;
	color: var(--text);
}

.nx-form__check input {
	margin-block-start: 0.2rem;
	flex: 0 0 auto;
	inline-size: 1.15rem;
	block-size: 1.15rem;
	accent-color: var(--accent);
}

.nx-form__notice {
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--text-dim);
	background: var(--accent-subtle);
	border-inline-start: 3px solid var(--accent);
	border-radius: var(--radius-sm);
}

.nx-form__notice--secrets {
	background: var(--surface-2);
	border-inline-start-color: var(--warning);
	color: var(--text);
}

.nx-form__actions {
	margin: 1.25rem 0 0;
}

.nx-form__status:empty {
	display: none;
}

.nx-form__status {
	margin-block-start: 1rem;
	font-size: 0.95rem;
	line-height: 1.6;
}

.nx-form__status.is-ok {
	color: var(--ok-text);
}

.nx-form__status.is-error {
	color: var(--danger);
}

.nx-form__result {
	margin-block-end: 1.25rem;
	padding: 0.9rem 1rem;
	border-radius: var(--radius-sm);
	border-inline-start: 3px solid var(--accent);
	background: var(--accent-subtle);
	color: var(--text);
}

.nx-form__result p {
	margin: 0;
	line-height: 1.7;
}

.nx-form__result--bad {
	background: var(--surface-2);
	border-inline-start-color: var(--danger);
}

/* --- Two columns on a wide screen, one on a phone --------------------- */

@media (min-width: 720px) {
	.nx-form__group {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 1.25rem;
	}

	.nx-form__field--wide,
	.nx-form__field--consent {
		grid-column: 1 / -1;
	}

	/* The legend has to span too, or it becomes a grid cell of its own. */
	.nx-form__legend {
		grid-column: 1 / -1;
	}
}
