.tbcs-widget {
	--tbcs-border: #e2e2e2;
	--tbcs-text-muted: #666;
	--tbcs-accent: #0f5a60;
	--tbcs-accent-contrast: #fff;
	--tbcs-card-bg: #db6b66;
	--tbcs-card-text: #fff;
	--tbcs-green: #37894b;
	--tbcs-green-dark: #2b6e3b;
	--tbcs-orange: #f49f58;
	--tbcs-teal: #0f5a60;
	box-sizing: border-box;
}

.tbcs-widget * {
	box-sizing: border-box;
}

/* Filters */
.tbcs-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 20px;
}

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

.tbcs-filter-field label {
	font-size: 0.85em;
	font-weight: 600;
}

.tbcs-location-status {
	font-size: 0.8em;
	color: var( --tbcs-text-muted );
	margin-left: 8px;
}

.tbcs-status {
	min-height: 1.2em;
	font-size: 0.9em;
	color: var( --tbcs-text-muted );
}

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

.tbcs-widget .tbcs-care-type-select,
.tbcs-widget button.tbcs-use-location,
.tbcs-widget button.tbcs-view-btn {
	height: 42px;
	font-family: inherit;
	font-size: 0.95em;
	line-height: 1.2;
	box-sizing: border-box;
}

.tbcs-widget .tbcs-care-type-select {
	appearance: none;
	-webkit-appearance: none;
	min-width: 220px;
	padding: 0 40px 0 14px;
	border: 1px solid #cfd6d3;
	border-radius: 8px;
	background-color: #fff;
	background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230f5a60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" );
	background-repeat: no-repeat;
	background-position: right 14px center;
	color: #1f2d2a;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.tbcs-widget .tbcs-care-type-select:hover {
	border-color: var( --tbcs-accent );
}

.tbcs-widget .tbcs-care-type-select:focus {
	outline: none;
	border-color: var( --tbcs-accent );
	box-shadow: 0 0 0 3px rgba( 15, 90, 96, 0.2 );
}

.tbcs-widget button.tbcs-use-location {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 18px;
	border: 1px solid var( --tbcs-accent );
	border-radius: 8px;
	background: #fff;
	color: var( --tbcs-accent );
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.tbcs-widget button.tbcs-use-location::before {
	content: "";
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E" ) center / contain no-repeat;
	mask: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E" ) center / contain no-repeat;
}

.tbcs-widget button.tbcs-use-location:hover,
.tbcs-widget button.tbcs-use-location:focus-visible {
	background: var( --tbcs-accent );
	color: var( --tbcs-accent-contrast );
	outline: none;
}

.tbcs-widget button.tbcs-use-location:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* Grid / list toggle */
.tbcs-view-toggle {
	flex-direction: row;
	margin-left: auto;
	gap: 0;
}

.tbcs-widget button.tbcs-view-btn {
	padding: 0 16px;
	border: 1px solid var( --tbcs-border );
	background: #fff;
	color: inherit;
	cursor: pointer;
}

.tbcs-widget button.tbcs-view-btn:first-child {
	border-radius: 8px 0 0 8px;
}

.tbcs-widget button.tbcs-view-btn:last-child {
	border-radius: 0 8px 8px 0;
	border-left: 0;
}

.tbcs-widget button.tbcs-view-btn[aria-pressed="true"] {
	background: var( --tbcs-accent );
	border-color: var( --tbcs-accent );
	color: var( --tbcs-accent-contrast );
}

/* Results layout */
.tbcs-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( min( 100%, 380px ), 1fr ) );
	gap: 20px;
	margin: 0 0 20px;
}

.tbcs-view-list .tbcs-grid {
	grid-template-columns: 1fr;
	gap: 16px;
}

/* Carer card */
.tbcs-widget .tbcs-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 24px;
	border-radius: 28px;
	background: var( --tbcs-card-bg );
	color: var( --tbcs-card-text );
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.08 );
}

.tbcs-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.tbcs-card-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.tbcs-widget .tbcs-card .tbcs-card-name {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin: 0;
	padding: 0;
	font-size: 1.7em;
	font-weight: 700;
	line-height: 1.2;
	color: var( --tbcs-card-text );
	overflow-wrap: anywhere;
}

.tbcs-widget .tbcs-card .tbcs-card-name.tbcs-is-verified {
	padding: 6px 14px;
	border: 1px solid var( --tbcs-green-dark );
	border-radius: 8px;
	background: var( --tbcs-green );
}

.tbcs-id-verified {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.6em;
	font-weight: 600;
	white-space: nowrap;
}

.tbcs-card-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tbcs-pill {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 10px;
	background: var( --tbcs-orange );
	color: #fff;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.2;
	box-shadow: 0 2px 4px rgba( 0, 0, 0, 0.12 );
}

.tbcs-badge {
	display: inline-block;
	font-size: 0.8em;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 999px;
	line-height: 1.3;
}

.tbcs-badge-vetted {
	background: #fff;
	color: var( --tbcs-green-dark );
}

.tbcs-badge-featured {
	position: absolute;
	top: -4px;
	left: 50%;
	transform: translateX( -50% );
	z-index: 2;
	background: #ffce54;
	color: #4a3900;
	box-shadow: 0 2px 4px rgba( 0, 0, 0, 0.2 );
	white-space: nowrap;
}

/* Photo + call to action */
.tbcs-card-photo-wrap {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 6px;
}

.tbcs-card-photo {
	width: 130px;
	height: 130px;
	padding: 4px;
	border: 4px solid var( --tbcs-green );
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
}

.tbcs-card-photo img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.tbcs-card-photo img.tbcs-img-failed {
	display: none;
}

.tbcs-widget a.tbcs-card-cta {
	position: relative;
	z-index: 1;
	margin-top: -20px;
	padding: 10px 20px;
	border-radius: 999px;
	background: var( --tbcs-teal );
	color: #fff;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 4px rgba( 0, 0, 0, 0.2 );
	transition: background-color 0.15s;
}

.tbcs-widget a.tbcs-card-cta:hover,
.tbcs-widget a.tbcs-card-cta:focus-visible {
	background: #0a4348;
	color: #fff;
	outline: none;
}

/* Text under the header row */
.tbcs-widget .tbcs-card p {
	margin: 0;
	color: var( --tbcs-card-text );
}

.tbcs-widget .tbcs-card .tbcs-card-headline {
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tbcs-widget .tbcs-card .tbcs-card-rate {
	font-size: 1em;
}

/* Empty state + pagination */
.tbcs-empty-state {
	padding: 24px;
	text-align: center;
	color: var( --tbcs-text-muted );
	border: 1px dashed var( --tbcs-border );
	border-radius: 8px;
}

.tbcs-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.tbcs-widget .tbcs-pagination button {
	height: 40px;
	padding: 0 18px;
	border: 1px solid var( --tbcs-accent );
	border-radius: 8px;
	background: #fff;
	color: var( --tbcs-accent );
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
}

.tbcs-widget .tbcs-pagination button:hover:not( :disabled ) {
	background: var( --tbcs-accent );
	color: #fff;
}

.tbcs-widget .tbcs-pagination button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Small screens */
@media ( max-width: 480px ) {
	.tbcs-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.tbcs-widget .tbcs-care-type-select {
		min-width: 0;
		width: 100%;
	}

	.tbcs-widget button.tbcs-use-location {
		justify-content: center;
		width: 100%;
	}

	.tbcs-view-toggle {
		margin-left: 0;
	}

	.tbcs-widget .tbcs-card {
		padding: 18px;
		border-radius: 22px;
	}

	.tbcs-widget .tbcs-card .tbcs-card-name {
		font-size: 1.35em;
	}

	.tbcs-card-photo {
		width: 96px;
		height: 96px;
	}

	.tbcs-widget a.tbcs-card-cta {
		padding: 9px 14px;
		font-size: 0.85em;
	}
}

/* Unlock contact panel (whole area is one link) */
.tbcs-widget a.tbcs-unlock {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px 18px;
	border-radius: 12px;
	background: #fff;
	color: var( --tbcs-teal );
	text-decoration: none;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.12 );
	transition: box-shadow 0.15s, transform 0.15s;
}

.tbcs-widget a.tbcs-unlock:hover,
.tbcs-widget a.tbcs-unlock:focus-visible {
	color: var( --tbcs-teal );
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.2 );
	transform: translateY( -1px );
	outline: none;
}

.tbcs-unlock-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	position: relative;
	padding-right: 26px;
}

.tbcs-unlock-title {
	font-size: 1.05em;
	font-weight: 700;
	color: var( --tbcs-teal );
}

.tbcs-unlock-sub {
	font-size: 0.85em;
	color: #5f6b6d;
}

.tbcs-unlock-lock {
	position: absolute;
	top: 2px;
	right: 0;
	color: #8a9496;
}

.tbcs-unlock-action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
}

.tbcs-unlock-btn {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 8px;
	background: var( --tbcs-teal );
	color: #fff;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.2;
}

.tbcs-unlock-note {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85em;
	color: #5f6b6d;
}

.tbcs-unlock-note svg {
	color: var( --tbcs-green );
	flex: 0 0 auto;
}

.tbcs-unlock-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	padding-top: 10px;
	border-top: 1px solid #e3e8e8;
	font-size: 0.8em;
}

.tbcs-unlock-or-word {
	font-weight: 700;
	color: #5f6b6d;
}

.tbcs-unlock-plans {
	font-weight: 700;
	color: var( --tbcs-teal );
	text-decoration: underline;
}

.tbcs-unlock-multi {
	color: #7a8587;
}

@media ( max-width: 480px ) {
	.tbcs-unlock-btn {
		width: 100%;
		text-align: center;
	}
}

/* Location, about text and facts row */
.tbcs-widget .tbcs-card .tbcs-card-location {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1em;
	line-height: 1.3;
}

.tbcs-card-location svg {
	flex: 0 0 auto;
}

.tbcs-widget .tbcs-card .tbcs-card-about {
	font-size: 1em;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.tbcs-widget .tbcs-card .tbcs-card-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 0;
	font-size: 1em;
}

.tbcs-fact + .tbcs-fact {
	margin-left: 14px;
	padding-left: 14px;
	border-left: 2px solid rgba( 255, 255, 255, 0.75 );
}

/* [carer_area_links] list */
.tbcs-area-links {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tbcs-area-links.tbcs-cols-2 { grid-template-columns: repeat( 2, minmax( 0, 1fr ) ); }
.tbcs-area-links.tbcs-cols-3 { grid-template-columns: repeat( 3, minmax( 0, 1fr ) ); }
.tbcs-area-links.tbcs-cols-4 { grid-template-columns: repeat( 4, minmax( 0, 1fr ) ); }

@media ( max-width: 480px ) {
	.tbcs-area-links[class*="tbcs-cols-"] {
		grid-template-columns: 1fr;
	}
}
