/* =========================================================
   ZTM Kielce — Widget "Planer Podróży"
   ========================================================= */

.ztm-widget--planer {
	padding: 18px 20px;
	font-family: var(--ztm-font, 'Inter', sans-serif);
	background-color: #F6F8FA;
}

.ztm-planer-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.ztm-planer-header svg {
	width: 20px;
	height: 20px;
	color: var(--ztm-navy);
	flex-shrink: 0;
}

.ztm-planer-header span {
	font-size: calc(15px * var(--ztm-font-scale, 1));
	font-weight: 600;
	color: var(--ztm-navy);
}

.ztm-planer-row {
	display: grid;
	gap: 10px;
	margin-bottom: 10px;
}

.ztm-planer-row--stops {
	grid-template-columns: 1fr 44px 1fr;
	align-items: center;
}

.ztm-planer-row--actions {
	grid-template-columns: 1fr 1fr;
}

.ztm-planer-row--actions:last-child { margin-bottom: 0; }

.ztm-planer-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.ztm-planer-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	position: absolute;
	left: 14px;
	flex-shrink: 0;
	z-index: 1;
}

.ztm-planer-dot--green { background: #22c55e; }
.ztm-planer-dot--red   { background: #ef4444; }

.ztm-planer-input {
	width: 100%;
	height: 44px;
	border: 1px solid var(--ztm-border-grey);
	border-radius: 8px;
	padding: 0 14px 0 34px;
	font-size: calc(14px * var(--ztm-font-scale, 1));
	font-family: var(--ztm-font);
	color: #1c2230;
	background: #fff;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ztm-planer-input::placeholder { color: var(--ztm-text-muted); }

.ztm-planer-input:focus {
	border-color: var(--ztm-navy);
	box-shadow: 0 0 0 3px rgba(0, 57, 156, 0.12);
}

.ztm-planer-swap {
	width: 44px;
	height: 44px;
	border: 1px solid var(--ztm-border-grey);
	border-radius: 8px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--ztm-navy);
	transition: background 0.15s ease, border-color 0.15s ease;
	flex-shrink: 0;
}

.ztm-planer-swap:hover { background: #e8f0fb; border-color: var(--ztm-navy); }
.ztm-planer-swap:focus-visible { outline: 3px solid var(--ztm-navy); outline-offset: 2px; }
.ztm-planer-swap svg { width: 18px; height: 18px; }

.ztm-planer-date-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.ztm-planer-date-icon {
	position: absolute;
	left: 14px;
	width: 17px;
	height: 17px;
	color: #6b7a8d;
	pointer-events: none;
	z-index: 1;
}

.ztm-planer-select {
	width: 100%;
	height: 44px;
	border: 1px solid var(--ztm-border-grey);
	border-radius: 8px;
	padding: 0 36px 0 38px;
	font-size: calc(14px * var(--ztm-font-scale, 1));
	font-family: var(--ztm-font);
	color: #1c2230;
	background: #fff;
	appearance: none;
	cursor: pointer;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ztm-planer-select:focus {
	border-color: var(--ztm-navy);
	box-shadow: 0 0 0 3px rgba(0, 57, 156, 0.12);
}

.ztm-planer-chevron {
	position: absolute;
	right: 12px;
	width: 16px;
	height: 16px;
	color: #6b7a8d;
	pointer-events: none;
}

.ztm-planer-btn {
	height: 44px;
	background: var(--ztm-navy);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: calc(14px * var(--ztm-font-scale, 1));
	font-weight: 600;
	font-family: var(--ztm-font);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.15s ease;
}

.ztm-planer-btn:hover { background: var(--ztm-navy-dark); }
.ztm-planer-btn:focus-visible { outline: 3px solid var(--ztm-blue-light); outline-offset: 2px; }
.ztm-planer-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ── Wysoki kontrast ─────────────────────────────────────── */
body.ztm-hc .ztm-widget--planer { background-color: #000; }
body.ztm-hc .ztm-planer-input,
body.ztm-hc .ztm-planer-select,
body.ztm-hc .ztm-planer-swap { background: #000; border-color: #fff; color: #fff; }
body.ztm-hc .ztm-planer-input::placeholder { color: #aaa; }
body.ztm-hc .ztm-planer-swap { color: #fff; }
body.ztm-hc .ztm-planer-swap:hover { background: #222; }
body.ztm-hc .ztm-planer-btn { background: #ff0; color: #000; }
body.ztm-hc .ztm-planer-btn:hover { background: #fff; color: #000; }
body.ztm-hc .ztm-planer-header span { color: #fff; }
body.ztm-hc .ztm-planer-header svg { color: #ff0; }

/* ── Responsywność ───────────────────────────────────────── */
@media (max-width: 640px) {
	.ztm-widget--planer { padding: 16px; }
	.ztm-planer-row--stops { grid-template-columns: 1fr 40px 1fr; }
	.ztm-planer-row--actions { grid-template-columns: 1fr; }
}

/* ── Dropdown autocomplete ───────────────────────────────── */
.ztm-planer-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--ztm-border-grey);
	border-radius: 8px;
	box-shadow: 0 6px 16px rgba(0,0,0,0.10);
	z-index: 50;
	margin: 0;
	padding: 4px 0;
	list-style: none;
}

.ztm-planer-dropdown.is-open { display: block; }

.ztm-planer-dropdown-item {
	padding: 10px 14px;
	font-size: calc(13.5px * var(--ztm-font-scale, 1));
	color: #1c2230;
	cursor: pointer;
	line-height: 1.4;
	border-bottom: 1px solid #f0f2f5;
	transition: background 0.1s ease;
}

.ztm-planer-dropdown-item:last-child { border-bottom: none; }

.ztm-planer-dropdown-item:hover,
.ztm-planer-dropdown-item.is-active { background: #f0f4fb; }

/* HC */
body.ztm-hc .ztm-planer-dropdown { background: #000; border-color: #fff; }
body.ztm-hc .ztm-planer-dropdown-item { color: #fff; border-color: #333; }
body.ztm-hc .ztm-planer-dropdown-item:hover,
body.ztm-hc .ztm-planer-dropdown-item.is-active { background: #222; }