/*!
 * CBASCO Haika — Tour Registration Form
 * - Hero with intro pills
 * - 5 numbered blocks (Personal / Visit / Health / Emergency / Agreements)
 * - Conditional fields (vehicle, companion count, condition text)
 * - Validated inputs (mobile, national ID, dates)
 * - Submit disabled until both agreement checkboxes checked
 * Mobile-first, RTL.
 */

/* ════════════════════════════════════════════════
   BASE
   ════════════════════════════════════════════════ */
.cbtour-main {
	background: var(--cb-bg, #0d1117);
	color: var(--cb-text, #e4e8ee);
	overflow: hidden;
}
.cbtour-sec { padding: 32px 0 96px; position: relative; }
.cbtour-honey {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important; height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════ */
.cbtour-hero {
	position: relative;
	padding: 80px 0 56px;
	overflow: hidden;
	background:
		radial-gradient(ellipse at 50% 0%, rgba(200, 168, 76, 0.12) 0%, transparent 55%),
		radial-gradient(ellipse at 100% 100%, rgba(100, 170, 210, 0.07) 0%, transparent 60%),
		linear-gradient(180deg, var(--cb-bg-deep, #0a0e14) 0%, var(--cb-bg, #0d1117) 100%);
}
.cbtour-hero-title {
	font-size: clamp(1.9rem, 5vw, 3.2rem);
	font-weight: 800;
	line-height: 1.2;
	margin: 12px 0 14px;
}
.cbtour-hero-title em {
	font-style: normal;
	background: linear-gradient(120deg, var(--cb-gold, #c8a84c) 0%, var(--cb-gold-m, #e8c878) 50%, var(--cb-gold, #c8a84c) 100%);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: cbtour-shimmer 6s linear infinite;
}
@keyframes cbtour-shimmer {
	0%   { background-position: 0% 50%; }
	100% { background-position: 200% 50%; }
}
.cbtour-hero-sub {
	font-size: clamp(0.95rem, 1.6vw, 1.05rem);
	color: var(--cb-text-muted, #98a2af);
	margin: 0 auto 28px;
	max-width: 720px;
	line-height: 1.9;
}
.cbtour-hero-pills {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.cbtour-pill {
	display: inline-block;
	padding: 7px 12px;
	background: rgba(200, 168, 76, .09);
	border: 1px solid rgba(200, 168, 76, .28);
	color: var(--cb-gold-l, #e8d8a8);
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
}

/* ════════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════════ */
.cbtour-alert {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	max-width: 820px;
	margin: 0 auto 24px;
	padding: 18px 22px;
	border-radius: 14px;
	border: 1px solid;
	font-size: 0.92rem;
	line-height: 1.85;
}
.cbtour-alert svg { flex: 0 0 28px; width: 28px; height: 28px; margin-top: 2px; }
.cbtour-alert strong { display: block; font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.cbtour-alert p { margin: 0; opacity: .9; }
.cbtour-alert--success {
	background: rgba(56, 178, 154, .12);
	border-color: rgba(56, 178, 154, .35);
	color: #5ed4bc;
}
.cbtour-alert--error {
	background: rgba(200, 88, 120, .12);
	border-color: rgba(200, 88, 120, .35);
	color: #f8a8b8;
}

/* ════════════════════════════════════════════════
   FORM
   ════════════════════════════════════════════════ */
.cbtour-form {
	max-width: 880px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.cbtour-block {
	background: linear-gradient(160deg, rgba(255,255,255,.03), rgba(255,255,255,.005));
	border: 1px solid rgba(100, 170, 210, .18);
	border-radius: 20px;
	padding: 26px 24px 24px;
	position: relative;
	transition: border-color .3s, box-shadow .3s;
}
.cbtour-block:hover {
	border-color: rgba(100, 170, 210, .35);
}
.cbtour-block--agree {
	background: linear-gradient(135deg, rgba(200, 168, 76, .08), rgba(255,255,255,.02));
	border-color: rgba(200, 168, 76, .32);
}

.cbtour-block-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(100, 170, 210, .12);
}
.cbtour-block-num {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(140deg, var(--cb-steel, #6aaecc), var(--cb-steel-d, #3a7ea0));
	color: #fff;
	font-size: 1.05rem;
	font-weight: 800;
	border-radius: 12px;
	box-shadow: 0 6px 16px rgba(100, 170, 210, .3);
}
.cbtour-block--agree .cbtour-block-num {
	background: linear-gradient(140deg, var(--cb-gold, #c8a84c), #b08828);
	box-shadow: 0 6px 16px rgba(200, 168, 76, .3);
}
.cbtour-block-head h2 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--cb-text);
	line-height: 1.4;
}
.cbtour-block-head p {
	margin: 4px 0 0;
	font-size: 0.82rem;
	color: var(--cb-text-muted, #98a2af);
}

/* Grid */
.cbtour-grid {
	display: grid;
	gap: 18px;
}
.cbtour-grid--2 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .cbtour-grid--2 { grid-template-columns: 1fr 1fr; } }

.cbtour-field--full { grid-column: 1 / -1; }

/* Fields */
.cbtour-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	position: relative;
}
.cbtour-label {
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--cb-text);
}
.cbtour-label em {
	color: #f8a8b8;
	font-style: normal;
	margin-right: 2px;
}

.cbtour-field input[type="text"],
.cbtour-field input[type="tel"],
.cbtour-field input[type="email"],
.cbtour-field input[type="date"],
.cbtour-field input[type="number"],
.cbtour-field textarea {
	width: 100%;
	padding: 12px 14px;
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(100, 170, 210, .18);
	border-radius: 10px;
	color: var(--cb-text);
	font-family: inherit;
	font-size: 0.92rem;
	transition: border-color .25s, background .25s, box-shadow .25s;
	font-variant-numeric: tabular-nums;
}
.cbtour-field input[type="email"],
.cbtour-field input[dir="ltr"],
.cbtour-field input[type="date"] {
	direction: ltr;
	text-align: start;
}
.cbtour-field textarea {
	min-height: 60px;
	resize: vertical;
	line-height: 1.7;
}
.cbtour-field input:focus,
.cbtour-field textarea:focus {
	outline: 0;
	border-color: var(--cb-steel, #6aaecc);
	background: rgba(255,255,255,.06);
	box-shadow: 0 0 0 4px rgba(100, 170, 210, .15);
}
.cbtour-field input::placeholder,
.cbtour-field textarea::placeholder {
	color: rgba(180, 196, 210, .35);
}

/* date picker indicator color hack */
.cbtour-field input[type="date"]::-webkit-calendar-picker-indicator {
	filter: invert(.7) hue-rotate(180deg);
	cursor: pointer;
}

.cbtour-err {
	font-size: 0.78rem;
	color: #f8a8b8;
	display: none;
}
.cbtour-hint {
	font-size: 0.78rem;
	color: var(--cb-text-muted, #98a2af);
}
.cbtour-field.is-error input,
.cbtour-field.is-error textarea {
	border-color: #c85878;
	background: rgba(200, 88, 120, .06);
}
.cbtour-field.is-error .cbtour-err { display: block; }

/* Radio group */
.cbtour-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.cbtour-radio {
	flex: 1 1 auto;
	min-width: 110px;
	position: relative;
	cursor: pointer;
}
.cbtour-radio input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.cbtour-radio span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 14px;
	background: rgba(255,255,255,.03);
	border: 1px solid rgba(100, 170, 210, .18);
	border-radius: 10px;
	color: var(--cb-text-muted, #b8c2cf);
	font-size: 0.88rem;
	font-weight: 600;
	transition: all .25s;
}
.cbtour-radio:hover span {
	border-color: rgba(100, 170, 210, .45);
	color: var(--cb-text);
}
.cbtour-radio input:checked + span {
	background: linear-gradient(135deg, rgba(100, 170, 210, .22), rgba(100, 170, 210, .08));
	border-color: var(--cb-steel, #6aaecc);
	color: var(--cb-highlight, #c8e0f0);
	box-shadow: 0 6px 16px rgba(100, 170, 210, .15);
}
.cbtour-radio input:focus-visible + span {
	outline: 2px solid var(--cb-steel, #6aaecc);
	outline-offset: 2px;
}

/* Conditional fields — slide in */
.cbtour-conditional {
	grid-column: 1 / -1;
}
@media (min-width: 720px) {
	#cbtour-vehicle-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
}
.cbtour-conditional[hidden] { display: none !important; }
.cbtour-conditional {
	animation: cbtour-slide-in .35s cubic-bezier(.34, 1.16, .64, 1);
}
@keyframes cbtour-slide-in {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Companion checkbox + count */
.cbtour-companion {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
@media (min-width: 540px) {
	.cbtour-companion {
		flex-direction: row;
		align-items: flex-end;
	}
	.cbtour-companion .cbtour-check { flex: 0 0 auto; padding-bottom: 12px; }
	.cbtour-companion .cbtour-field { flex: 1 1 auto; }
}

/* Checkboxes */
.cbtour-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}
.cbtour-check input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.cbtour-check-mark {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border: 2px solid rgba(100, 170, 210, .42);
	border-radius: 6px;
	background: rgba(255,255,255,.03);
	position: relative;
	transition: all .2s;
}
.cbtour-check-mark::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 6px;
	width: 6px;
	height: 11px;
	border: solid var(--cb-bg, #0d1117);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .2s;
}
.cbtour-check input:checked + .cbtour-check-mark {
	background: var(--cb-steel, #6aaecc);
	border-color: var(--cb-steel, #6aaecc);
}
.cbtour-check input:checked + .cbtour-check-mark::after {
	transform: rotate(45deg) scale(1);
}
.cbtour-check:hover .cbtour-check-mark {
	border-color: var(--cb-steel, #6aaecc);
}
.cbtour-check-text {
	flex: 1 1 auto;
	font-size: 0.9rem;
	color: var(--cb-text);
	line-height: 1.85;
}
.cbtour-check--big {
	background: linear-gradient(160deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
	border: 1px solid rgba(200, 168, 76, .22);
	border-radius: 14px;
	padding: 14px 18px;
	margin-top: 12px;
	transition: border-color .25s, background .25s;
}
.cbtour-check--big:hover {
	border-color: rgba(200, 168, 76, .42);
}
.cbtour-check--big input:checked ~ .cbtour-check-mark {
	background: var(--cb-gold, #c8a84c);
	border-color: var(--cb-gold, #c8a84c);
}
.cbtour-check--big .cbtour-check-text strong {
	display: block;
	font-weight: 800;
	color: var(--cb-gold-l, #e8d8a8);
	margin-bottom: 4px;
}
.cbtour-check--big .cbtour-check-text small {
	display: block;
	font-size: 0.78rem;
	color: var(--cb-text-muted, #98a2af);
	font-weight: normal;
	line-height: 1.75;
}
.cbtour-check.is-error {
	border-color: #c85878 !important;
	background: rgba(200, 88, 120, .07) !important;
}
.cbtour-check.is-error .cbtour-check-mark {
	border-color: #c85878;
}

/* Submit */
.cbtour-submit-row {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}
.cbtour-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 32px;
	border: 0;
	border-radius: 14px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 800;
	cursor: pointer;
	transition: all .3s ease;
	color: #fff;
}
.cbtour-btn svg { width: 20px; height: 20px; }
.cbtour-btn--primary {
	background: linear-gradient(135deg, var(--cb-gold, #c8a84c), var(--cb-gold-m, #e8c878));
	color: var(--cb-bg, #0d1117);
	box-shadow: 0 12px 28px rgba(200, 168, 76, .25);
}
.cbtour-btn--primary:hover:not(:disabled) {
	transform: translateY(-3px);
	box-shadow: 0 16px 36px rgba(200, 168, 76, .4);
}
.cbtour-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	background: linear-gradient(135deg, #6c7d8c, #4a5868);
	color: var(--cb-text);
	box-shadow: none;
}
.cbtour-submit-hint {
	font-size: 0.82rem;
	color: var(--cb-text-muted, #98a2af);
}

/* ════════════════════════════════════════════════
   MOBILE FINE-TUNING
   ════════════════════════════════════════════════ */
@media (max-width: 720px) {
	.cbtour-hero       { padding: 64px 0 44px; }
	.cbtour-sec        { padding: 24px 0 64px; }
	.cbtour-block      { padding: 22px 18px 20px; border-radius: 16px; }
	.cbtour-block-num  { flex: 0 0 38px; width: 38px; height: 38px; font-size: 0.95rem; }
	.cbtour-block-head h2 { font-size: 1rem; }
	.cbtour-block-head { margin-bottom: 18px; padding-bottom: 14px; }

	.cbtour-pill { font-size: 0.74rem; padding: 6px 10px; }

	.cbtour-grid--2 { grid-template-columns: 1fr; }
	#cbtour-vehicle-fields { grid-template-columns: 1fr !important; }

	.cbtour-companion { flex-direction: column; align-items: stretch; }
	.cbtour-companion .cbtour-check { padding-bottom: 0; }

	.cbtour-check--big { padding: 12px 14px; }
	.cbtour-check--big .cbtour-check-text { font-size: 0.85rem; }
	.cbtour-check--big .cbtour-check-text small { font-size: 0.74rem; }

	.cbtour-btn { padding: 14px 24px; font-size: 0.95rem; }

	.cbtour-alert { padding: 14px 16px; flex-direction: row; gap: 10px; }
	.cbtour-alert svg { flex: 0 0 22px; width: 22px; height: 22px; }
}

@media (max-width: 480px) {
	.cbtour-radio { min-width: 0; }
	.cbtour-radio span { padding: 10px; font-size: 0.82rem; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.cbtour-hero-title em,
	.cbtour-conditional { animation: none !important; }
	.cbtour-block,
	.cbtour-radio span,
	.cbtour-check-mark,
	.cbtour-btn,
	.cbtour-field input,
	.cbtour-field textarea { transition: none !important; }
}
