/* Drivers: single driver template and the main Drivers page. Enqueued by novamira-sandbox/ccw-drivers.php. */

.ccw-driver-figure { margin: 0; }
.ccw-driver-figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
.ccw-driver-figure figcaption { margin-top: 8px; font: 400 13px/1.4 'Roboto', sans-serif; color: #54595F; }
.ccw-driver-figure--empty .ccw-driver-placeholder { aspect-ratio: 4 / 5; border-radius: 12px; }

.ccw-driver-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgba(255, 255, 255, .28);
	background: linear-gradient(160deg, #006837, #00331b);
}
.ccw-driver-placeholder svg { width: 45%; max-width: 180px; height: auto; }

.ccw-featured-drivers {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin-bottom: 48px;
	font-family: 'Roboto', sans-serif;
}
.ccw-driver-card { position: relative; height: 500px; overflow: hidden; border-radius: 12px; background: #00331b; }
.ccw-driver-card__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.ccw-driver-card::after {
	content: "";
	position: absolute;
	inset: 40% 0 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .8));
	pointer-events: none;
}
.ccw-driver-card__body {
	position: absolute;
	z-index: 1;
	right: 24px;
	bottom: 24px;
	left: 24px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}
.ccw-driver-card__name { margin: 0; font: 600 26px/1.2 'Roboto', sans-serif; color: #fff; }
.ccw-driver-card__btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 6px;
	background: #006837;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s;
}
.ccw-driver-card__btn:hover,
.ccw-driver-card__btn:focus { background: #fff; color: #006837; }
.ccw-driver-card__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.ccw-driver-list { font-family: 'Roboto', sans-serif; color: #54595F; }
.ccw-driver-list__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #006837; }
.ccw-driver-list__title { margin: 0; font: 600 24px/1.2 'Roboto', sans-serif; color: #111; }
.ccw-driver-list__count { margin: 0; font-size: 14px; white-space: nowrap; }
.ccw-driver-list__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.ccw-driver-list__search {
	display: block;
	width: 100%;
	max-width: 420px;
	height: 44px;
	margin-bottom: 20px;
	padding: 0 14px;
	border: 1px solid #c9c9c9;
	border-radius: 6px;
	background: #fff;
	color: #111;
	font-size: 16px;
}
.ccw-driver-list__search:focus { border-color: #006837; outline: 2px solid rgba(0, 104, 55, .25); }
.ccw-driver-list__empty { margin: 0; padding: 24px 0; }

.ccw-driver-table { width: 100%; border-collapse: collapse; }
.ccw-driver-table th { padding: 10px 16px 10px 0; border-bottom: 1px solid #c9c9c9; color: #111; font-size: 14px; font-weight: 600; text-align: left; background: none; }
.ccw-driver-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid #E5E5E5; vertical-align: top; }
.ccw-driver-table th:nth-child(1), .ccw-driver-table td:nth-child(1) { width: 25%; }
.ccw-driver-table th:nth-child(2), .ccw-driver-table td:nth-child(2) { width: 15%; }
.ccw-driver-table td a { color: #006837; font-weight: 600; text-decoration: none; }
.ccw-driver-table td a:hover, .ccw-driver-table td a:focus { text-decoration: underline; }

@media (max-width: 900px) {
	.ccw-featured-drivers { grid-template-columns: 1fr; }
	.ccw-driver-card { height: 420px; }
}
@media (max-width: 600px) {
	.ccw-driver-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.ccw-driver-table, .ccw-driver-table tbody, .ccw-driver-table tr, .ccw-driver-table td { display: block; width: 100% !important; }
	.ccw-driver-table tr { padding: 10px 0; border-bottom: 1px solid #E5E5E5; }
	.ccw-driver-table tr[hidden] { display: none; }
	.ccw-driver-table td { padding: 3px 0; border: 0; }
	.ccw-driver-table td + td::before { content: attr(data-label) ": "; font-weight: 600; }
}
