/* Casa Weenie Tag Search */
.cwts {
	position: relative;
	margin: 0 0 1.5em;
}

.cwts__title {
	display: block;
	margin: 0 0 8px;
	font-weight: 700;
}

.cwts__field {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	background: #fafafa;
	cursor: text;
}

.cwts__field:focus-within {
	border-color: #ff8c00;
	box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.25);
	background: #fff;
}

.cwts__chips {
	display: contents;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cwts input.cwts__input {
	flex: 1 1 140px;
	min-width: 0;
	margin: 0;
	padding: 6px 4px;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 16px;
	line-height: 1.4;
	outline: none;
	-webkit-appearance: none;
}

.cwts-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 3px 8px;
	border-radius: 999px;
	background: #ff8c00;
	color: #111;
	font-size: 14px;
	line-height: 1.3;
	list-style: none;
}

.cwts .cwts-chip__x {
	margin: 0;
	padding: 0 2px;
	border: 0;
	background: transparent;
	color: #111;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

.cwts__list {
	position: absolute;
	z-index: 50;
	left: 0;
	right: 0;
	max-height: 320px;
	margin: 4px 0 0;
	padding: 4px 0;
	overflow-y: auto;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	list-style: none;
}

.cwts__list [role="option"] {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	padding: 8px 12px;
	cursor: pointer;
}

.cwts__list [role="option"]:hover,
.cwts__list [aria-selected="true"] {
	background: #fff1de;
}

.cwts__empty {
	margin: 0;
	padding: 8px 12px;
	color: #666;
	font-size: 14px;
}

.cwts-count {
	color: #777;
	font-size: 0.85em;
}

.cwts-chip .cwts-count {
	color: #4a3200;
}

.cwts__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 10px;
}

.cwts__actions[hidden],
.cwts__match[hidden],
.cwts__list[hidden] {
	display: none;
}

.cwts__match {
	font-size: 14px;
}

.cwts__match label {
	margin-right: 10px;
	font-weight: 400;
	white-space: nowrap;
}

.cwts .cwts__go {
	margin: 0;
	padding: 8px 18px;
	border: 0;
	border-radius: 4px;
	background: #111;
	color: #fff;
	font-size: 15px;
	cursor: pointer;
}

.cwts .cwts__go:hover,
.cwts .cwts__go:focus {
	background: #ff8c00;
	color: #111;
}

.cwts__hint {
	margin: 6px 0 0;
	color: #777;
	font-size: 13px;
}

/* "Matching tags" row on the search results page */
.cwts-matches {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 24px;
	padding: 12px 14px;
	border-radius: 4px;
	background: #fff6ea;
}

.cwts-matches__label {
	margin-right: 4px;
	font-weight: 700;
}

a.cwts-chip--link,
a.cwts-chip--link:visited {
	color: #111;
	text-decoration: none;
}

a.cwts-chip--link:hover,
a.cwts-chip--link:focus {
	background: #111;
	color: #fff;
}

a.cwts-chip--link:hover .cwts-count,
a.cwts-chip--link:focus .cwts-count {
	color: #ddd;
}

/* Keep theme button and form styles from leaking into the small controls */
.cwts .cwts-chip__x,
.cwts .cwts-chip__x:hover,
.cwts .cwts-chip__x:focus {
	width: auto;
	height: auto;
	min-height: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #111;
	-webkit-appearance: none;
	appearance: none;
}

.cwts .cwts__match input[type="radio"] {
	width: auto;
	height: auto;
	margin: 0 4px 0 0;
	vertical-align: middle;
}

.cwts .cwts__chips > li.cwts-chip,
.cwts .cwts__list > li {
	margin: 0;
}

/* Heading and box on the Search page */
.cwts-page {
	max-width: 560px;
	margin: 0;
	padding: 40px 40px 20px;
}

.cwts-page .cwts-page__heading {
	margin: 0 0 32px;
}

.cwts .cwts__go {
	margin-left: auto;
}
