/*
 * Lista Strefy pacjenta
 * Desktop: kapsułki kategorii.
 * Mobile: sticky select jak w Cenniku i Jednostkach.
 */

.wp-block-szpitalpucki-lista-strefy-pacjenta.sp-patient-zone-directory {
	width: 100%;
	margin: 26px 0 64px;
	color: var(--ink, #0B304C);
}

.sp-patient-zone-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 48px;
	padding: 14px 0;
	border-top: 1px solid var(--line, #D8DFE6);
	border-bottom: 1px solid var(--line, #D8DFE6);
}

.sp-patient-zone-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 18px;
	border: 1px solid var(--line, #D8DFE6);
	border-radius: 999px;
	background: transparent;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ink, #0B304C);
	text-decoration: none;
	transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.sp-patient-zone-chip i {
	color: var(--terra, #166299);
	font-size: 17px;
}

.sp-patient-zone-chip:hover,
.sp-patient-zone-chip:focus,
.sp-patient-zone-chip.is-active {
	border-color: var(--terra, #166299);
	color: var(--terra, #166299);
	background: #fff;
}

.sp-patient-zone-section {
	scroll-margin-top: 110px;
	margin: 0 0 58px;
}

.sp-patient-zone-section:last-child {
	margin-bottom: 0;
}

.sp-patient-zone-section__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 28px;
}

.sp-patient-zone-section__icon {
	display: inline-flex;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--paper-deep, #EEF2F6);
	color: var(--terra, #166299);
	font-size: 20px;
}

.sp-patient-zone-section__head h2 {
	flex: 0 0 auto;
	margin: 0;
	font-family: "Inter", sans-serif;
	font-size: clamp(24px, 2.3vw, 30px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.025em;
	color: var(--ink, #0B304C);
}

.sp-patient-zone-section__line {
	flex: 1 1 auto;
	height: 1px;
	min-width: 24px;
	background: var(--line, #D8DFE6);
}

.sp-patient-zone-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.sp-patient-zone-card {
	display: grid;
	grid-template-columns: 118px minmax(0, 1fr);
	min-height: 124px;
	border: 1px solid var(--line, #D8DFE6);
	background: #fff;
	color: var(--ink, #0B304C);
	text-decoration: none;
	overflow: hidden;
	transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sp-patient-zone-card:hover,
.sp-patient-zone-card:focus {
	border-color: var(--terra, #166299);
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(11,48,76,.06);
}

.sp-patient-zone-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	background: var(--paper-deep, #EEF2F6);
	color: var(--terra, #166299);
	font-size: 30px;
	overflow: hidden;
}

.sp-patient-zone-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 124px;
	object-fit: cover;
}

.sp-patient-zone-card__body {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
	padding: 22px 42px 22px 20px;
}

.sp-patient-zone-card__name {
	font-family: "Inter", sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ink, #0B304C);
	overflow-wrap: anywhere;
}

.sp-patient-zone-card__arrow {
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--terra, #166299);
	font-size: 20px;
	transition: transform .18s ease;
}

.sp-patient-zone-card:hover .sp-patient-zone-card__arrow,
.sp-patient-zone-card:focus .sp-patient-zone-card__arrow {
	transform: translate(4px, -50%);
}

.sp-patient-zone-mobile-nav {
	display: none;
}

.sp-patient-zone-empty {
	padding: 18px;
	border: 1px dashed var(--line, #D8DFE6);
	background: var(--paper, #F8F9FA);
}

/* Podgląd w edytorze. */
.sp-patient-zone-list-editor {
	min-height: 80px;
}

@media (max-width: 1120px) {
	.sp-patient-zone-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.sp-patient-zone-nav {
		display: none;
	}

	.sp-patient-zone-mobile-nav {
		position: sticky;
		top: 0;
		z-index: 30;
		display: grid;
		grid-template-columns: 40px minmax(0, 1fr) 34px;
		align-items: center;
		width: 100%;
		min-height: 58px;
		margin: 16px 0 30px;
		border: 1px solid var(--line, #D8DFE6);
		background: var(--paper-deep, #EEF2F6);
		box-shadow: 0 6px 12px rgba(11,48,76,.04);
	}

	.sp-patient-zone-mobile-nav__icon,
	.sp-patient-zone-mobile-nav__chevron {
		display: flex;
		align-items: center;
		justify-content: center;
		pointer-events: none;
	}

	.sp-patient-zone-mobile-nav__icon {
		color: var(--terra, #166299);
		font-size: 18px;
	}

	.sp-patient-zone-mobile-nav__chevron {
		color: var(--fog, #8597A6);
		font-size: 16px;
	}

	.sp-patient-zone-mobile-select {
		width: 100%;
		height: 56px;
		padding: 0 10px;
		border: 0;
		outline: 0;
		background: transparent;
		appearance: none;
		-webkit-appearance: none;
		font-family: "Inter", sans-serif;
		font-size: 15px;
		font-weight: 600;
		line-height: 1.2;
		color: var(--ink, #0B304C);
		cursor: pointer;
	}

	.sp-patient-zone-mobile-select:focus {
		box-shadow: inset 0 0 0 2px var(--terra, #166299);
	}

	.sp-patient-zone-section {
		scroll-margin-top: 76px;
		margin-bottom: 44px;
	}

	.sp-patient-zone-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.sp-patient-zone-section__head {
		gap: 10px;
		margin-bottom: 20px;
	}

	.sp-patient-zone-section__icon {
		flex-basis: 42px;
		width: 42px;
		height: 42px;
		font-size: 18px;
	}

	.sp-patient-zone-section__head h2 {
		font-size: 22px;
	}

	.sp-patient-zone-card {
		grid-template-columns: 94px minmax(0, 1fr);
		min-height: 104px;
	}

	.sp-patient-zone-card__media img {
		min-height: 104px;
	}

	.sp-patient-zone-card__body {
		padding: 18px 38px 18px 16px;
	}

	.sp-patient-zone-card__name {
		font-size: 16px;
	}
}

/* ==============================================================
 * Pasek akcentujący kartę przy najechaniu.
 * ============================================================== */
.sp-patient-zone-card {
	position: relative;
}

.sp-patient-zone-card::before {
	content: "";
	position: absolute;
	z-index: 3;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--terra, #166299);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .25s ease;
	pointer-events: none;
}

.sp-patient-zone-card:hover::before,
.sp-patient-zone-card:focus-visible::before {
	transform: scaleY(1);
}

/* ==============================================================
 * Animacja strzałki karty.
 * ============================================================== */
.sp-patient-zone-card__name {
	transition: padding-right .2s ease;
}

.sp-patient-zone-card__arrow {
	transform: translateY(-50%) translateX(-4px);
	font-size: 17px;
	opacity: 0;
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
}

.sp-patient-zone-card:hover .sp-patient-zone-card__name,
.sp-patient-zone-card:focus-visible .sp-patient-zone-card__name {
	padding-right: 18px;
}

.sp-patient-zone-card:hover .sp-patient-zone-card__arrow,
.sp-patient-zone-card:focus-visible .sp-patient-zone-card__arrow {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

.sp-patient-zone-card__arrow i {
	display: block;
	font-size: inherit;
	line-height: 1;
}
