/* Adams Website Chat Button
   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.
   Shares the same token names/pattern as the WhatsApp Link Generator
   and QR Code Generator tools for visual consistency. */

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

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

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

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

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

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

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

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

/* Desktop: the inputs and the preview/code sit side by side in one row. */
@media (min-width: 900px) {
	.awcb__card {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}

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

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

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

.awcb__field-group:last-of-type {
	margin-bottom: 0;
}

.awcb__label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

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

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

.awcb__char-count {
	font-size: 12px;
	color: var(--awcb-text);
	opacity: 0.65;
	white-space: nowrap;
}

.awcb__char-count.is-near-limit {
	color: var(--awcb-red);
	opacity: 1;
}

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

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

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

.awcb__select {
	flex: 0 0 150px;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23424242' stroke-width='1.6' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 30px;
}

.awcb__select--full {
	flex: 1 1 auto;
	width: 100%;
}

.awcb__input {
	flex: 1 1 auto;
	min-width: 0;
}

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

.awcb__textarea {
	resize: vertical;
	min-height: 80px;
	line-height: 1.5;
}

.awcb__select:focus,
.awcb__input:focus,
.awcb__textarea:focus {
	outline: none;
	border-color: var(--awcb-border-focus);
	box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}

.awcb__input.is-invalid,
.awcb__select.is-invalid {
	border-color: var(--awcb-red);
}

/* Link-style button (e.g. "Copy Monday to weekdays") */

.awcb__link-btn {
	background: none;
	border: none;
	padding: 0;
	font-family: var(--awcb-font-body);
	font-size: 13px;
	font-weight: 600;
	color: var(--awcb-red);
	cursor: pointer;
	text-decoration: underline;
	white-space: nowrap;
}

.awcb__link-btn:hover {
	color: var(--awcb-black);
}

/* Opening hours table */

.awcb__hours-table {
	display: flex;
	flex-direction: column;
	gap: 10px;
	border: 1px solid var(--awcb-grey-light);
	border-radius: var(--awcb-radius);
	padding: 14px;
	background: var(--awcb-grey-lighter);
}

.awcb__hours-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.awcb__day-label {
	flex: 0 0 90px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--awcb-black);
}

.awcb__closed-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--awcb-text);
	cursor: pointer;
	flex: 0 0 auto;
}

.awcb__closed-toggle input {
	accent-color: var(--awcb-red);
	width: 15px;
	height: 15px;
}

.awcb__time-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
}

.awcb__time-row[hidden] {
	display: none;
}

.awcb__time-input {
	font-family: var(--awcb-font-body);
	font-size: 13.5px;
	color: var(--awcb-black);
	background: var(--awcb-white);
	border: 1px solid var(--awcb-border);
	border-radius: var(--awcb-radius);
	padding: 6px 8px;
	min-height: 36px;
	flex: 1 1 100px;
	min-width: 0;
}

.awcb__time-input:focus {
	outline: none;
	border-color: var(--awcb-border-focus);
}

.awcb__time-sep {
	font-size: 12.5px;
	color: var(--awcb-text);
	opacity: 0.7;
	white-space: nowrap;
}

/* Radios / checkboxes */

.awcb__radio-row {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.awcb__radio-row:last-child {
	margin-bottom: 0;
}

.awcb__radio,
.awcb__checkbox {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13.5px;
	color: var(--awcb-text);
	cursor: pointer;
}

.awcb__radio input,
.awcb__checkbox input {
	accent-color: var(--awcb-red);
	width: 16px;
	height: 16px;
}

.awcb__style-row {
	margin-bottom: 10px;
}

/* Colors */

.awcb__color-row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.awcb__color-field {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.awcb__color-sub-label {
	font-size: 13.5px;
	color: var(--awcb-text);
}

.awcb__color-input {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--awcb-border);
	border-radius: var(--awcb-radius);
	background: none;
	cursor: pointer;
}

/* Buttons */

.awcb__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--awcb-font-heading);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border-radius: var(--awcb-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;
}

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

.awcb__btn--primary {
	background-color: var(--awcb-red);
	border-color: var(--awcb-red);
	color: var(--awcb-white);
}

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

.awcb__btn--outline {
	background-color: transparent;
	border-color: var(--awcb-red);
	color: var(--awcb-red);
}

.awcb__btn--outline:hover {
	background-color: var(--awcb-red);
	color: var(--awcb-white);
}

.awcb__btn--copied {
	background-color: var(--awcb-black) !important;
	border-color: var(--awcb-black) !important;
	color: var(--awcb-white) !important;
}

/* Status row */

.awcb__status-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 0;
}

.awcb__status-row .awcb__label {
	margin-bottom: 0;
}

.awcb__preview-toggle {
	display: inline-flex;
	border: 1px solid var(--awcb-border);
	border-radius: var(--awcb-radius);
	overflow: hidden;
}

.awcb__toggle-btn {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	border-right: 1px solid var(--awcb-border);
	background: var(--awcb-white);
	color: var(--awcb-text);
	font-family: var(--awcb-font-body);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding: 7px 13px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

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

.awcb__toggle-btn:hover {
	background: var(--awcb-grey-lighter);
}

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

.awcb__toggle-btn.is-active:hover {
	background: var(--awcb-red);
}

/* Preview mock browser */

.awcb__preview-frame {
	border: 1px solid var(--awcb-grey-light);
	border-radius: var(--awcb-radius);
	overflow: hidden;
	margin: 14px 0 22px;
}

.awcb__preview-bar {
	background: var(--awcb-grey-lighter);
	border-bottom: 1px solid var(--awcb-grey-light);
	padding: 8px 14px;
	font-size: 12px;
	color: var(--awcb-text);
	opacity: 0.75;
}

.awcb__preview-stage {
	position: relative;
	height: 190px;
	background:
		linear-gradient(0deg, var(--awcb-grey-lighter) 1px, transparent 1px) 0 0 / 100% 38px,
		var(--awcb-white);
}

.awcb__preview-btn {
	position: absolute;
	bottom: 16px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--awcb-red);
	color: var(--awcb-white);
	border-radius: 999px;
	padding: 12px 18px;
	font-family: var(--awcb-font-heading);
	font-weight: 500;
	font-size: 14px;
	box-shadow: 0 4px 14px rgba(10, 10, 10, 0.18);
	transition: right 0.15s ease, left 0.15s ease, border-radius 0.15s ease;
}

.awcb__preview-btn.is-corner-left {
	right: auto;
	left: 16px;
}

.awcb__preview-btn.is-shape-square {
	border-radius: var(--awcb-radius);
}

.awcb__preview-btn.is-icon-only {
	padding: 12px;
}

.awcb__preview-btn.is-hidden {
	display: none;
}

.awcb__preview-icon {
	display: inline-flex;
	flex: 0 0 auto;
}

.awcb__preview-label {
	white-space: nowrap;
}

/* Code output */

.awcb__code-output {
	width: 100%;
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--awcb-black);
	background: var(--awcb-grey-lighter);
	border: 1px solid var(--awcb-grey-light);
	border-radius: var(--awcb-radius);
	padding: 14px;
	resize: vertical;
	min-height: 160px;
}

.awcb__code-output:focus {
	outline: none;
	border-color: var(--awcb-border-focus);
}

.awcb__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.awcb__actions .awcb__btn {
	flex: 1 1 auto;
}

/* Error */

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

@media (max-width: 420px) {
	.awcb__phone-row {
		flex-direction: column;
	}
	.awcb__select {
		flex: 1 1 auto;
	}
	.awcb__actions {
		flex-direction: column;
	}
	.awcb__day-label {
		flex: 1 1 100%;
	}
	.awcb__time-row {
		flex: 1 1 100%;
	}
}
