/* Adams WhatsApp UTM Builder
   Built on top of the site's own design tokens (Blocksy "theme-palette"
   custom properties) so it stays in sync with the brand colors set in
   Customizer > Colors, rather than hard-coding a separate palette. */

.awub {
	--awub-red: var(--theme-palette-color-1, #DA1F30);
	--awub-grey-light: var(--theme-palette-color-2, #F2F2F2);
	--awub-black: var(--theme-palette-color-3, #0A0A0A);
	--awub-white: var(--theme-palette-color-4, #ffffff);
	--awub-text: var(--theme-palette-color-5, #424242);
	--awub-grey-lighter: var(--theme-palette-color-6, #F6F6F6);

	--awub-border: var(--theme-form-field-border-initial-color, #c4c4c4);
	--awub-border-focus: var(--theme-form-field-border-focus-color, #383838);
	--awub-radius: var(--theme-button-border-radius, 3px);

	--awub-font-heading: 'Stack Sans Headline', Arial, sans-serif;
	--awub-font-body: 'Inter', Arial, sans-serif;

	max-width: 1350px;
	margin: 40px auto;
	padding: 0 16px;
	box-sizing: border-box;
	font-family: var(--awub-font-body);
	color: var(--awub-text);
}

.awub *,
.awub *::before,
.awub *::after {
	box-sizing: border-box;
}

.awub__card {
	background: var(--awub-white);
	border: 1px solid var(--awub-grey-light);
	border-radius: 8px;
	padding: 32px;
	box-shadow: 0 2px 20px rgba(10, 10, 10, 0.06);
}

@media (max-width: 480px) {
	.awub__card {
		padding: 24px 18px;
	}
}

.awub__section + .awub__section {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--awub-grey-light);
}

/* Desktop: "Your link" and "Tagged link" sit side by side in one row
   instead of stacked. The first section spans the full row until a
   tagged link has been generated, then makes room for the result column. */
@media (min-width: 900px) {
	.awub__card {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}

	.awub__card > .awub__error {
		grid-column: 1 / -1;
	}

	.awub__section:first-child {
		grid-column: 1 / -1;
		padding-right: 32px;
	}

	.awub__card:has(#awub-result:not([hidden])) .awub__section:first-child {
		grid-column: 1 / 2;
	}

	.awub__section + .awub__section {
		margin-top: 0;
		padding-top: 0;
		border-top: none;
		padding-left: 32px;
		border-left: 1px solid var(--awub-grey-light);
	}
}

.awub__section-title {
	font-family: var(--awub-font-heading);
	font-weight: 500;
	font-size: 20px;
	line-height: 1.3;
	color: var(--awub-black);
	margin: 0 0 18px;
}

.awub__subtitle {
	font-family: var(--awub-font-heading);
	font-weight: 500;
	font-size: 15.5px;
	line-height: 1.3;
	color: var(--awub-black);
	margin: 22px 0 16px;
	padding-top: 22px;
	border-top: 1px dashed var(--awub-grey-light);
}

.awub__field-group {
	margin-bottom: 18px;
}

.awub__field-group:last-of-type {
	margin-bottom: 22px;
}

.awub__two-col {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 18px;
}

@media (min-width: 560px) {
	.awub__two-col {
		grid-template-columns: 1fr 1fr;
	}
}

.awub__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--awub-black);
	margin-bottom: 8px;
}

.awub__optional {
	font-weight: 400;
	color: var(--awub-text);
	opacity: 0.65;
}

.awub__hint {
	margin: 8px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--awub-text);
	opacity: 0.7;
}

.awub__hint code {
	background: var(--awub-grey-lighter);
	border-radius: 3px;
	padding: 1px 5px;
	font-size: 12px;
}

.awub__select,
.awub__input,
.awub__textarea {
	width: 100%;
	font-family: var(--awub-font-body);
	font-size: 16px;
	color: var(--awub-black);
	background: var(--awub-white);
	border: 1px solid var(--awub-border);
	border-radius: var(--awub-radius);
	padding: 11px 14px;
	min-height: 46px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.awub__textarea {
	resize: vertical;
	min-height: 72px;
	line-height: 1.5;
}

.awub__select:focus,
.awub__input:focus,
.awub__textarea:focus {
	outline: none;
	border-color: var(--awub-border-focus);
	box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}

.awub__input.is-invalid,
.awub__select.is-invalid {
	border-color: var(--awub-red);
}

/* Segmented toggle group (Shared in: Chat / Group / Status / Broadcast list / Business API) */

.awub__toggle-group {
	display: flex;
	flex-wrap: wrap;
	border: 1px solid var(--awub-border);
	border-radius: var(--awub-radius);
	overflow: hidden;
}

.awub__toggle-btn {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	border-right: 1px solid var(--awub-border);
	background: var(--awub-white);
	color: var(--awub-text);
	font-family: var(--awub-font-body);
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding: 10px 12px;
	cursor: pointer;
	flex: 1 1 auto;
	min-width: 90px;
	transition: background .15s ease, color .15s ease;
}

.awub__toggle-btn:last-child {
	border-right: none;
}

.awub__toggle-btn:hover {
	background: var(--awub-grey-lighter);
}

.awub__toggle-btn.is-active {
	background: var(--awub-red);
	color: var(--awub-white);
}

.awub__toggle-btn.is-active:hover {
	background: var(--awub-red);
}

@media (max-width: 480px) {
	.awub__toggle-btn {
		min-width: 45%;
		border-bottom: 1px solid var(--awub-border);
	}
}

/* Lowercase/hyphenate checkbox */

.awub__checkbox-row {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--awub-black);
	margin-bottom: 22px;
	cursor: pointer;
}

.awub__checkbox-row input {
	width: 17px;
	height: 17px;
	accent-color: var(--awub-red);
	flex: 0 0 auto;
}

/* Buttons */

.awub__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--awub-font-heading);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border-radius: var(--awub-radius);
	min-height: 45px;
	padding: 10px 24px;
	border: 2px solid transparent;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
	white-space: nowrap;
}

.awub__btn:active {
	transform: translateY(1px);
}

.awub__btn--full {
	width: 100%;
}

.awub__btn--primary {
	background-color: var(--awub-red);
	border-color: var(--awub-red);
	color: var(--awub-white);
}

.awub__btn--primary:hover {
	background-color: var(--awub-black);
	border-color: var(--awub-black);
	color: var(--awub-white);
}

.awub__btn--outline {
	background-color: transparent;
	border-color: var(--awub-red);
	color: var(--awub-red);
}

.awub__btn--outline:hover {
	background-color: var(--awub-red);
	color: var(--awub-white);
}

.awub__btn--copied {
	background-color: var(--awub-black) !important;
	border-color: var(--awub-black) !important;
}

/* Result */

.awub__link-row {
	display: flex;
	gap: 10px;
}

.awub__link-output {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--awub-font-body);
	font-size: 13.5px;
	color: var(--awub-text);
	background: var(--awub-grey-lighter);
	border: 1px solid var(--awub-grey-light);
	border-radius: var(--awub-radius);
	padding: 11px 14px;
	min-height: 46px;
}

.awub__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.awub__actions .awub__btn {
	flex: 1 1 auto;
}

/* Error */

.awub__error {
	margin: 16px 0 0;
	padding: 12px 14px;
	border-radius: var(--awub-radius);
	background: rgba(218, 31, 48, 0.08);
	border: 1px solid rgba(218, 31, 48, 0.25);
	color: var(--awub-red);
	font-size: 14px;
	line-height: 1.5;
}

@media (max-width: 420px) {
	.awub__actions {
		flex-direction: column;
	}
}
