/* ============================================================
   CULPA WYPOŻYCZALNIA — Reservation modal (Linear/Stripe vibe)
   Modal z windows-as-cards (TOP) + fallback custom range (BOTTOM).
   Mobile = bottom sheet (slide-up), desktop = centered modal.
   ============================================================ */

.culpa-modal {
	--cm-primary: #D50000;
	--cm-primary-deep: #B30000;
	--cm-primary-soft: #FFEAEA;
	--cm-text: #181818;
	--cm-text-soft: #4a4a4a;
	--cm-text-mute: #888888;
	--cm-bg: #ffffff;
	--cm-bg-soft: #FAFAFA;
	--cm-bg-mute: #F2F2F2;
	--cm-border: #EAEAEA;
	--cm-border-strong: #D5D5D5;
	--cm-radius: 12px;
	--cm-shadow: 0 24px 64px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.06);

	font-family: "Jost", -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--cm-text);
	font-feature-settings: "lnum", "tnum";
}

/* === Reset wszystkich buttonów w modalu — Elementor Kit globalnie ustawia
       button { background-color: var(--e-global-color-primary) = #D50000 } co
       nadpisuje nasze klasy. Tutaj zerujemy default i wymuszamy własne style. === */
.culpa-modal button,
.culpa-modal input[type="button"],
.culpa-modal input[type="submit"] {
	background: transparent;
	color: inherit;
	border: 0;
	box-shadow: none;
	background-image: none;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
}
.culpa-modal button:hover,
.culpa-modal button:focus,
.culpa-modal input[type="button"]:hover,
.culpa-modal input[type="submit"]:hover {
	background: transparent;
	color: inherit;
	box-shadow: none;
}

/* === Backdrop === */
.culpa-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 20, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 9990;
	opacity: 0;
	transition: opacity 200ms ease;
	pointer-events: none;
}

.culpa-modal[data-open="true"] .culpa-modal__backdrop {
	opacity: 1;
	pointer-events: auto;
}

/* === Container === */
.culpa-modal__panel {
	position: fixed;
	z-index: 9991;
	background: var(--cm-bg);
	box-shadow: var(--cm-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
}

/* Desktop: centered modal */
@media (min-width: 768px) {
	.culpa-modal__panel {
		top: 50%;
		left: 50%;
		transform: translate(-50%, -48%);
		width: min(560px, 92vw);
		max-height: min(720px, 88vh);
		border-radius: var(--cm-radius);
		opacity: 0;
		pointer-events: none;
	}
	.culpa-modal[data-open="true"] .culpa-modal__panel {
		transform: translate(-50%, -50%);
		opacity: 1;
		pointer-events: auto;
	}
}

/* Mobile: bottom sheet */
@media (max-width: 767px) {
	.culpa-modal__panel {
		left: 0;
		right: 0;
		bottom: 0;
		max-height: 92dvh;
		border-radius: var(--cm-radius) var(--cm-radius) 0 0;
		transform: translateY(100%);
		opacity: 1;
	}
	.culpa-modal[data-open="true"] .culpa-modal__panel {
		transform: translateY(0);
	}

	/* Drag handle */
	.culpa-modal__panel::before {
		content: "";
		display: block;
		width: 40px;
		height: 4px;
		background: var(--cm-border-strong);
		border-radius: 2px;
		margin: 8px auto 0;
		flex-shrink: 0;
	}
}

/* === Header === */
.culpa-modal__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--cm-border);
	flex-shrink: 0;
	background: var(--cm-bg);
}

.culpa-modal__bike-thumb {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
	background: var(--cm-bg-mute);
	flex-shrink: 0;
}

.culpa-modal__bike-info {
	flex: 1;
	min-width: 0;
}

.culpa-modal__bike-name {
	font-size: 16px;
	font-weight: 600;
	color: var(--cm-text);
	letter-spacing: -0.01em;
	margin: 0;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.culpa-modal__bike-meta {
	font-size: 13px;
	color: var(--cm-text-mute);
	margin-top: 2px;
}

.culpa-modal .culpa-modal__close {
	width: 36px;
	height: 36px;
	border: 1px solid var(--cm-border);
	background: var(--cm-bg);
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	color: var(--cm-text);
	cursor: pointer;
	font-family: inherit;
	transition: all 180ms ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
}

.culpa-modal .culpa-modal__close:hover,
.culpa-modal .culpa-modal__close:focus {
	background: var(--cm-text);
	color: #fff;
	border-color: var(--cm-text);
	transform: rotate(90deg);
}

/* === Body (scrollable) === */
.culpa-modal__body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px 20px;
	-webkit-overflow-scrolling: touch;
}

.culpa-modal__step {
	display: none;
}

.culpa-modal__step[data-active="true"] {
	display: block;
}

.culpa-modal__section {
	margin-bottom: 20px;
}

.culpa-modal__section-title {
	font-size: 12px;
	font-weight: 700;
	color: var(--cm-text-mute);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0 0 12px;
}

/* === Loading state === */
.culpa-modal__loading {
	padding: 48px 20px;
	text-align: center;
	color: var(--cm-text-mute);
	font-size: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.culpa-modal__spinner {
	width: 28px;
	height: 28px;
	border: 2px solid var(--cm-border);
	border-top-color: var(--cm-primary);
	border-radius: 50%;
	animation: culpa-modal-spin 0.7s linear infinite;
}

@keyframes culpa-modal-spin {
	to { transform: rotate(360deg); }
}

/* === Empty state === */
.culpa-modal__empty {
	padding: 32px 20px;
	text-align: center;
	color: var(--cm-text-mute);
	font-size: 14px;
	background: var(--cm-bg-soft);
	border-radius: 8px;
}

/* === Window cards === */
.culpa-modal__windows {
	display: grid;
	gap: 8px;
}

.culpa-modal .culpa-window-card {
	background: var(--cm-bg);
	color: var(--cm-text);
	border: 1px solid var(--cm-border);
	border-radius: 10px;
	padding: 14px 16px;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 12px;
	transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	width: 100%;
}

.culpa-modal .culpa-window-card:hover,
.culpa-modal .culpa-window-card:focus {
	border-color: var(--cm-primary);
	background: var(--cm-primary-soft);
	color: var(--cm-text);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(213, 0, 0, 0.12);
}

.culpa-window-card:focus-visible {
	outline: 2px solid var(--cm-primary);
	outline-offset: 2px;
}

.culpa-window-card__main {
	min-width: 0;
}

.culpa-window-card__dates {
	font-size: 16px;
	font-weight: 600;
	color: var(--cm-text);
	line-height: 1.2;
	letter-spacing: -0.01em;
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.culpa-window-card__dates-arrow {
	color: var(--cm-text-mute);
	font-weight: 400;
}

.culpa-window-card__sub {
	font-size: 12px;
	color: var(--cm-text-mute);
	margin-top: 4px;
	display: flex;
	gap: 6px;
	align-items: center;
	flex-wrap: wrap;
}

.culpa-window-card__sub-dot {
	color: var(--cm-border-strong);
}

.culpa-window-card__price {
	font-size: 18px;
	font-weight: 700;
	color: var(--cm-text);
	letter-spacing: -0.01em;
	white-space: nowrap;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1.1;
}

.culpa-window-card__price-arrow {
	font-size: 12px;
	color: var(--cm-primary);
	margin-top: 2px;
	transition: transform 200ms ease;
}

.culpa-window-card:hover .culpa-window-card__price-arrow {
	transform: translateX(4px);
}

.culpa-window-card__badge {
	display: inline-block;
	background: var(--cm-primary);
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 100px;
	margin-right: 8px;
	vertical-align: 1px;
}

/* === Custom range toggle === */
.culpa-modal .culpa-modal__custom-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: var(--cm-bg-soft);
	color: var(--cm-text);
	border: 1px solid var(--cm-border);
	border-radius: 10px;
	padding: 12px 16px;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	transition: all 180ms ease;
}

.culpa-modal .culpa-modal__custom-toggle:hover,
.culpa-modal .culpa-modal__custom-toggle:focus {
	background: var(--cm-bg-mute);
	border-color: var(--cm-border-strong);
	color: var(--cm-text);
}

.culpa-modal__custom-toggle-arrow {
	color: var(--cm-text-mute);
	transition: transform 200ms ease;
}

.culpa-modal__custom-toggle[aria-expanded="true"] .culpa-modal__custom-toggle-arrow {
	transform: rotate(180deg);
}

.culpa-modal__custom-range {
	margin-top: 12px;
	display: none;
}

.culpa-modal__custom-range.is-open {
	display: block;
}

/* === Form === */
.culpa-modal__form {
	display: grid;
	gap: 14px;
}

.culpa-modal__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.culpa-modal__field-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--cm-text-mute);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.culpa-modal__field input,
.culpa-modal__field textarea {
	background: var(--cm-bg);
	border: 1.5px solid var(--cm-border);
	border-radius: 8px;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 15px;
	color: var(--cm-text);
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.culpa-modal__field input:focus,
.culpa-modal__field textarea:focus {
	outline: none;
	border-color: var(--cm-primary);
	box-shadow: 0 0 0 3px rgba(213, 0, 0, 0.12);
}

.culpa-modal__field--check {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
}

.culpa-modal__field--check input {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--cm-primary);
	flex-shrink: 0;
}

.culpa-modal__field--check span {
	font-size: 13px;
	color: var(--cm-text-soft);
	line-height: 1.4;
}

.culpa-modal__field--check a {
	color: var(--cm-primary);
	text-decoration: underline;
}

.culpa-modal__error {
	font-size: 12px;
	color: var(--cm-primary);
	margin-top: 4px;
	display: none;
}

.culpa-modal__error.is-visible {
	display: block;
}

/* === Summary box (step 2) === */
.culpa-modal__summary {
	background: var(--cm-bg-soft);
	border: 1px solid var(--cm-border);
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 20px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	align-items: center;
}

.culpa-modal__summary-dates {
	font-size: 16px;
	font-weight: 600;
	color: var(--cm-text);
}

.culpa-modal__summary-meta {
	font-size: 12px;
	color: var(--cm-text-mute);
	margin-top: 2px;
}

.culpa-modal__summary-price {
	font-size: 18px;
	font-weight: 700;
	color: var(--cm-primary);
	white-space: nowrap;
}

.culpa-modal .culpa-modal__summary-edit {
	background: transparent;
	border: 0;
	color: var(--cm-primary);
	font-family: inherit;
	font-size: 12px;
	cursor: pointer;
	padding: 4px 0;
	font-weight: 600;
	text-decoration: underline;
}

.culpa-modal .culpa-modal__summary-edit:hover {
	background: transparent;
	color: var(--cm-primary-deep);
}

/* === Footer === */
.culpa-modal__footer {
	padding: 14px 20px;
	border-top: 1px solid var(--cm-border);
	background: var(--cm-bg);
	display: flex;
	gap: 12px;
	flex-shrink: 0;
}

.culpa-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	font-family: inherit;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	border-radius: 8px;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: all 180ms ease;
	text-decoration: none;
	white-space: nowrap;
}

.culpa-modal .culpa-modal__btn--primary {
	background: var(--cm-primary);
	color: #fff;
	border: 1.5px solid var(--cm-primary);
	flex: 1;
}

.culpa-modal .culpa-modal__btn--primary:hover:not(:disabled),
.culpa-modal .culpa-modal__btn--primary:focus:not(:disabled) {
	background: var(--cm-primary-deep);
	border-color: var(--cm-primary-deep);
	color: #fff;
}

.culpa-modal .culpa-modal__btn--primary:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.culpa-modal .culpa-modal__btn--ghost {
	background: var(--cm-bg);
	color: var(--cm-text);
	border: 1.5px solid var(--cm-border);
}

.culpa-modal .culpa-modal__btn--ghost:hover,
.culpa-modal .culpa-modal__btn--ghost:focus {
	background: var(--cm-text);
	color: #fff;
	border-color: var(--cm-text);
}

.culpa-modal .culpa-modal__btn--whatsapp {
	background: #25D366;
	color: #fff;
	border: 1.5px solid #25D366;
	flex: 0 0 auto;
}

.culpa-modal .culpa-modal__btn--whatsapp:hover,
.culpa-modal .culpa-modal__btn--whatsapp:focus {
	background: #128C7E;
	border-color: #128C7E;
	color: #fff;
}

/* === Success state === */
.culpa-modal__success {
	padding: 32px 24px;
	text-align: center;
}

.culpa-modal__success-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: #00a32a;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	animation: culpa-modal-pop 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes culpa-modal-pop {
	0%   { transform: scale(0.5); opacity: 0; }
	60%  { transform: scale(1.08); }
	100% { transform: scale(1); opacity: 1; }
}

.culpa-modal__success-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--cm-text);
	margin: 0 0 8px;
}

.culpa-modal__success-text {
	font-size: 14px;
	color: var(--cm-text-soft);
	line-height: 1.55;
	margin: 0 0 16px;
}

.culpa-modal__success-detail {
	font-size: 13px;
	color: var(--cm-text-mute);
	background: var(--cm-bg-soft);
	border-radius: 8px;
	padding: 12px;
	margin-top: 16px;
	font-variant-numeric: tabular-nums;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
	.culpa-modal__backdrop,
	.culpa-modal__panel,
	.culpa-window-card,
	.culpa-modal__btn,
	.culpa-modal__close,
	.culpa-modal__custom-toggle-arrow,
	.culpa-window-card__price-arrow {
		transition: none !important;
		animation: none !important;
	}
	.culpa-modal__spinner { animation: none; }
}

/* === Scroll lock body when modal open === */
body.culpa-modal-open {
	overflow: hidden;
}
