/* Cuckoo Tours Extras — multi-select fields in the enquiry form (mobile first). */

.cte-ms,
.cte-field {
	--cte-green: var(--primary-color1, #63ab45);
	--cte-green-rgb: var(--primary-color1-opc, 99, 171, 69);
	--cte-ink: var(--title-color, #100c08);
	--cte-text: #4f5550;
	--cte-muted: #6f756f;
	--cte-line: #e6eae2;
	--cte-bg: #fbfcfa;
	--cte-tint: #f4f7f0;
}

.cte-field .cte-hint { font-size: 12px; font-weight: 400; color: var(--cte-muted); }

/* Without JavaScript the native multi-select is shown, styled to match the other inputs. */
.cte-field select.cte-multiselect {
	width: 100%; min-height: 150px; padding: 6px; border: 1px solid var(--cte-line); border-radius: 10px;
	background: var(--cte-bg); color: var(--cte-ink); font-size: 16px;
}
.cte-field select.cte-multiselect optgroup { font-weight: 600; color: var(--cte-muted); }
.cte-field select.cte-multiselect option { padding: 6px 8px; color: var(--cte-ink); }

/* Enhanced: the native select stays in the form (CF7 submits it) but is hidden. */
.cte-ms-native {
	position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important;
	padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
	white-space: nowrap !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important;
}
.cte-ms-native ~ .nice-select { display: none !important; } /* TripRex turns every select into nice-select */

.cte-ms { position: relative; width: 100%; font-size: 16px; line-height: 1.4; text-align: left; }

.cte-ms .cte-ms__toggle {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px;
	padding: 12px 14px; margin: 0; border: 1px solid var(--cte-line); border-radius: 10px; background: var(--cte-bg);
	color: var(--cte-ink); font: inherit; font-size: 16px; text-align: left; cursor: pointer; box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}
.cte-ms .cte-ms__toggle:hover { border-color: rgba(var(--cte-green-rgb), .6); }
.cte-ms .cte-ms__toggle:focus-visible,
.cte-ms.is-open .cte-ms__toggle { outline: none; border-color: var(--cte-green); box-shadow: 0 0 0 3px rgba(var(--cte-green-rgb), .18); background: #fff; }
.cte-ms .cte-ms__summary { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cte-ms .cte-ms__summary.is-placeholder { color: var(--cte-muted); }
.cte-ms .cte-ms__chevron { flex: none; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .2s; opacity: .6; }
.cte-ms.is-open .cte-ms__chevron { transform: translateY(2px) rotate(225deg); }

/* The panel opens in the page flow (not floating), so it never gets clipped inside the sticky
   booking sidebar and is easy to scroll and tap on phones. */
.cte-ms .cte-ms__panel {
	margin-top: 6px; border: 1px solid var(--cte-line); border-radius: 12px; background: #fff;
	box-shadow: 0 8px 24px rgba(16, 38, 26, .08);
}
.cte-ms .cte-ms__panel[hidden] { display: none; }
.cte-ms .cte-ms__list { max-height: min(60vh, 340px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 0; }
.cte-ms .cte-ms__group + .cte-ms__group { border-top: 1px solid var(--cte-line); margin-top: 6px; padding-top: 6px; }
.cte-ms .cte-ms__group-title { margin: 0; padding: 8px 14px 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--cte-muted); }

.cte-ms .cte-ms__opt {
	display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; margin: 0; padding: 8px 14px;
	font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.3; color: var(--cte-ink); cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.cte-ms .cte-ms__opt:hover { background: var(--cte-tint); }
.cte-ms .cte-ms__opt input[type="checkbox"] {
	flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border-radius: 4px;
	accent-color: var(--cte-green); cursor: pointer;
}
.cte-ms .cte-ms__opt .cte-ms__text { color: var(--cte-ink); font-size: 16px; font-weight: 400; }
.cte-ms .cte-ms__opt input:checked + .cte-ms__text { font-weight: 500; }

.cte-ms .cte-ms__actions { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 12px; border-top: 1px solid var(--cte-line); }
.cte-ms .cte-ms__actions button {
	min-height: 40px; min-width: 0; width: auto; padding: 8px 16px; margin: 0; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer;
	border: 1px solid var(--cte-line); background: #fff; color: var(--cte-ink);
}
.cte-ms .cte-ms__actions .cte-ms__done { border-color: var(--cte-green); background: var(--cte-green); color: #fff; }

.cte-ms .cte-ms__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.cte-ms .cte-ms__chips:empty { display: none; }
.cte-ms .cte-ms__chips li {
	display: inline-flex; align-items: center; gap: 2px; max-width: 100%; margin: 0; padding: 2px 2px 2px 12px;
	border-radius: 999px; background: rgba(var(--cte-green-rgb), .12); color: var(--cte-ink); font-size: 14px; line-height: 1.3;
}
.cte-ms .cte-ms__chips li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; font-size: inherit; }
.cte-ms .cte-ms__chips button {
	flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-height: 0;
	margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
.cte-ms .cte-ms__chips button:hover,
.cte-ms .cte-ms__chips button:focus-visible { background: rgba(var(--cte-green-rgb), .25); outline: none; }

.cte-ms .cte-ms__toggle:focus-visible,
.cte-ms .cte-ms__opt input:focus-visible,
.cte-ms .cte-ms__actions button:focus-visible { outline: 2px solid var(--cte-green); outline-offset: 2px; }

/* CF7 marks invalid fields on the native select; mirror it on the visible control. */
.cte-ms.is-invalid .cte-ms__toggle { border-color: #dc3232; }

@media (min-width: 768px) {
	.cte-ms .cte-ms__opt { min-height: 40px; }
}

/* ---- Travellers (adults / children + ages) and number of days ---- */
.cte-travellers__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cte-field .cte-count__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--cte-text); }
.cte-field .cte-count__label .cte-hint { font-size: 12px; }

/* − [ 2 ] + counter */
.cte-stepper-box {
	display: flex; align-items: stretch; width: 100%; min-height: 50px; overflow: hidden;
	border: 1px solid var(--cte-line); border-radius: 10px; background: var(--cte-bg); transition: border-color .2s, box-shadow .2s;
}
.cte-stepper-box:focus-within { border-color: var(--cte-green); box-shadow: 0 0 0 3px rgba(var(--cte-green-rgb), .18); background: #fff; }
.cte-field .cte-stepper-box input[type="number"] {
	flex: 1 1 auto; width: 100%; min-width: 0; height: auto; min-height: 48px; margin: 0; padding: 0 4px; border: 0 !important;
	background: transparent; box-shadow: none !important; outline: none; color: var(--cte-ink); font-size: 17px; font-weight: 500; text-align: center;
	-moz-appearance: textfield; appearance: textfield;
}
.cte-field .cte-stepper-box input[type="number"]::-webkit-inner-spin-button,
.cte-field .cte-stepper-box input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cte-field .cte-stepper-box input[type="number"]::placeholder { font-size: 15px; font-weight: 400; color: var(--cte-muted); }
.cte-stepper-box .cte-step {
	flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; min-height: 48px; margin: 0; padding: 0;
	border: 0; border-radius: 0; background: transparent; color: var(--cte-ink); font-size: 22px; font-weight: 400; line-height: 1; cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.cte-stepper-box .cte-step:hover:not(:disabled) { background: rgba(var(--cte-green-rgb), .1); color: var(--cte-green); }
.cte-stepper-box .cte-step:focus-visible { outline: 2px solid var(--cte-green); outline-offset: -2px; }
.cte-stepper-box .cte-step:disabled { opacity: .35; cursor: default; }

/* One age picker per child */
.cte-child-ages[hidden] { display: none !important; } /* shown only when children are added */
.cte-ages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
/* !important: the theme styles every label inside the booking sidebar form bold and large */
.form-inner .cte-age label.cte-age__label {
	display: block !important; margin: 0 0 5px !important; font-family: inherit !important; font-size: 13px !important;
	font-weight: 400 !important; line-height: 1.3 !important; color: var(--cte-muted) !important; text-transform: none !important;
}
.cte-field select.cte-age-select {
	display: block !important; width: 100%; height: 46px; padding: 0 34px 0 12px; border: 1px solid var(--cte-line); border-radius: 10px;
	background: var(--cte-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23100C08' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
	color: var(--cte-ink); font-size: 15px; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.cte-field select.cte-age-select:focus { outline: none; border-color: var(--cte-green); box-shadow: 0 0 0 3px rgba(var(--cte-green-rgb), .18); }
.cte-age-select ~ .nice-select { display: none !important; }
.cte-child-ages .wpcf7-not-valid-tip { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
	.cte-ms .cte-ms__toggle, .cte-ms .cte-ms__chevron { transition: none; }
}
