/* Domestica Trade Portal — dark full-bleed stage, centered white card
   (reference: original site's trade portal login screen). */

/* The theme ships no universal border-box reset: width:100% + padding inputs
   overflowed the card by ~30px, and the stage's own padding overflowed 100vw. */
.dtp, .dtp *, .dtp *::before, .dtp *::after { box-sizing: border-box; }

.dtp {
	/* full-bleed escape from the page template's narrow constrained column:
	   WP's constrained layout clamps children and forces auto margins with
	   !important, so the counter-margins need !important too. */
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding: clamp(3rem, 8vh, 6rem) 1.5rem;
	background:
		radial-gradient(ellipse at 70% 20%, rgba(60, 68, 80, .55), transparent 55%),
		radial-gradient(ellipse at 20% 85%, rgba(40, 46, 56, .5), transparent 50%),
		#101418;
}
.dtp__card {
	max-width: 1140px;
	margin: 0 auto;
	background: #fff;
	border-radius: var(--r-md, 6px);
	padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 5rem);
	text-align: center;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.dtp__title {
	margin: 0 0 1.6rem;
	font-weight: 300;
	font-size: clamp(2rem, 4.6vw, 3.4rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #14181c;
}
.dtp__lede {
	max-width: 60rem;
	margin: 0 auto 1.2rem;
	font-size: 1.15rem;
	color: #2a2f36;
}
.dtp__sub { margin: 1.6rem 0 1.4rem; font-size: 1.05rem; color: #2a2f36; }

.dtp__form { max-width: 1140px; margin: 0 auto; display: grid; gap: 1.1rem; }

/* labelled rows: label + required asterisk, control, inline validation message */
.dtp__field { display: grid; gap: 0.45rem; text-align: left; }
.dtp__label { font-weight: 600; font-size: 0.95rem; color: #2a2f36; }
.dtp__req { color: #C8102E; }
.dtp__error { margin: 0; font-size: 0.9rem; font-weight: 500; color: #B32D2E; }
.dtp__error[hidden] { display: none; }

/* error state — the whole field goes red: border, label, asterisk, message */
.dtp__field.is-error .dtp__input {
	border-color: #D63638;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, .12);
}
.dtp__field.is-error .dtp__input:focus-visible {
	border-color: #D63638;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, .25);
}
.dtp__field.is-error .dtp__label,
.dtp__field.is-error .dtp__req { color: #B32D2E; }
.dtp__input {
	width: 100%;
	padding: 1.05rem 1.1rem;
	font: inherit;
	font-size: 1.05rem;
	color: #14181c;
	background: #fff;
	border: 1px solid #B9BEC5;
	border-radius: var(--r-sm, 4px);
}
.dtp__input::placeholder { color: #9AA1A9; }
.dtp__input:focus-visible { outline: none; border-color: var(--c-brand, #0B63A6); box-shadow: var(--ring, 0 0 0 3px rgba(11, 99, 166, .25)); }
textarea.dtp__input { resize: vertical; }
select.dtp__input:invalid { color: #9AA1A9; }

.dtp__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.95rem 2.2rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	background: var(--c-brand, #0B63A6);
	border: 1px solid var(--c-brand, #0B63A6);
	border-radius: var(--r-sm, 4px);
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.dtp__btn:hover { background: var(--c-brand-ink, #084E85); border-color: var(--c-brand-ink, #084E85); color: #fff; }
.dtp__btn--ghost { background: #fff; color: var(--c-brand, #0B63A6); }
.dtp__btn--submit { justify-self: center; min-width: 240px; }

.dtp__links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 1.8rem 0 0.6rem; }
.dtp__foot { margin: 1.6rem 0 0; font-size: 0.92rem; }
.dtp__foot a { color: #6B747C; }

.dtp__request { max-width: 1140px; margin: 2.2rem auto 0; border-top: 1px solid #E3E8ED; padding-top: 1.6rem; }
.dtp__request summary {
	cursor: pointer;
	font-weight: 650;
	color: var(--c-brand, #0B63A6);
	list-style-position: inside;
}
.dtp__request[open] summary { margin-bottom: 1.4rem; }

.dtp__notice { max-width: 46rem; margin: 0 auto 1.2rem; padding: 0.8rem 1rem; border-radius: var(--r-sm, 4px); font-size: 0.98rem; }
.dtp__notice--ok { background: #EAF7EE; color: #14532D; border: 1px solid #BBE5C8; }
.dtp__notice--err { background: #FDECEC; color: #7F1D1D; border: 1px solid #F5C2C2; }

.dtp__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* the page renders no title of its own; tighten the gap the empty title leaves,
   and clip the 100vw stage (it includes the scrollbar width) */
.page main:has(.dtp) .wp-block-post-title { display: none; }
.page main:has(.dtp) .entry-content, .page main:has(.dtp) .wp-block-post-content { margin-top: 0 !important; }
body:has(.dtp) { overflow-x: clip; }
