/**
 * MST Round Trip – Frontend Styles
 * Colors match the Miami Shuttle Transportation brand:
 *   Primary blue:  #234a98 / #214c9a
 *   Dark blue:     #04182f
 *   Yellow accent: #f5b31a
 */

/* ── Block wrapper ──────────────────────────────────────────────────────────── */

.mst-roundtrip-block {
	margin: 24px 0 8px;
	border: 2px solid #234a98;
	border-radius: 12px;
	overflow: hidden;
	font-family: 'Montserrat', sans-serif;
	background: #fff;
	box-shadow: 0 3px 12px rgba(35, 74, 152, 0.10);
	transition: box-shadow 0.2s ease;
}

.mst-roundtrip-block:focus-within {
	box-shadow: 0 4px 18px rgba(35, 74, 152, 0.18);
}

/* ── Header: checkbox row ────────────────────────────────────────────────────── */

.mst-roundtrip-header {
	background: linear-gradient(135deg, #214c9a 0%, #0f3f91 100%);
	padding: 16px 20px;
}

.mst-roundtrip-label {
	display: flex;
	align-items: center;
	gap: 14px;
	cursor: pointer;
	margin: 0 !important;
}

/* ── Custom checkbox ─────────────────────────────────────────────────────────── */

.mst-roundtrip-checkbox-wrap {
	position: relative;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
}

.mst-roundtrip-checkbox-wrap input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	z-index: 1;
}

.mst-roundtrip-checkmark {
	display: block;
	width: 24px;
	height: 24px;
	border: 2px solid rgba(255, 255, 255, 0.7);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.12);
	transition: background 0.15s ease, border-color 0.15s ease;
	position: relative;
}

.mst-roundtrip-checkbox-wrap input[type="checkbox"]:checked ~ .mst-roundtrip-checkmark {
	background: #f5b31a;
	border-color: #f5b31a;
}

/* Tick */
.mst-roundtrip-checkmark::after {
	content: "";
	display: none;
	position: absolute;
	left: 6px;
	top: 2px;
	width: 6px;
	height: 12px;
	border: solid #1a1a1a;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
}

.mst-roundtrip-checkbox-wrap input[type="checkbox"]:checked ~ .mst-roundtrip-checkmark::after {
	display: block;
}

/* ── Label text & badge ──────────────────────────────────────────────────────── */

.mst-roundtrip-label-text {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	flex-wrap: wrap;
	line-height: 1.3;
}

.mst-roundtrip-badge {
	display: inline-block;
	background: #f5b31a;
	color: #1a1a1a;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.5px;
	padding: 3px 10px;
	border-radius: 20px;
	white-space: nowrap;
}

/* ── Return fields container ─────────────────────────────────────────────────── */

.mst-roundtrip-fields {
	display: none;
	padding: 20px;
	background: #f8faff;
	border-top: 1px solid #dbe7f8;
	gap: 16px;
}

/* Show side-by-side on wider screens */
@media (min-width: 600px) {
	.mst-roundtrip-fields {
		display: none; /* JS controls this */
		flex-direction: row;
		flex-wrap: wrap;
		gap: 16px 24px;
	}

	.mst-roundtrip-fields.is-visible {
		display: flex;
	}
}

@media (max-width: 599px) {
	.mst-roundtrip-fields.is-visible {
		display: block;
	}
}

/* ── Individual field group ──────────────────────────────────────────────────── */

.mst-field-group {
	flex: 1 1 200px;
	min-width: 200px;
}

@media (max-width: 599px) {
	.mst-field-group {
		margin-bottom: 16px;
	}
	.mst-field-group:last-child {
		margin-bottom: 0;
	}
}

/* ── Field labels ────────────────────────────────────────────────────────────── */

.mst-field-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #234a98;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px !important;
}

.mst-required {
	color: #e53e3e;
	margin-left: 3px;
}

/* ── Input wrap (icon + input) ───────────────────────────────────────────────── */

.mst-input-wrap {
	display: flex;
	align-items: center;
	background: #fff;
	border: 2px solid #c3d4f0;
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mst-input-wrap:focus-within {
	border-color: #234a98;
	box-shadow: 0 0 0 3px rgba(35, 74, 152, 0.12);
}

.mst-input-icon {
	padding: 0 10px;
	font-size: 16px;
	background: #eef3fc;
	border-right: 1px solid #c3d4f0;
	height: 44px;
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

/* ── Date input ──────────────────────────────────────────────────────────────── */

.mst-date-input {
	flex: 1;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	height: 44px !important;
	padding: 0 12px !important;
	font-size: 14px !important;
	color: #1a1a1a !important;
	font-family: 'Montserrat', sans-serif !important;
	margin: 0 !important;
	width: 100% !important;
}

.mst-date-input::-webkit-calendar-picker-indicator {
	opacity: 0.6;
	cursor: pointer;
}

/* ── Time select ─────────────────────────────────────────────────────────────── */

.mst-time-select {
	flex: 1;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	height: 44px !important;
	padding: 0 12px !important;
	font-size: 14px !important;
	color: #1a1a1a !important;
	font-family: 'Montserrat', sans-serif !important;
	margin: 0 !important;
	width: 100% !important;
	cursor: pointer;
	appearance: auto;
}

/* ── Error messages ──────────────────────────────────────────────────────────── */

.mst-error-msg {
	display: block;
	font-size: 12px;
	color: #e53e3e;
	font-weight: 600;
	margin-top: 5px;
	min-height: 16px;
}

/* ── Animation for the fields ────────────────────────────────────────────────── */

@keyframes mstSlideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mst-roundtrip-fields.is-visible {
	animation: mstSlideDown 0.22s ease forwards;
}

/* ── Mobile tweaks ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.mst-roundtrip-header {
		padding: 14px 16px;
	}

	.mst-roundtrip-label-text {
		font-size: 13px;
	}

	.mst-roundtrip-fields {
		padding: 16px;
	}
}
