/* ============================================
   Transfer Booking Modal (ftm- prefix)
   ============================================ */

/* ---- Overlay ---- */
.ftm-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: 20px;
}

.ftm-overlay[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}

/* ---- Dialog ---- */
.ftm-dialog {
	position: relative;
	background: #fff;
	border-radius: 16px;
	width: 100%;
	max-width: 680px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
	transform: translateY(20px) scale(0.97);
	transition: transform 0.3s ease;
}

.ftm-overlay[aria-hidden="false"] .ftm-dialog {
	transform: translateY(0) scale(1);
}

/* Scrollbar */
.ftm-dialog::-webkit-scrollbar {
	width: 6px;
}
.ftm-dialog::-webkit-scrollbar-track {
	background: transparent;
}
.ftm-dialog::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 3px;
}

/* ---- Close Button ---- */
.ftm-close {
	position: sticky;
	top: 12px;
	float: right;
	margin: 12px 12px 0 0;
	width: 40px;
	height: 40px;
	border: none;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background 0.2s, transform 0.2s;
}

.ftm-close:hover {
	background: rgba(0, 0, 0, 0.1);
	transform: rotate(90deg);
}

.ftm-close .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
	color: var(--text, #2c3e50);
}

/* ---- Steps ---- */
.ftm-step {
	padding: 0 32px 32px;
}

/* ---- Header (Route badge) ---- */
.ftm-header {
	text-align: center;
	padding: 8px 0 24px;
}

.ftm-route-badge {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: linear-gradient(135deg, #1a1a2e, #16213e);
	color: #fff;
	padding: 14px 28px;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
}

.ftm-route-arrow {
	color: var(--primary-color, #F3A51C);
	font-size: 18px;
}

.ftm-header-sub {
	margin: 12px 0 0;
	font-size: 14px;
	color: var(--text-light, #7F8C8D);
}

/* ---- Form ---- */
.ftm-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ftm-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--text, #2C3E50);
	margin-bottom: 8px;
}

.ftm-label i {
	color: var(--primary-color, #F3A51C);
	font-size: 14px;
	width: 16px;
	text-align: center;
}

.ftm-field input[type="date"],
.ftm-field input[type="time"],
.ftm-field input[type="number"] {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--border, #E0E0E0);
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	color: var(--text, #2C3E50);
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.ftm-field input:focus {
	outline: none;
	border-color: var(--primary-color, #F3A51C);
	box-shadow: 0 0 0 3px rgba(243, 165, 28, 0.12);
}

.ftm-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* ---- Radio Group ---- */
.ftm-radio-group {
	display: flex;
	gap: 12px;
}

.ftm-radio {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border: 2px solid var(--border, #E0E0E0);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.ftm-radio:hover {
	border-color: var(--primary-color, #F3A51C);
}

.ftm-radio input[type="radio"] {
	display: none;
}

.ftm-radio__box {
	width: 20px;
	height: 20px;
	border: 2px solid var(--border, #ccc);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.2s;
	flex-shrink: 0;
}

.ftm-radio__box::after {
	content: '';
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--primary-color, #F3A51C);
	transform: scale(0);
	transition: transform 0.2s;
}

.ftm-radio input[type="radio"]:checked ~ .ftm-radio__box {
	border-color: var(--primary-color, #F3A51C);
}

.ftm-radio input[type="radio"]:checked ~ .ftm-radio__box::after {
	transform: scale(1);
}

.ftm-radio input[type="radio"]:checked ~ .ftm-radio__text {
	font-weight: 600;
	color: var(--text, #2C3E50);
}

.ftm-radio__text {
	font-size: 14px;
	color: var(--text-light, #7F8C8D);
	transition: color 0.2s, font-weight 0.2s;
}

/* ---- Submit Button ---- */
.ftm-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 16px;
	border: none;
	border-radius: 12px;
	background: var(--primary-gradient, linear-gradient(135deg, #F3A51C, #f7c563));
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 15px rgba(243, 165, 28, 0.3);
	margin-top: 4px;
}

.ftm-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(243, 165, 28, 0.4);
}

.ftm-submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* ---- Loading State ---- */
.ftm-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	text-align: center;
}

.ftm-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(243, 165, 28, 0.2);
	border-top-color: var(--primary-color, #F3A51C);
	border-radius: 50%;
	animation: ftmSpin 0.8s linear infinite;
}

@keyframes ftmSpin {
	to { transform: rotate(360deg); }
}

.ftm-loading p {
	margin: 20px 0 0;
	font-size: 15px;
	color: var(--text-light, #7F8C8D);
}

/* ── Results inside modal ── */
.ftm-results-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border, #E0E0E0);
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.ftm-results-title {
	font-family: var(--font-heading, 'Palanquin Dark', sans-serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--text, #2C3E50);
	margin: 0;
}

.ftm-results-meta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--text-light, #7F8C8D);
}

.ftm-results-meta span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--background, #f5f5f5);
	padding: 4px 12px;
	border-radius: 20px;
}

.ftm-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border: 2px solid var(--border, #E0E0E0);
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	color: var(--text, #2C3E50);
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.ftm-back-btn:hover {
	border-color: var(--primary-color, #F3A51C);
	background: rgba(243, 165, 28, 0.05);
}

/* ── Vehicle Cards (modal version) ── */
.ftm-vehicles-grid {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ftm-vehicle-card {
	display: grid;
	grid-template-columns: 180px 1fr auto;
	gap: 20px;
	border: 2px solid var(--border, #E0E0E0);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.ftm-vehicle-card:hover {
	border-color: var(--primary-color, #F3A51C);
	box-shadow: 0 4px 20px rgba(243, 165, 28, 0.1);
}

.ftm-vehicle-image {
	position: relative;
	height: 100%;
	min-height: 160px;
	overflow: hidden;
}

.ftm-vehicle-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ftm-vehicle-image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--background, #f5f5f5);
	font-size: 3rem;
}

.ftm-vehicle-category {
	position: absolute;
	top: 10px;
	left: 10px;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	padding: 3px 10px;
	border-radius: 5px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ftm-vehicle-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 16px 0;
}

.ftm-vehicle-name {
	font-size: 18px;
	font-weight: 700;
	color: var(--text, #2C3E50);
	margin: 0 0 8px;
}

.ftm-vehicle-specs {
	display: flex;
	gap: 16px;
	margin-bottom: 8px;
}

.ftm-spec {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--text-light, #7F8C8D);
}

.ftm-vehicle-amenities {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.ftm-amenity {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--background, #f5f5f5);
	padding: 3px 8px;
	border-radius: 5px;
	font-size: 12px;
	color: var(--text-light, #7F8C8D);
}

.ftm-vehicle-price {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px 24px;
	border-left: 1px solid var(--border, #E0E0E0);
	text-align: center;
	min-width: 160px;
}

.ftm-price-amount {
	display: flex;
	align-items: baseline;
	gap: 2px;
	margin-bottom: 2px;
}

.ftm-price-currency {
	font-size: 18px;
	font-weight: 700;
	color: var(--primary-color, #F3A51C);
}

.ftm-price-value {
	font-size: 28px;
	font-weight: 800;
	color: var(--text, #2C3E50);
}

.ftm-price-type {
	font-size: 12px;
	color: var(--text-light, #7F8C8D);
	margin: 0 0 4px;
}

.ftm-price-alt {
	font-size: 12px;
	color: var(--text-lighter, #999);
	margin: 0 0 12px;
}

.ftm-price-alt strong {
	color: var(--text-light, #7F8C8D);
}

.ftm-select-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	background: var(--primary-gradient, linear-gradient(135deg, #F3A51C, #f7c563));
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	white-space: nowrap;
}

.ftm-select-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(243, 165, 28, 0.3);
}

.ftm-select-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* ── No Results ── */
.ftm-no-results {
	text-align: center;
	padding: 50px 20px;
}

.ftm-no-results-icon {
	font-size: 3rem;
	margin-bottom: 16px;
}

.ftm-no-results h3 {
	font-size: 20px;
	color: var(--text, #2C3E50);
	margin: 0 0 8px;
}

.ftm-no-results p {
	color: var(--text-light, #7F8C8D);
	margin: 0 0 20px;
}

/* ── Success Overlay ── */
.ftm-success-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	border-radius: 16px;
}

.ftm-success {
	text-align: center;
	padding: 40px;
}

.ftm-success-icon {
	width: 70px;
	height: 70px;
	background: #28a745;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
	font-size: 2rem;
	color: #fff;
}

.ftm-success h3 {
	font-size: 22px;
	color: var(--text, #2C3E50);
	margin: 0 0 8px;
}

.ftm-success p {
	color: var(--text-light, #7F8C8D);
	margin: 0;
}

.ftm-success .ftm-success-route {
	color: var(--secondary-color, #48B7B6);
	font-weight: 600;
}

.ftm-success .ftm-success-redirect {
	margin-top: 16px;
	font-size: 13px;
	color: var(--text-lighter, #999);
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.ftm-overlay {
		padding: 10px;
		align-items: flex-end;
	}

	.ftm-dialog {
		max-height: 95vh;
		border-radius: 16px 16px 0 0;
	}

	.ftm-step {
		padding: 0 20px 24px;
	}

	.ftm-row {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.ftm-radio-group {
		flex-direction: column;
		gap: 8px;
	}

	.ftm-route-badge {
		font-size: 13px;
		padding: 10px 20px;
		gap: 8px;
	}

	.ftm-vehicle-card {
		grid-template-columns: 1fr;
	}

	.ftm-vehicle-image {
		min-height: 140px;
		max-height: 180px;
	}

	.ftm-vehicle-info {
		padding: 0 16px;
	}

	.ftm-vehicle-price {
		border-left: none;
		border-top: 1px solid var(--border, #E0E0E0);
		padding: 16px;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		gap: 16px;
	}

	.ftm-results-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.ftm-route-badge {
		font-size: 12px;
		padding: 8px 16px;
		flex-wrap: wrap;
		justify-content: center;
	}
}
