/* Ticket Search Widget */
.ct-ticket-search {
	width: 100%;
	max-width: 1152px;
	margin: 0 auto;
	padding: 16px;
	direction: rtl;
}

.ct-ticket-search *,
.ct-ticket-search *::before,
.ct-ticket-search *::after {
	box-sizing: border-box;
}

.ct-ticket-search button,
.ct-ticket-search input {
	font: inherit;
}

/* Reset Consultio global button styles (theme primary/gradient). */
.ct-ticket-search .submit-button,
.ct-ticket-search .submit-button:hover,
.ct-ticket-search .submit-button:focus,
.ct-ticket-search .submit-button:active {
	background-image: none;
	box-shadow: none;
	font-family: inherit;
	height: auto;
	line-height: 20px;
}

.ct-ticket-search .ticket-search__form {
	display: block;
	padding: 24px;
	background-color: #ffffff;
	border-radius: 16px;
	box-shadow:
		0 4px 6px -1px rgb(0 0 0 / 0.1),
		0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.ct-ticket-search .ticket-search__message {
	display: none;
	width: 100%;
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.6;
	font-weight: 500;
}

.ct-ticket-search .ticket-search__message:not([hidden]) {
	display: block;
}

.ct-ticket-search .ticket-search__message.is-success {
	color: #166534;
	background-color: #dcfce7;
	border: 1px solid #bbf7d0;
}

.ct-ticket-search .ticket-search__message.is-error {
	color: #991b1b;
	background-color: #fee2e2;
	border: 1px solid #fecaca;
}

.ct-ticket-search .ticket-search__fields {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: nowrap;
}

.ct-ticket-search .form-field {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
}

.ct-ticket-search .form-field__icon--phone,
.ct-ticket-search .form-field__icon--passenger,
.ct-ticket-search .form-field__icon--calendar {
	pointer-events: none;
}

.ct-ticket-search .form-field--dropdown {
	position: relative;
}

.ct-ticket-search .form-field__label {
	display: block;
	margin-bottom: 8px;
	padding-right: 8px;
	color: #4b5563;
	font-size: 14px;
	font-weight: 500;
	text-align: right;
}

.ct-ticket-search .form-field__control {
	position: relative;
	display: flex;
	align-items: center;
	padding: 8px 12px;
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

.ct-ticket-search .form-field__control--select {
	cursor: pointer;
	transition: border-color 150ms ease;
}

.ct-ticket-search .form-field__control--select:hover,
.ct-ticket-search .form-field--dropdown.is-open .form-field__control--select {
	border-color: #d1d5db;
}

.ct-ticket-search .form-field__input {
	width: 100%;
	min-width: 0;
	padding: 0;
	color: #374151;
	font-size: 14px;
	line-height: 20px;
	background-color: transparent;
	border: 0;
	outline: none;
}

.ct-ticket-search .form-field__input::placeholder {
	color: #9ca3af;
	opacity: 1;
}

.ct-ticket-search .form-field__input--select {
	cursor: pointer;
	pointer-events: none;
}

.ct-ticket-search .form-field__input[type="number"] {
	appearance: textfield;
	-moz-appearance: textfield;
}

.ct-ticket-search .form-field__input[type="number"]::-webkit-inner-spin-button,
.ct-ticket-search .form-field__input[type="number"]::-webkit-outer-spin-button {
	margin: 0;
}

.ct-ticket-search .form-field--datepicker {
	position: relative;
}

.ct-ticket-search .form-field__input[type="date"] {
	position: relative;
	cursor: pointer;
}

.ct-ticket-search .form-field__input[type="date"]::-webkit-calendar-picker-indicator {
	position: absolute;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.ct-ticket-search .ct-jalali-picker {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 60;
	width: 280px;
	margin-top: 8px;
	padding: 12px;
	background-color: #ffffff;
	border: 1px solid #f3f4f6;
	border-radius: 12px;
	box-shadow:
		0 10px 15px -3px rgb(0 0 0 / 0.1),
		0 4px 6px -4px rgb(0 0 0 / 0.1);
	direction: rtl;
}

.ct-ticket-search .ct-jalali-picker[hidden] {
	display: none !important;
}

.ct-ticket-search .form-field--datepicker.is-open .ct-jalali-picker {
	display: block;
}

.ct-ticket-search .ct-jalali-picker__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.ct-ticket-search .ct-jalali-picker__title {
	flex: 1;
	color: #1f2937;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.ct-ticket-search .ct-jalali-picker__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: #374151;
	font-size: 18px;
	line-height: 1;
	background-color: #f8fafc;
	background-image: none;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
}

.ct-ticket-search .ct-jalali-picker__nav:hover,
.ct-ticket-search .ct-jalali-picker__nav:focus,
.ct-ticket-search .ct-jalali-picker__nav:active {
	color: #1f2937;
	background-color: #f1f5f9;
	background-image: none;
	box-shadow: none;
}

.ct-ticket-search .ct-jalali-picker__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	margin-bottom: 6px;
}

.ct-ticket-search .ct-jalali-picker__weekdays span {
	color: #94a3b8;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	line-height: 28px;
}

.ct-ticket-search .ct-jalali-picker__days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.ct-ticket-search .ct-jalali-picker__day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 34px;
	padding: 0;
	color: #334155;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	background-color: transparent;
	background-image: none;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
}

.ct-ticket-search .ct-jalali-picker__day:hover,
.ct-ticket-search .ct-jalali-picker__day:focus,
.ct-ticket-search .ct-jalali-picker__day:active {
	color: #1f2937;
	background-color: #f8fafc;
	background-image: none;
	box-shadow: none;
}

.ct-ticket-search .ct-jalali-picker__day.is-today {
	box-shadow: inset 0 0 0 1px #facc15;
}

.ct-ticket-search .ct-jalali-picker__day.is-selected,
.ct-ticket-search .ct-jalali-picker__day.is-selected:hover,
.ct-ticket-search .ct-jalali-picker__day.is-selected:focus {
	color: #1f2937;
	background-color: #facc15;
	background-image: none;
}

.ct-ticket-search .ct-jalali-picker__day.is-empty,
.ct-ticket-search .ct-jalali-picker__day.is-empty:hover {
	cursor: default;
	background: transparent;
	box-shadow: none;
}

.ct-ticket-search .form-field__icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-right: 8px;
	color: #9ca3af;
}

.ct-ticket-search .form-field__icon--arrow {
	transition: transform 200ms ease;
}

.ct-ticket-search .form-field__icon--arrow.is-open {
	transform: rotate(180deg);
}

.ct-ticket-search .dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 50;
	margin-top: 8px;
	overflow: hidden;
	background-color: #ffffff;
	border: 1px solid #f3f4f6;
	border-radius: 12px;
	box-shadow:
		0 10px 15px -3px rgb(0 0 0 / 0.1),
		0 4px 6px -4px rgb(0 0 0 / 0.1);
	opacity: 0;
	transform: translateY(-8px);
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 200ms ease,
		transform 200ms ease,
		visibility 200ms ease;
}

.ct-ticket-search .form-field--dropdown.is-open .dropdown {
	opacity: 1;
	transform: translateY(0);
	visibility: visible;
	pointer-events: auto;
}

.ct-ticket-search .dropdown[hidden] {
	display: block !important;
}

.ct-ticket-search .dropdown__list {
	max-height: 192px;
	margin: 0;
	padding: 4px 0;
	overflow-y: auto;
	list-style: none;
}

.ct-ticket-search .dropdown__item {
	padding: 8px 16px;
	color: #374151;
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.ct-ticket-search .dropdown__item:hover,
.ct-ticket-search .dropdown__item:focus {
	background-color: #f9fafb;
	outline: none;
}

.ct-ticket-search .submit-wrapper {
	flex: 0 0 auto;
	width: auto;
	margin-top: 0;
}

.ct-ticket-search .submit-button {
	display: inline-block;
	width: 128px;
	padding: 12px 16px;
	color: #1f2937;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	background-color: #facc15;
	background-image: none;
	border: 0;
	border-radius: 12px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 200ms ease;
}

.ct-ticket-search .submit-button:hover,
.ct-ticket-search .submit-button:focus,
.ct-ticket-search .submit-button:active {
	color: #1f2937;
	background-color: #eab308;
	background-image: none;
	background-position: 0%;
}

@media (max-width: 1100px) {
	.ct-ticket-search .ticket-search__fields {
		flex-wrap: wrap;
	}

	.ct-ticket-search .form-field {
		flex: 1 1 calc(33.333% - 12px);
		min-width: 140px;
	}

	.ct-ticket-search .submit-wrapper {
		flex: 1 1 calc(33.333% - 12px);
		min-width: 140px;
	}

	.ct-ticket-search .submit-button {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.ct-ticket-search .ticket-search__fields {
		flex-direction: column;
		align-items: stretch;
		flex-wrap: wrap;
	}

	.ct-ticket-search .form-field {
		width: 100%;
		flex: 1 1 100%;
	}

	.ct-ticket-search .submit-wrapper {
		width: 100%;
		margin-top: 8px;
	}

	.ct-ticket-search .submit-button {
		width: 100%;
	}
}
