/* ── ZPK Frontend Styles v1.2.2 — ZŠ Křemže palette ──────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

.zpk-wrap {
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	max-width: 720px;
	margin: 2rem auto;
	background: #ffffff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	overflow: hidden;
	color: #000000;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.zpk-header {
	background: #2b4290;
	color: #ffffff;
	padding: 2rem 2rem 1.75rem;
	text-align: center;
}
.zpk-header h2 {
	margin: 0 0 0.25rem;
	font-size: 1.6rem;
	font-weight: 700;
	color: #ffffff;
	border: none;
}
.zpk-header p {
	margin: 0;
	opacity: 0.88;
	font-size: 1rem;
	color: #ffffff;
}

/* ── Progress ────────────────────────────────────────────────────────────── */

.zpk-progress {
	display: flex;
	align-items: center;
	padding: 1.25rem 2rem;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
}
.zpk-progress-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
.zpk-step-num {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #dcdcde;
	color: #50575e;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}
.zpk-progress-step.active .zpk-step-num,
.zpk-progress-step.done .zpk-step-num {
	background: #2b4290;
	color: #ffffff;
}
.zpk-step-label {
	font-size: 0.7rem;
	color: #8c8f94;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.zpk-progress-step.active .zpk-step-label { color: #2b4290; }
.zpk-progress-line {
	flex: 1;
	height: 2px;
	background: #dcdcde;
	margin: 0 6px;
	margin-bottom: 18px;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */

.zpk-step {
	padding: 2rem;
}
.zpk-step h3 {
	margin: 0 0 1.5rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: #2b4290;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid #c3c4c7;
}

/* ── Field ───────────────────────────────────────────────────────────────── */

.zpk-field { margin-bottom: 1.25rem; }
.zpk-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #000000;
	font-size: 0.95rem;
}
.zpk-required { color: #d63638; }
.zpk-field input[type="text"] {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid #8c8f94;
	border-radius: 0;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
	color: #000000;
	background: #ffffff;
}
.zpk-field input[type="text"]:focus {
	border-color: #2b4290;
	box-shadow: 0 0 0 1px #2b4290;
}
.zpk-error {
	display: block;
	color: #d63638;
	font-size: 0.85rem;
	margin-top: 0.4rem;
	min-height: 1.2em;
}

/* ── Station cards ───────────────────────────────────────────────────────── */

.zpk-stations-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.zpk-station-card {
	border: 1px solid #c3c4c7;
	padding: 1.25rem 1rem;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #ffffff;
}
.zpk-station-card:hover {
	border-color: #2b4290;
	box-shadow: 0 2px 8px rgba(43,66,144,0.12);
}
.zpk-station-card.selected {
	border-color: #2b4290;
	border-width: 2px;
	background: #edf0fa;
}
.zpk-station-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.zpk-station-card h4 {
	margin: 0 0 0.4rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #000000;
}
.zpk-station-card.selected h4 { color: #2b4290; }
.zpk-station-card p {
	margin: 0;
	font-size: 0.8rem;
	color: #50575e;
}

/* ── Slot list ───────────────────────────────────────────────────────────── */

.zpk-slots-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1rem;
	max-height: 320px;
	overflow-y: auto;
	padding-right: 4px;
}
.zpk-slot-item {
	display: flex;
	align-items: center;
	padding: 0.65rem 1rem;
	border: 1px solid #c3c4c7;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	background: #ffffff;
	gap: 0.75rem;
}
.zpk-slot-item:hover { border-color: #2b4290; background: #f0f3fb; }
.zpk-slot-item.selected {
	border-color: #2b4290;
	border-width: 2px;
	background: #edf0fa;
}
.zpk-slot-radio {
	width: 18px; height: 18px;
	border: 2px solid #c3c4c7;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	transition: all 0.15s;
}
.zpk-slot-item.selected .zpk-slot-radio {
	border-color: #2b4290;
	background: #2b4290;
}
.zpk-slot-item.selected .zpk-slot-radio::after {
	content: '';
	width: 6px; height: 6px;
	border-radius: 50%;
	background: #ffffff;
}
.zpk-slot-time { font-weight: 600; color: #000000; font-size: 0.95rem; }

/* ── Loading ─────────────────────────────────────────────────────────────── */

.zpk-loading {
	text-align: center;
	padding: 2rem;
	color: #50575e;
}
.zpk-spinner {
	width: 36px; height: 36px;
	border: 3px solid #dcdcde;
	border-top-color: #2b4290;
	border-radius: 50%;
	animation: zpk-spin 0.7s linear infinite;
	margin: 0 auto 1rem;
}
.zpk-spinner-sm {
	display: inline-block;
	width: 14px; height: 14px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: zpk-spin 0.7s linear infinite;
	vertical-align: middle;
	margin-right: 4px;
}
@keyframes zpk-spin { to { transform: rotate(360deg); } }

/* ── Summary ─────────────────────────────────────────────────────────────── */

.zpk-summary {
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.25rem;
}
.zpk-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.6rem 0;
	border-bottom: 1px solid #dcdcde;
}
.zpk-summary-row:last-child { border-bottom: none; }
.zpk-summary-label { color: #50575e; font-size: 0.9rem; font-weight: 600; }
.zpk-summary-value { font-weight: 700; color: #000000; }
.zpk-confirm-text { color: #50575e; font-size: 0.9rem; margin-bottom: 1rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.zpk-actions {
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	margin-top: 1.5rem;
}
.zpk-btn {
	padding: 0.7rem 1.75rem;
	border: none;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s;
	font-family: inherit;
	border-radius: 0;
}
.zpk-btn-next,
.zpk-btn-submit {
	background: #2b4290;
	color: #ffffff;
}
.zpk-btn-next:hover,
.zpk-btn-submit:hover {
	background: #1e2f6b;
}
.zpk-btn-prev {
	background: #f6f7f7;
	color: #2b4290;
	border: 1px solid #2b4290;
}
.zpk-btn-prev:hover {
	background: #edf0fa;
	color: #1e2f6b;
	border-color: #1e2f6b;
}
.zpk-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ── Notice ──────────────────────────────────────────────────────────────── */

.zpk-notice {
	background: #fff8e1;
	border-left: 4px solid #f5c742;
	padding: 0.85rem 1rem;
	color: #000000;
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

/* ── Success ─────────────────────────────────────────────────────────────── */

.zpk-success {
	text-align: center;
	padding: 1rem;
}
.zpk-success-icon {
	width: 72px; height: 72px;
	background: #2b4290;
	border-radius: 50%;
	color: #ffffff;
	font-size: 2.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.25rem;
}
.zpk-success h3 {
	color: #000000;
	font-size: 1.4rem;
	margin-bottom: 1.25rem;
	border: none;
}
.zpk-success-details {
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	padding: 1.25rem;
	text-align: left;
	margin-bottom: 1rem;
}
.zpk-success-details p {
	margin: 0.4rem 0;
	color: #000000;
}
.zpk-success-note {
	color: #50575e;
	font-size: 0.87rem;
}

/* ── Closed ──────────────────────────────────────────────────────────────── */

.zpk-closed {
	background: #fff5f5;
	border: 1px solid #f5c6c6;
	border-left: 4px solid #d63638;
	padding: 2rem;
	text-align: center;
	color: #d63638;
	font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
	.zpk-progress { padding: 1rem; }
	.zpk-step { padding: 1.25rem 1rem; }
	.zpk-step-label { display: none; }
	.zpk-stations-grid { grid-template-columns: 1fr 1fr; }
	.zpk-actions { flex-direction: column-reverse; }
	.zpk-btn { width: 100%; text-align: center; }
}
