/* ==========================================================================
   Transport Booking — Frontend styles
   Theme: "travel route / ticket" — asphalt + signal amber color
   ========================================================================== */

.tb-wrap {
	--tb-asphalt: #1e2330;
	--tb-asphalt-2: #2a3247;
	--tb-amber: #ff9f1c;
	--tb-amber-dark: #e2870a;
	--tb-paper: #f8f6f1;
	--tb-line: #e1ddd3;
	--tb-text: #232733;
	--tb-muted: #757b89;
	--tb-success: #2e7d5b;
	--tb-danger: #c0392b;
	--tb-radius: 14px;

	max-width: 660px;
	margin: 2.5rem auto;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--tb-text);
	position: relative;
}

.tb-wrap * {
	box-sizing: border-box;
}

/* ---------- Form card ---------- */

.tb-card {
	background: #fff;
	border-radius: var(--tb-radius);
	box-shadow: 0 1px 2px rgba(20, 22, 30, 0.06), 0 16px 40px -12px rgba(20, 22, 30, 0.18);
	overflow: hidden;
	border: 1px solid var(--tb-line);
}

.tb-card__band {
	background: linear-gradient(135deg, var(--tb-asphalt) 0%, var(--tb-asphalt-2) 100%);
	padding: 1.5rem 1.75rem;
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.tb-card__title {
	font-family: 'Oswald', 'Inter', sans-serif;
	font-weight: 600;
	font-size: 1.35rem;
	letter-spacing: 0.02em;
	color: #fff;
	margin: 0;
	white-space: nowrap;
}

.tb-band__dash {
	flex: 1;
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--tb-amber) 0 10px, transparent 10px 18px);
	opacity: 0.85;
}

.tb-card__body {
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* ---------- Fields ---------- */

.tb-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--tb-muted);
	margin-bottom: 0.4rem;
}

.tb-optional {
	text-transform: none;
	font-weight: 400;
	letter-spacing: 0;
	color: #9aa0ab;
}

.tb-input {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1.5px solid var(--tb-line);
	border-radius: 9px;
	font-size: 0.95rem;
	font-family: inherit;
	color: var(--tb-text);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-input:hover {
	border-color: #c9c4b7;
}

.tb-input:focus,
.tb-input:focus-visible {
	outline: none;
	border-color: var(--tb-amber);
	box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.18);
}

.tb-input.tb-input--error {
	border-color: var(--tb-danger);
}

.tb-textarea {
	resize: vertical;
	min-height: 80px;
}

.tb-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.tb-field--full {
	grid-column: 1 / -1;
}

/* ---------- Segmented transport-type selector ---------- */

.tb-segment {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0.5rem;
	background: var(--tb-paper);
	padding: 0.4rem;
	border-radius: 11px;
	border: 1px solid var(--tb-line);
}

.tb-segment__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.6rem 0.5rem;
	border: none;
	background: transparent;
	border-radius: 8px;
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--tb-muted);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tb-segment__btn:hover {
	color: var(--tb-text);
}

.tb-segment__btn.is-active {
	background: var(--tb-asphalt);
	color: #fff;
	box-shadow: 0 4px 10px -4px rgba(30, 35, 48, 0.5);
}

.tb-segment__btn.is-active .tb-icon {
	stroke: var(--tb-amber);
}

.tb-icon {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

/* ---------- Route: pickup/drop-off with connecting line ---------- */

.tb-route {
	display: grid;
	grid-template-columns: 24px 1fr;
	gap: 0.85rem;
}

.tb-route__line {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 0.95rem;
}

.tb-route__dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	flex-shrink: 0;
}

.tb-route__dot--start {
	background: var(--tb-amber);
	box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.2);
}

.tb-route__dot--end {
	background: var(--tb-asphalt);
	box-shadow: 0 0 0 3px rgba(30, 35, 48, 0.12);
}

.tb-route__dash {
	flex: 1;
	width: 2px;
	min-height: 38px;
	background: repeating-linear-gradient(180deg, var(--tb-line) 0 6px, transparent 6px 11px);
	margin: 4px 0;
}

.tb-route__fields {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* ---------- Dynamic sections per transport type ---------- */

.tb-dynamic {
	animation: tb-fade-in 0.2s ease;
}

.tb-dynamic.is-hidden {
	display: none;
}

@keyframes tb-fade-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- Divider ---------- */

.tb-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--tb-muted);
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.tb-divider::before,
.tb-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--tb-line);
}

/* ---------- Submit button ---------- */

.tb-field--submit {
	margin-top: 0.25rem;
}

.tb-submit {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	background: var(--tb-amber);
	color: var(--tb-asphalt);
	border: none;
	border-radius: 10px;
	padding: 0.85rem 1.25rem;
	font-family: 'Oswald', sans-serif;
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 8px 18px -8px rgba(255, 159, 28, 0.55);
}

.tb-submit:hover {
	background: var(--tb-amber-dark);
	transform: translateY(-1px);
}

.tb-submit:active {
	transform: translateY(0);
}

.tb-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.tb-submit__icon {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.15s ease;
}

.tb-submit:hover .tb-submit__icon {
	transform: translateX(3px);
}

.tb-form-msg {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 500;
	text-align: center;
	min-height: 1.2em;
}

.tb-form-msg.is-error {
	color: var(--tb-danger);
}

/* ---------- Ticket-style confirmation ---------- */

.tb-ticket {
	margin-top: 1.5rem;
	background: var(--tb-asphalt);
	color: #fff;
	border-radius: var(--tb-radius);
	overflow: hidden;
	box-shadow: 0 16px 40px -14px rgba(20, 22, 30, 0.45);
	animation: tb-fade-in 0.25s ease;
}

.tb-ticket.is-hidden {
	display: none;
}

.tb-ticket__top {
	padding: 1.75rem 1.75rem 1.25rem;
}

.tb-ticket__eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--tb-amber);
	margin-bottom: 0.4rem;
}

.tb-ticket__title {
	font-family: 'Oswald', sans-serif;
	font-size: 1.5rem;
	margin: 0;
}

.tb-ticket__perforation {
	position: relative;
	height: 0;
	border-top: 2px dashed rgba(255, 255, 255, 0.25);
	margin: 0 1.75rem;
}

.tb-ticket__perforation::before,
.tb-ticket__perforation::after {
	content: '';
	position: absolute;
	top: -10px;
	width: 20px;
	height: 20px;
	background: var(--tb-paper, #f8f6f1);
	border-radius: 50%;
}

.tb-ticket__perforation::before {
	left: -1.75rem;
	transform: translateX(-50%);
	background: #f4f1ea;
}

.tb-ticket__perforation::after {
	right: -1.75rem;
	transform: translateX(50%);
	background: #f4f1ea;
}

.tb-ticket__body {
	padding: 1.5rem 1.75rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 1.5rem;
	font-size: 0.92rem;
}

.tb-ticket__item {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.tb-ticket__item-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.55);
}

.tb-ticket__item-value {
	font-weight: 600;
}

.tb-ticket__item--full {
	grid-column: 1 / -1;
}

.tb-ticket__new {
	width: calc(100% - 3.5rem);
	margin: 0.5rem 1.75rem 1.75rem;
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	padding: 0.65rem 1rem;
	border-radius: 9px;
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.tb-ticket__new:hover {
	border-color: var(--tb-amber);
	background: rgba(255, 159, 28, 0.08);
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
	.tb-wrap {
		margin: 1.25rem auto;
	}
	.tb-card__band {
		padding: 1.25rem 1.25rem;
	}
	.tb-card__title {
		font-size: 1.1rem;
	}
	.tb-card__body {
		padding: 1.25rem;
	}
	.tb-row,
	.tb-ticket__body {
		grid-template-columns: 1fr;
	}
	.tb-segment {
		grid-template-columns: 1fr;
	}
	.tb-ticket__new {
		width: calc(100% - 2.5rem);
		margin: 0.5rem 1.25rem 1.25rem;
	}
	.tb-ticket__top,
	.tb-ticket__body {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
	.tb-ticket__perforation {
		margin: 0 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tb-dynamic,
	.tb-ticket,
	.tb-submit,
	.tb-submit__icon {
		animation: none !important;
		transition: none !important;
	}
}

/* ==========================================================================
   Logo in the form header
   ========================================================================== */

.tb-card__logo {
	max-height: 32px;
	max-width: 120px;
	object-fit: contain;
	flex-shrink: 0;
}

/* ==========================================================================
   Price below the transport-type tabs
   ========================================================================== */

.tb-price-hint {
	margin: 0.6rem 0 0;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--tb-amber-dark);
	text-align: center;
}

.tb-price-hint.is-empty {
	display: none;
}

/* ==========================================================================
   Calendar with booked time slots
   ========================================================================== */

.tb-datepicker {
	position: relative;
}

.tb-date-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 0.85rem;
	border: 1.5px solid var(--tb-line);
	border-radius: 9px;
	background: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--tb-muted);
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-date-trigger:hover {
	border-color: #c9c4b7;
}

.tb-date-trigger.has-value {
	color: var(--tb-text);
	font-weight: 600;
}

.tb-date-trigger .tb-icon {
	color: var(--tb-amber-dark);
	flex-shrink: 0;
}

.tb-calendar {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 30;
	background: #fff;
	border: 1px solid var(--tb-line);
	border-radius: 12px;
	box-shadow: 0 16px 36px -12px rgba(20, 22, 30, 0.25);
	padding: 1rem;
	max-width: 320px;
}

.tb-calendar.is-hidden {
	display: none;
}

.tb-calendar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
}

.tb-calendar__month {
	font-family: 'Oswald', sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--tb-asphalt);
	text-transform: capitalize;
}

.tb-calendar__nav {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	border: 1px solid var(--tb-line);
	background: var(--tb-paper);
	color: var(--tb-asphalt);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.12s ease;
}

.tb-calendar__nav:hover {
	background: #efece4;
}

.tb-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 0.35rem;
}

.tb-calendar__weekdays span {
	text-align: center;
	font-size: 0.68rem;
	font-weight: 600;
	color: var(--tb-muted);
	text-transform: uppercase;
}

.tb-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 3px;
}

.tb-cal-day {
	position: relative;
	aspect-ratio: 1;
	border: none;
	background: transparent;
	border-radius: 8px;
	font-size: 0.85rem;
	color: var(--tb-text);
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.tb-cal-day:hover:not(.is-disabled):not(.is-empty) {
	background: var(--tb-paper);
}

.tb-cal-day--empty {
	cursor: default;
	pointer-events: none;
}

.tb-cal-day.is-disabled {
	color: #c8c4ba;
	cursor: not-allowed;
}

.tb-cal-day.is-today {
	font-weight: 700;
	color: var(--tb-amber-dark);
}

.tb-cal-day.is-selected {
	background: var(--tb-asphalt);
	color: #fff;
}

.tb-cal-day.has-bookings::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--tb-amber);
}

.tb-cal-day.is-selected.has-bookings::after {
	background: #fff;
}

.tb-calendar__legend {
	margin-top: 0.6rem;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.72rem;
	color: var(--tb-muted);
}

.tb-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

.tb-dot--busy {
	background: var(--tb-amber);
}

/* ---------- Time slots (slot chips) ---------- */

.tb-slots {
	margin-top: 0.9rem;
}

.tb-slots__hint {
	margin: 0;
	font-size: 0.85rem;
	color: var(--tb-muted);
}

.tb-slot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 0.5rem;
}

.tb-slot-chip {
	padding: 0.5rem 0.4rem;
	border: 1.5px solid var(--tb-line);
	border-radius: 8px;
	background: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--tb-text);
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.tb-slot-chip:hover:not(.is-disabled) {
	border-color: var(--tb-amber);
}

.tb-slot-chip.is-selected {
	background: var(--tb-amber);
	border-color: var(--tb-amber);
	color: var(--tb-asphalt);
}

.tb-slot-chip.is-disabled {
	color: #c8c4ba;
	text-decoration: line-through;
	cursor: not-allowed;
	background: var(--tb-paper);
}

@media (max-width: 560px) {
	.tb-calendar {
		max-width: none;
	}
}

/* ==========================================================================
   Vehicle selection on the form
   ========================================================================== */

.tb-vehicle-section.is-hidden {
	display: none;
}

.tb-vehicle-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.75rem;
}

.tb-vehicle-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	padding: 0.85rem 0.6rem;
	border: 1.5px solid var(--tb-line);
	border-radius: 11px;
	background: #fff;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tb-vehicle-card:hover {
	border-color: #c9c4b7;
	transform: translateY(-1px);
}

.tb-vehicle-card.is-selected {
	border-color: var(--tb-amber);
	box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.18);
}

.tb-vehicle-card__img {
	width: 100%;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: var(--tb-paper);
	overflow: hidden;
}

.tb-vehicle-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tb-vehicle-card__placeholder {
	font-size: 1.6rem;
}

.tb-vehicle-card__name {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--tb-text);
}

.tb-vehicle-card__meta {
	font-size: 0.74rem;
	color: var(--tb-muted);
}

@media (max-width: 560px) {
	.tb-vehicle-grid {
		grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	}
}

/* ==========================================================================
   Honeypot (spam protection) — invisible to users
   ========================================================================== */

.tb-hp-wrap {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

/* ==========================================================================
   Non-working days in the calendar
   ========================================================================== */

.tb-cal-day.is-blocked {
	text-decoration: line-through;
	color: #d8a0a0;
}

/* ==========================================================================
   Cancel link in the confirmation
   ========================================================================== */

.tb-ticket__cancel {
	display: block;
	text-align: center;
	margin: 0.9rem 1.75rem 0;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: underline;
}

.tb-ticket__cancel:hover {
	color: #fff;
}

.tb-ticket__cancel.is-hidden {
	display: none;
}

@media (max-width: 560px) {
	.tb-ticket__cancel {
		margin: 0.9rem 1.25rem 0;
	}
}

/* ==========================================================================
   Consent (GDPR checkbox)
   ========================================================================== */

.tb-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.85rem;
	color: var(--tb-text);
	cursor: pointer;
	line-height: 1.4;
}

.tb-checkbox input[type="checkbox"] {
	margin-top: 0.2rem;
	width: 16px;
	height: 16px;
	accent-color: var(--tb-amber);
	flex-shrink: 0;
	cursor: pointer;
}

.tb-checkbox a {
	color: var(--tb-amber-dark);
	text-decoration: underline;
}
