/* PRAGMA H2: formularze 1.0.0
   Kolory i promienie są zmiennymi CSS, więc motyw może je nadpisać w .ph2f { --ph2f-accent: ...; } */
.ph2f {
	--ph2f-card: #111822;
	--ph2f-surface: #0B1016;
	--ph2f-line: #1E2935;
	--ph2f-field: #070A0E;
	--ph2f-field-line: #2B394A;
	--ph2f-text: #E9EEF5;
	--ph2f-muted: #A3B2C4;
	--ph2f-dim: #7C8DA2;
	--ph2f-accent: #4FD8F0;
	--ph2f-accent-hover: #8BE9FA;
	--ph2f-on-accent: #00161B;
	--ph2f-neg: #FF9A88;
	--ph2f-ok: #7BE0B0;
	--ph2f-radius: 14px;
	--ph2f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	display: grid; gap: 24px; align-items: start; box-sizing: border-box;
	color: var(--ph2f-text); font-size: 16px; line-height: 1.55; text-align: left;
}
.ph2f *, .ph2f *::before, .ph2f *::after { box-sizing: border-box; }
.ph2f [hidden] { display: none !important; }
@media (min-width: 900px) { .ph2f--sum { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); } }
.ph2f.is-done { grid-template-columns: 1fr; }

.ph2f__form, .ph2f__sum, .ph2f__done {
	background: var(--ph2f-card); border: 1px solid var(--ph2f-line); border-radius: var(--ph2f-radius);
	padding: clamp(18px, 2.4vw, 30px);
}
.ph2f__form { display: grid; gap: 18px; min-width: 0; margin: 0; }
.ph2f__title { margin: 0; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; font-weight: 600; color: var(--ph2f-text); }
.ph2f__row { display: grid; gap: 16px; }
@media (min-width: 640px) { .ph2f__row { grid-template-columns: 1fr 1fr; } }

.ph2f__field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; align-content: start; }
.ph2f__field > label, .ph2f__set > legend { padding: 0; font-size: 14.5px; font-weight: 600; color: var(--ph2f-text); }
.ph2f__set > legend { margin-bottom: 6px; }
.ph2f input[type="text"], .ph2f input[type="email"], .ph2f input[type="tel"], .ph2f input[type="number"], .ph2f input[type="date"], .ph2f select, .ph2f textarea {
	width: 100%; min-height: 48px; margin: 0; padding: 12px 14px;
	background: var(--ph2f-field); color: var(--ph2f-text);
	border: 1px solid var(--ph2f-field-line); border-radius: 10px; box-shadow: none;
	font: inherit; font-size: 16px; line-height: 1.4; color-scheme: dark;
}
.ph2f textarea { min-height: 112px; resize: vertical; }
.ph2f input:focus, .ph2f select:focus, .ph2f textarea:focus { outline: 2px solid var(--ph2f-accent); outline-offset: 1px; border-color: var(--ph2f-accent); }
.ph2f__hint { font-size: 13px; color: var(--ph2f-dim); }
.ph2f__msg { display: none; font-size: 13px; font-weight: 600; color: var(--ph2f-neg); }
.is-err > .ph2f__msg { display: block; }
.ph2f__field.is-err input, .ph2f__field.is-err textarea, .ph2f__field.is-err select { border-color: var(--ph2f-neg); }

/* Segmented control */
.ph2f__seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--ph2f-field-line); border-radius: 12px; justify-self: start; }
.ph2f__seg label { position: relative; margin: 0; cursor: pointer; }
.ph2f__seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ph2f__seg span { display: block; padding: 10px 16px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--ph2f-muted); }
.ph2f__seg input:checked + span { background: var(--ph2f-accent); color: var(--ph2f-on-accent); }
.ph2f__seg input:focus-visible + span { outline: 2px solid var(--ph2f-accent); outline-offset: 2px; }

/* Quantity */
.ph2f__qty { display: inline-grid; grid-template-columns: 48px 76px 48px; border: 1px solid var(--ph2f-field-line); border-radius: 12px; overflow: hidden; justify-self: start; }
.ph2f__qty button { min-height: 48px; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--ph2f-surface); color: var(--ph2f-text); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.ph2f__qty button:hover { color: var(--ph2f-accent); }
.ph2f__qty button:focus-visible { outline: 2px solid var(--ph2f-accent); outline-offset: -2px; }
.ph2f .ph2f__qty input { min-height: 48px; padding: 0; border: 0; border-radius: 0; text-align: center; font-family: var(--ph2f-mono); -moz-appearance: textfield; appearance: textfield; }
.ph2f__qty input::-webkit-outer-spin-button, .ph2f__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Consents */
.ph2f__check { display: grid; gap: 4px; }
.ph2f__check label { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin: 0; font-size: 14.5px; font-weight: 400; color: var(--ph2f-muted); cursor: pointer; }
.ph2f__check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ph2f-accent); }
.ph2f__check input:focus-visible { outline: 2px solid var(--ph2f-accent); outline-offset: 3px; }
.ph2f__check .ph2f__msg { padding-left: 34px; }
.ph2f__check.is-err label { color: var(--ph2f-neg); }
.ph2f a { color: var(--ph2f-accent); text-decoration: underline; text-underline-offset: 3px; }
.ph2f a:hover { color: #FFFFFF; }
.ph2f__info, .ph2f__note { margin: 0; font-size: 13.5px; color: var(--ph2f-dim); }
.ph2f__error { margin: 0; padding: 12px 14px; border: 1px solid var(--ph2f-neg); border-radius: 10px; background: rgba(255, 154, 136, .08); color: var(--ph2f-neg); font-size: 14.5px; font-weight: 600; }
.ph2f__trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.ph2f__btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 50px; margin: 0; padding: 0 26px;
	border: 1px solid transparent; border-radius: 999px; background: var(--ph2f-accent); color: var(--ph2f-on-accent);
	font: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer; box-shadow: none;
	transition: background-color .2s, box-shadow .2s;
}
.ph2f__btn:hover { background: var(--ph2f-accent-hover); color: var(--ph2f-on-accent); box-shadow: 0 0 28px 2px rgba(79, 216, 240, .45); }
.ph2f__btn:focus-visible { outline: 2px solid var(--ph2f-accent); outline-offset: 3px; }
.ph2f__btn[disabled] { opacity: .65; cursor: progress; box-shadow: none; }

/* Summary */
.ph2f__sum { display: grid; gap: 10px; align-content: start; }
@media (min-width: 900px) { .ph2f__sum { position: sticky; top: 96px; } }
.ph2f__eyebrow { margin: 0; font: 500 12.5px/1.3 var(--ph2f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ph2f-accent); }
.ph2f__total { margin: 0; font: 500 clamp(28px, 3.4vw, 40px)/1.05 var(--ph2f-mono); font-variant-numeric: tabular-nums; color: #FFFFFF; }
.ph2f__sum dl { display: grid; grid-template-columns: 1fr auto; margin: 6px 0 0; }
.ph2f__sum dt, .ph2f__sum dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--ph2f-line); font-size: 15px; }
.ph2f__sum dt { color: var(--ph2f-muted); }
.ph2f__sum dd { padding-left: 16px; text-align: right; font-family: var(--ph2f-mono); font-variant-numeric: tabular-nums; color: #FFFFFF; }

/* Success */
.ph2f__done { display: grid; gap: 8px; border-color: var(--ph2f-ok); background: rgba(123, 224, 176, .06); outline: none; }
.ph2f__done p { margin: 0; color: var(--ph2f-muted); }
.ph2f__done .ph2f__done-t { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; line-height: 1.25; color: var(--ph2f-text); }
.ph2f__done .ph2f__done-ref { font-family: var(--ph2f-mono); color: #FFFFFF; }
.ph2f__done p:empty { display: none; }

@media (prefers-reduced-motion: reduce) { .ph2f__btn { transition: none; } }
@media print { .ph2f__btn, .ph2f__trap { display: none !important; } }
