/* Treatwell Booking Widget — scoped styles */

.twbw-widget {
	background: #F9F7F4;
	padding: 24px;
	border-radius: 8px;
}

.twbw {
	--twbw-accent: #1859f1;
	--twbw-accent-hover: #1247c9;
	--twbw-text: #071948;
	--twbw-muted: #6b7280;
	--twbw-border: #e3e0db;
	--twbw-bg: #fff;
	--twbw-hover-bg: #f3f4f6;
	--twbw-active-bg: #efece6;
	--twbw-radius: 8px;

	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 14px;
	color: var(--twbw-text);
	line-height: 1.4;
}

.twbw-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.twbw-label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.twbw-combo {
	position: relative;
}

.twbw-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 30px 10px 38px;
	border: 1px solid var(--twbw-border);
	border-radius: var(--twbw-radius);
	background-color: var(--twbw-bg);
	background-repeat: no-repeat;
	background-position: 12px 50%;
	background-size: 18px 18px;
	font: inherit;
	color: inherit;
	line-height: 1.4;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.twbw-input:focus {
	outline: none;
	border-color: var(--twbw-accent);
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.twbw-input--error,
.twbw-input--error:focus {
	border-color: #d02b0b !important;
	box-shadow: 0 0 0 3px rgba(208, 43, 11, 0.15);
}

.twbw-input-treatment {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280' aria-hidden='true'><path d='M17.707 16.293l4 4-1.414 1.414-4-4 1.414-1.414zM10 2a8 8 0 110 16 8 8 0 010-16zm0 2a6 6 0 100 12 6 6 0 000-12z' fill-rule='evenodd'/></svg>");
}

.twbw-input-location {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280' aria-hidden='true'><path d='M12 2c4.552 0 8 3.448 8 8 0 1.075-.393 2.43-1.017 3.84l-.245.53-.13.266-.273.533-.143.266-.298.53-.312.525C15.78 19.44 13.397 22 12 22c-1.397 0-3.78-2.559-5.582-5.51l-.312-.525-.298-.53a23.393 23.393 0 01-.143-.266l-.273-.533a21.52 21.52 0 01-.13-.266l-.245-.53C4.394 12.43 4 11.074 4 10c0-4.552 3.448-8 8-8zm0 2c-3.448 0-6 2.552-6 6 0 1.567 1.084 4.018 2.759 6.43l.297.417.3.402.302.386.298.366.292.344.282.32.268.29.25.262.118.118.22.21.192.175c.209.18.358.28.422.28.055 0 .172-.073.336-.208l.179-.154.206-.193.113-.11.24-.245.26-.277.136-.149.282-.319.292-.344.298-.366.301-.386.301-.402.297-.417C16.916 14.018 18 11.567 18 10c0-3.448-2.552-6-6-6zm0 4a2 2 0 110 4 2 2 0 010-4z' fill-rule='evenodd'/></svg>");
}

/* !important: il parent theme ha regole molto specifiche su `button` */
.twbw-clear,
.twbw-clear:hover,
.twbw-clear:focus,
.twbw-clear:active {
	position: absolute !important;
	right: 8px !important;
	top: 50% !important;
	left: auto !important;
	bottom: auto !important;
	transform: translateY(-50%) !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	color: var(--twbw-muted) !important;
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
	text-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0 !important;
}

.twbw-clear[hidden] {
	display: none !important;
}

.twbw-clear:hover {
	color: var(--twbw-text) !important;
}

.twbw-list {
	position: absolute;
	z-index: 50;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 280px;
	overflow-y: auto;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: var(--twbw-bg);
	border: 0;
	border-radius: var(--twbw-radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.twbw-list[hidden] {
	display: none;
}

/* Reset list-style/margin/border ereditati dal parent. NB: usare
   background-color (non shorthand) per non cancellare le icone su .twbw-option. */
.twbw-list li {
	margin: 0;
	border: 0;
	background-color: transparent;
	list-style: none;
}

.twbw-list .twbw-option {
	padding: 7px 12px 7px 34px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.3;
	background-repeat: no-repeat;
	background-position: 12px 50%;
	background-size: 16px 16px;
}

.twbw-option:hover,
.twbw-option.twbw-active {
	background-color: var(--twbw-active-bg);
}

.twbw-option-treatment_category,
.twbw-option-venue_type {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%236b7280'><path stroke-linecap='round' stroke-linejoin='round' d='M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z'/><path stroke-linecap='round' stroke-linejoin='round' d='M6 6h.008v.008H6V6Z'/></svg>");
}

.twbw-option-venue {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%236b7280'><path stroke-linecap='round' stroke-linejoin='round' d='M8.25 21v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21m0 0h4.5V3.545M12.75 21h7.5V10.75M2.25 21h1.5m18 0h-18M2.25 9l4.5-1.636M18.75 3l-1.5.545m0 6.205 3 1m1.5.5-1.5-.5M6.75 7.364V3h-3v18m3-13.636 10.5-3.819'/></svg>");
}

.twbw-empty {
	padding: 8px 12px;
	color: var(--twbw-muted);
	font-style: italic;
	cursor: default;
}

.twbw-group {
	padding: 8px 12px 4px;
	font-size: 16px;
	font-weight: 600;
	color: var(--twbw-text);
	cursor: default;
}

.twbw-group:not(:first-child) {
	margin-top: 4px;
	border-top: 1px solid #ece9e3;
	padding-top: 8px;
}

.twbw-status {
	margin-top: 0;
	font-size: 12px;
	color: #b91c1c;
	text-align: center;
}

.twbw-status:empty {
	display: none;
}

.twbw-submit,
.twbw-submit:disabled {
	padding: 12px 16px;
	border: 0;
	border-radius: var(--twbw-radius);
	background: var(--twbw-accent) !important;
	color: #fff !important;
	font-size: 16px;
	font-family: TreatwellSans, sans-serif;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s;
	opacity: 1;
}

.twbw-submit:hover {
	background: var(--twbw-accent-hover) !important;
}