/* parking-modal.css — Modal z date pickerem na stronach P44/P45/P46/P48 */

/* ─── Overlay ────────────────────────────────────────────────────────────── */
#apcoa-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 20, 50, 0.7);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#apcoa-modal-overlay.active {
	display: flex;
}

/* ─── Modal box ──────────────────────────────────────────────────────────── */
#apcoa-modal {
	background: #fff;
	border-radius: 16px;
	padding: 32px;
	width: 100%;
	max-width: 520px;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

/* ─── Zamknij ────────────────────────────────────────────────────────────── */
#apcoa-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: none;
	background: #f0f4f8;
	border-radius: 50%;
	font-size: 1rem;
	color: #444;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

#apcoa-modal-close:hover {
	background: #e2e8f0;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.apcoa-modal__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-right: 26px;
	margin-bottom: 24px;
}

.apcoa-modal__header i {
	color: #0057a8;
	font-size: 1.2rem;
}

.apcoa-modal__header p {
	font-size: 0.85rem;
	font-weight: 700;
	color: #0057a8;
	margin: 0;
}

/* ─── Pola formularza ────────────────────────────────────────────────────── */
.apcoa-modal__fields {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	grid-template-rows: auto auto;
	gap: 12px 8px;
	align-items: end;
	margin-bottom: 16px;
}

.apcoa-modal__group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.apcoa-modal__group:nth-child(1) {
	grid-column: 1;
	grid-row: 1;
}
.apcoa-modal__group:nth-child(2) {
	grid-column: 1;
	grid-row: 2;
}
.apcoa-modal__sep {
	grid-column: 2;
	grid-row: 1 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #0057a8;
	font-size: 1.1rem;
	padding-bottom: 4px;
}
.apcoa-modal__group:nth-child(4) {
	grid-column: 3;
	grid-row: 1;
}
.apcoa-modal__group:nth-child(5) {
	grid-column: 3;
	grid-row: 2;
}

.apcoa-modal__group label {
	font-size: 0.72rem;
	font-weight: 700;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.apcoa-modal__group input[type='date'],
.apcoa-modal__group select {
	padding: 9px 12px;
	border: 1.5px solid #dde2ea;
	border-radius: 7px;
	font-size: 0.9rem;
	color: #1a2a3a;
	background: #f5f7fa;
	color-scheme: light;
	width: 100%;
	transition: border-color 0.15s;
}

.apcoa-modal__group input[type='date']:focus,
.apcoa-modal__group select:focus {
	outline: none;
	border-color: #0057a8;
}

.apcoa-modal__group input[type='date']::-webkit-calendar-picker-indicator {
	cursor: pointer;
	opacity: 0.6;
}

/* ─── Przycisk szukaj ────────────────────────────────────────────────────── */
#apcoa-modal-search {
	width: 100%;
	padding: 12px;
	background: #0057a8;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.15s;
	margin-bottom: 16px;
}

#apcoa-modal-search:hover:not(:disabled) {
	background: #003f7d;
}

#apcoa-modal-search:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* ─── Wynik ──────────────────────────────────────────────────────────────── */
.apcoa-modal__price-card {
	background: #f0f6ff;
	border: 1.5px solid #c5d8f0;
	border-radius: 10px;
	padding: 16px 20px;
	margin-bottom: 12px;
	text-align: center;
}

.apcoa-modal__price-label {
	font-size: 0.75rem;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 6px;
}

.apcoa-modal__price-value {
	font-size: 2rem;
	font-weight: 800;
	color: #888;
	margin-bottom: 6px;
}

.apcoa-modal__price-value--ok {
	color: #0057a8;
}

.apcoa-modal__avail {
	font-size: 0.82rem;
	font-weight: 600;
	margin-bottom: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.apcoa-modal__avail--ok {
	color: #1a7a3c;
}

.apcoa-modal__avail--full {
	color: #c0392b;
}

.apcoa-modal__period {
	font-size: 0.78rem;
	color: #888;
	margin-top: 4px;
}

/* ─── Przycisk rezerwacji ────────────────────────────────────────────────── */
.apcoa-modal__reserve-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 13px;
	background: #1a7a3c;
	color: #fff !important;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none !important;
	transition: background 0.15s;
}

.apcoa-modal__reserve-btn:hover {
	background: #135c2d;
}

/* ─── Status błędu ───────────────────────────────────────────────────────── */
.apcoa-modal__status--error {
	background: #fff0f0;
	color: #c0392b;
	border-radius: 7px;
	padding: 10px 14px;
	font-size: 0.82rem;
	display: flex;
	align-items: center;
	gap: 6px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
	#apcoa-modal {
		padding: 24px 18px;
		border-radius: 12px;
	}

	.apcoa-modal__fields {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto auto;
	}

	.apcoa-modal__group:nth-child(1) {
		grid-column: 1;
		grid-row: 1;
	}
	.apcoa-modal__group:nth-child(2) {
		grid-column: 2;
		grid-row: 1;
	}
	.apcoa-modal__sep {
		display: none;
	}
	.apcoa-modal__group:nth-child(4) {
		grid-column: 1;
		grid-row: 2;
	}
	.apcoa-modal__group:nth-child(5) {
		grid-column: 2;
		grid-row: 2;
	}

	.apcoa-modal__price-value {
		font-size: 1.6rem;
	}
}
