/**
 * Fueling Brains Tour Booking – Frontend & Admin Styles
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.fba-tour-booking {
	--fba-primary: #1a5276;
	--fba-primary-dark: #154360;
	--fba-primary-light: #2980b9;
	--fba-accent: #e67e22;
	--fba-success: #27ae60;
	--fba-border: #dee2e6;
	--fba-bg-light: #f8f9fa;
	--fba-text: #2c3e50;
	--fba-text-muted: #6c757d;
	--fba-radius: 8px;
	--fba-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--fba-text);
	max-width: 900px;
	margin: 0 auto;
	padding: 1.5rem 1rem;
}

/* ==========================================================================
   Step Progress Bar
   ========================================================================== */

.fba-progress-wrapper {
	background: var(--fba-bg-light);
	border-radius: var(--fba-radius);
	padding: 1.5rem 2rem;
	border: 1px solid var(--fba-border);
}

.fba-progress-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
}

.fba-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	flex: 0 0 auto;
	min-width: 100px;
}

.fba-step-number {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--fba-border);
	color: var(--fba-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1rem;
	transition: all 0.3s ease;
}

.fba-step-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--fba-text-muted);
	text-align: center;
	transition: color 0.3s ease;
}

.fba-step-connector {
	flex: 1;
	height: 2px;
	background: var(--fba-border);
	min-width: 40px;
	max-width: 120px;
	margin-bottom: 1.5rem;
	transition: background 0.3s ease;
}

/* Active step */
.fba-step-active .fba-step-number {
	background: var(--fba-primary);
	border-color: var(--fba-primary);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(26, 82, 118, 0.15);
}

.fba-step-active .fba-step-label {
	color: var(--fba-primary);
}

/* Completed step */
.fba-step-completed .fba-step-number {
	background: var(--fba-success);
	border-color: var(--fba-success);
	color: #fff;
}

.fba-step-completed .fba-step-label {
	color: var(--fba-success);
}

.fba-step-completed + .fba-step-connector,
.fba-step-active + .fba-step-connector {
	background: var(--fba-primary-light);
}

/* ==========================================================================
   Center Information
   ========================================================================== */

.fba-center-info {
	text-align: center;
	padding: 1.5rem;
	background: var(--fba-bg-light);
	border-radius: var(--fba-radius);
	border-left: 4px solid var(--fba-primary);
}

.fba-center-name {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--fba-primary);
	margin: 0 0 0.25rem;
}

.fba-center-address {
	font-size: 1rem;
	color: var(--fba-text-muted);
	margin: 0;
}

/* ==========================================================================
   Form Sections
   ========================================================================== */

.fba-form-section {
	background: #fff;
	border: 1px solid var(--fba-border);
	border-radius: var(--fba-radius);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--fba-shadow);
}

.fba-section-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--fba-primary);
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--fba-bg-light);
}

.fba-required {
	color: #e74c3c;
	font-weight: 700;
}

/* Form controls override */
.fba-tour-booking .form-label {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--fba-text);
	margin-bottom: 0.35rem;
}

.fba-tour-booking .form-control,
.fba-tour-booking .form-select {
	border-radius: 6px;
	border-color: var(--fba-border);
	padding: 0.6rem 0.85rem;
	font-size: 0.95rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fba-tour-booking .form-control:focus,
.fba-tour-booking .form-select:focus {
	border-color: var(--fba-primary-light);
	box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.12);
}

.fba-tour-booking .form-control.is-invalid,
.fba-tour-booking .form-select.is-invalid {
	border-color: #e74c3c;
}

.fba-tour-booking .invalid-feedback {
	font-size: 0.82rem;
	display: none;
}

.fba-tour-booking .is-invalid ~ .invalid-feedback {
	display: block;
}

/* Gender options */
.fba-gender-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	padding: 0.5rem 0;
}

.fba-gender-options .form-check-label {
	font-weight: 500;
	cursor: pointer;
}

/* Character counter */
.fba-char-counter {
	text-align: right;
	font-size: 0.82rem;
	color: var(--fba-text-muted);
	margin-top: 0.35rem;
}

.fba-char-counter.fba-char-warning {
	color: #e67e22;
	font-weight: 600;
}

.fba-char-counter.fba-char-limit {
	color: #e74c3c;
	font-weight: 700;
}

/* ==========================================================================
   Date Fields
   ========================================================================== */

.fba-date-field {
	position: relative;
	display: flex;
	align-items: stretch;
}

.fba-date-field .fba-date-input {
	padding-right: 2.75rem;
	cursor: pointer;
	background-color: #fff;
}

.fba-date-field .fba-date-input.form-control.is-invalid,
.fba-date-field .form-control.fba-date-input.is-invalid {
	padding-right: 2.75rem;
}

.fba-date-field .flatpickr-input.form-control {
	padding-right: 2.75rem;
	cursor: pointer;
	background-color: #fff;
}

.fba-date-field .flatpickr-input.form-control.is-invalid {
	padding-right: 2.75rem;
}

.fba-date-icon {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--fba-primary);
	cursor: pointer;
	border-radius: 0 6px 6px 0;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.fba-date-icon:hover,
.fba-date-icon:focus {
	color: var(--fba-primary-dark);
	background-color: rgba(26, 82, 118, 0.06);
	outline: none;
}

.fba-date-field .form-control:focus,
.fba-date-field .flatpickr-input:focus {
	border-color: var(--fba-primary-light);
	box-shadow: 0 0 0 0.2rem rgba(26, 82, 118, 0.15);
}

/* Flatpickr theme */
.fba-tour-booking .flatpickr-calendar {
	border-radius: var(--fba-radius);
	border: 1px solid var(--fba-border);
	box-shadow: var(--fba-shadow);
	font-family: inherit;
}

.fba-tour-booking .flatpickr-months .flatpickr-month {
	background: var(--fba-primary);
	color: #fff;
	border-radius: var(--fba-radius) var(--fba-radius) 0 0;
}

.fba-tour-booking .flatpickr-current-month .flatpickr-monthDropdown-months,
.fba-tour-booking .flatpickr-current-month input.cur-year {
	color: #fff;
	font-weight: 600;
}

.fba-tour-booking .flatpickr-weekdays {
	background: var(--fba-bg-light);
}

.fba-tour-booking span.flatpickr-weekday {
	color: var(--fba-text-muted);
	font-weight: 600;
}

.fba-tour-booking .flatpickr-day.selected,
.fba-tour-booking .flatpickr-day.startRange,
.fba-tour-booking .flatpickr-day.endRange {
	background: var(--fba-primary);
	border-color: var(--fba-primary);
}

.fba-tour-booking .flatpickr-day.selected:hover,
.fba-tour-booking .flatpickr-day:hover {
	background: var(--fba-primary-light);
	border-color: var(--fba-primary-light);
}

.fba-tour-booking .flatpickr-day.today {
	border-color: var(--fba-accent);
}

.fba-tour-booking .flatpickr-day.flatpickr-disabled,
.fba-tour-booking .flatpickr-day.flatpickr-disabled:hover {
	color: #cbd5e0;
	background: transparent;
	border-color: transparent;
	cursor: not-allowed;
}

.fba-tour-booking .flatpickr-months .flatpickr-prev-month,
.fba-tour-booking .flatpickr-months .flatpickr-next-month {
	fill: #fff;
}

.fba-tour-booking .flatpickr-months .flatpickr-prev-month:hover svg,
.fba-tour-booking .flatpickr-months .flatpickr-next-month:hover svg {
	fill: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.fba-center-select-section {
	margin-bottom: 0.5rem;
}

.fba-centers-repeater .code {
	font-family: Consolas, Monaco, monospace;
}

.fba-centers-repeater td {
	vertical-align: top;
}

.fba-centers-repeater textarea.large-text {
	min-height: 60px;
}

.fba-form-actions {
	text-align: center;
	padding: 1rem 0 0.5rem;
}

.fba-tour-booking .btn-primary {
	background-color: var(--fba-primary);
	border-color: var(--fba-primary);
	padding: 0.75rem 3rem;
	font-size: 1.05rem;
	font-weight: 600;
	border-radius: 6px;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.fba-tour-booking .btn-primary:hover,
.fba-tour-booking .btn-primary:focus {
	background-color: var(--fba-primary-dark);
	border-color: var(--fba-primary-dark);
}

.fba-tour-booking .btn-primary:active {
	transform: scale(0.98);
}

.fba-tour-booking .btn-primary:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* ==========================================================================
   Iframe Container
   ========================================================================== */

.fba-iframe-wrapper {
	border: 1px solid var(--fba-border);
	border-radius: var(--fba-radius);
	overflow: hidden;
	box-shadow: var(--fba-shadow);
	background: #fff;
}

.fba-iframe-wrapper iframe {
	display: block;
	width: 100%;
	height: 1000px;
	border: none;
}

/* ==========================================================================
   Alert
   ========================================================================== */

#fba-alert,
#fba-success-alert {
	border-radius: var(--fba-radius);
	font-size: 0.95rem;
}

#fba-success-alert {
	text-align: center;
	margin-bottom: 0;
}

.fba-success-actions .btn {
	min-width: 220px;
}

.fba-thank-you-page .fba-thank-you-card {
	background: #fff;
	border: 1px solid var(--fba-border);
	border-radius: var(--fba-radius);
	box-shadow: var(--fba-shadow);
	padding: 2.5rem 2rem;
	text-align: center;
}

.fba-thank-you-icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 1.25rem;
	border-radius: 50%;
	background: var(--fba-success);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
}

.fba-thank-you-title {
	color: var(--fba-primary);
	font-size: 1.75rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

.fba-thank-you-center {
	color: var(--fba-text-muted);
	margin-bottom: 0.75rem;
}

.fba-thank-you-message {
	font-size: 1.05rem;
	color: var(--fba-text);
	margin-bottom: 0;
}

.fba-thank-you-actions {
	margin-top: 1.75rem;
}

.fba-thank-you-actions .btn {
	min-width: 240px;
}

.fba-thank-you-back a {
	color: var(--fba-primary);
	font-weight: 600;
	text-decoration: none;
}

.fba-thank-you-back a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Admin Styles
   ========================================================================== */

.fba-admin-wrap .fba-search-form {
	margin: 1rem 0;
}

.fba-admin-wrap .column-id {
	width: 80px;
}

.fba-admin-wrap .tablenav-pages {
	float: right;
	margin: 1rem 0;
}

.fba-admin-wrap .pagination-links {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.fba-admin-wrap .paging-input {
	padding: 0 0.5rem;
	font-weight: 600;
}

.fba-admin-wrap code {
	background: var(--fba-bg-light, #f8f9fa);
	padding: 0.5rem 1rem;
	border-radius: 4px;
	font-size: 1rem;
	display: inline-block;
	margin-top: 0.5rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.fba-tour-booking {
		padding: 1rem 0.75rem;
	}

	.fba-progress-wrapper {
		padding: 1rem;
	}

	.fba-progress-steps {
		gap: 0;
	}

	.fba-step {
		min-width: 70px;
	}

	.fba-step-number {
		width: 34px;
		height: 34px;
		font-size: 0.9rem;
	}

	.fba-step-label {
		font-size: 0.72rem;
	}

	.fba-step-connector {
		min-width: 20px;
		max-width: 60px;
		margin-bottom: 1.2rem;
	}

	.fba-form-section {
		padding: 1rem;
	}

	.fba-gender-options {
		flex-direction: column;
		gap: 0.5rem;
	}

	.fba-tour-booking .btn-primary {
		width: 100%;
		padding: 0.85rem 1.5rem;
	}

	.fba-iframe-wrapper iframe {
		height: 800px;
	}
}

@media (max-width: 480px) {
	.fba-step-label {
		font-size: 0.65rem;
	}

	.fba-center-name {
		font-size: 1.25rem;
	}
}
