/*!
 * KTM Care Booking — modal & form styles.
 * Colours fall back to the KTM Care brand when the theme is not active.
 */

/* ---------------- Modal ---------------- */
.ktm-lock { overflow: hidden; }

.ktm-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	padding: 15px;
	background: rgba(0, 35, 65, .72);
	backdrop-filter: blur(8px);
}

.ktm-modal.is-open {
	display: grid;
	place-items: center;
}

.ktm-modal-card {
	width: min(100%, 760px);
	max-height: calc(100vh - 30px);
	overflow: auto;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 30px 100px rgba(0, 0, 0, .25);
	outline: none;
}

.ktm-modal-head {
	position: sticky;
	top: 0;
	z-index: 2;
	padding: 22px 26px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	background: rgba(255, 255, 255, .97);
	border-bottom: 1px solid var(--line, #E3E9EC);
}

.ktm-modal-head h2 {
	font-size: 1.35rem;
	margin: 0;
	color: var(--navy, #003C72);
	font-family: var(--font-display, "Poppins", "Segoe UI", sans-serif);
}

.ktm-modal-close {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 50%;
	border: 1px solid var(--line, #E3E9EC);
	background: #fff;
	color: var(--navy, #003C72);
	font-size: 1.25rem;
	cursor: pointer;
	line-height: 1;
}

.ktm-modal-close:hover {
	border-color: var(--teal, #00BFA5);
	color: var(--teal-dark, #009A87);
}

.ktm-modal-body .ktm-booking-widget {
	padding: 27px;
}

/* ---------------- Inline form ---------------- */
.ktm-booking-inline .ktm-booking-widget {
	background: #fff;
	border: 1px solid var(--line, #E3E9EC);
	border-radius: 24px;
	box-shadow: var(--shadow-soft, 0 10px 35px rgba(0, 60, 114, .06));
	padding: 27px;
}

/* ---------------- Form ---------------- */
.ktm-booking-form h3 {
	color: var(--navy, #003C72);
	font-family: var(--font-display, "Poppins", "Segoe UI", sans-serif);
	font-size: 1.2rem;
	margin: 0;
}

.ktm-booking-form .ktm-step > p {
	margin: 7px 0 20px;
	color: var(--muted, #5E7180);
	font-size: .95rem;
}

.ktm-progress {
	display: flex;
	gap: 6px;
	margin-bottom: 24px;
}

.ktm-bar {
	height: 5px;
	flex: 1;
	background: #E7EFEE;
	border-radius: 9px;
}

.ktm-bar.is-active {
	background: var(--teal, #00BFA5);
}

.ktm-step { display: none; }
.ktm-step.is-active { display: block; }

/* Choices */
.ktm-choice-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.ktm-choice { position: relative; }

.ktm-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ktm-choice label {
	display: block;
	padding: 16px;
	border: 1px solid var(--line, #E3E9EC);
	border-radius: 14px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.ktm-choice label strong {
	display: block;
	color: var(--navy, #003C72);
	font-size: .95rem;
}

.ktm-choice label small {
	display: block;
	color: var(--muted, #5E7180);
	margin-top: 4px;
}

.ktm-choice input:checked + label {
	border-color: var(--teal, #00BFA5);
	background: #EAF7F4;
	box-shadow: 0 0 0 2px rgba(0, 191, 165, .12);
}

.ktm-choice input:focus-visible + label {
	outline: 3px solid var(--focus, #003C72);
	outline-offset: 2px;
}

/* Radio group error state. The inputs are visually hidden, so the message and
   the red edge have to live on the visible label grid. */
.ktm-choice-grid.has-error {
	outline: 2px solid #E60000;
	outline-offset: 6px;
	border-radius: 14px;
}

.ktm-choice-grid.has-error .ktm-error-msg {
	grid-column: 1 / -1;
}

/* Fields */
.ktm-form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
}

.ktm-field { display: grid; gap: 7px; align-content: start; }
.ktm-full { grid-column: 1 / -1; }

.ktm-field > label {
	font-size: .85rem;
	font-weight: 800;
	color: var(--navy, #003C72);
}

.ktm-field input[type="text"],
.ktm-field input[type="tel"],
.ktm-field input[type="email"],
.ktm-field input[type="date"],
.ktm-field select,
.ktm-field textarea {
	width: 100%;
	min-height: 48px;
	padding: 11px 13px;
	border: 1px solid #CCDCDC;
	border-radius: 10px;
	outline: 0;
	color: var(--ink, #17324A);
	background: #fff;
	font: inherit;
	box-sizing: border-box;
}

.ktm-field textarea { min-height: 100px; resize: vertical; }

.ktm-field input:focus,
.ktm-field select:focus,
.ktm-field textarea:focus {
	border-color: var(--teal, #00BFA5);
	box-shadow: 0 0 0 3px rgba(0, 191, 165, .12);
}

.ktm-field.has-error input,
.ktm-field.has-error select,
.ktm-field.has-error textarea {
	border-color: #E60000;
	box-shadow: 0 0 0 3px rgba(230, 0, 0, .08);
}

.ktm-error-msg {
	color: #E60000;
	font-size: .8rem;
	font-weight: 700;
}

.ktm-check-label {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	font-weight: 600;
	color: #3E5060;
	font-size: .88rem;
	cursor: pointer;
}

.ktm-check-label input { margin-top: 4px; }

/* Captcha */
.ktm-captcha-row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.ktm-captcha-question {
	background: var(--soft, #EFF6FB);
	padding: 11px 14px;
	border-radius: 10px;
	font-weight: 800;
	color: var(--navy, #003C72);
	white-space: nowrap;
}

.ktm-captcha-row input {
	max-width: 130px;
}

.ktm-captcha-refresh {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: 10px;
	border: 1px solid var(--line, #E3E9EC);
	background: #fff;
	color: var(--navy, #003C72);
	font-size: 1.15rem;
	cursor: pointer;
	line-height: 1;
}

.ktm-captcha-refresh:hover {
	border-color: var(--teal, #00BFA5);
	color: var(--teal-dark, #009A87);
}

/* Actions */
.ktm-form-actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--line, #E3E9EC);
}

.ktm-btn {
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	font-weight: 700;
	font-size: .9rem;
	cursor: pointer;
	text-decoration: none;
	box-sizing: border-box;
	transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.ktm-btn:hover { transform: translateY(-2px); }
.ktm-btn:active { transform: translateY(0); }

.ktm-primary {
	background: var(--gold, #FFBF00);
	color: var(--navy, #003C72);
	box-shadow: 0 10px 24px rgba(255, 191, 0, .28);
}

.ktm-primary:hover { background: var(--gold-dark, #E2A900); }

.ktm-outline {
	background: #fff;
	color: var(--navy, #003C72);
	border-color: var(--line, #E3E9EC);
}

.ktm-outline:hover { border-color: var(--teal, #00BFA5); }

.ktm-btn.is-loading {
	opacity: .7;
	pointer-events: none;
}

/* Status + success */
.ktm-form-status {
	margin-top: 14px;
	font-size: .88rem;
	font-weight: 700;
	min-height: 1em;
}

.ktm-form-status.is-error { color: #C40000; }
.ktm-form-status.is-success { color: #0B7A5C; }

/* Contact page form */
.ktm-contact { max-width: 760px; }
.ktm-contact-form { margin-top: 20px; }
.ktm-contact-notice {
	margin-bottom: 18px; padding: 14px 18px; border-radius: 14px;
	font-size: .92rem; line-height: 1.55; border: 1px solid;
}
.ktm-contact-notice strong { display: block; margin-bottom: 2px; }
.ktm-contact-notice.is-success { background: #ECF9F2; border-color: #9FD9BC; color: #0B5B3E; }
.ktm-contact-notice.is-error { background: #FDEDED; border-color: #F0B4B4; color: #8A1414; }
.ktm-contact-submit { margin-top: 20px; }
.ktm-captcha-row label { display: block; margin-bottom: 6px; }
.ktm-contact .ktm-captcha-question { font-weight: 700; color: var(--navy, #044B67); }

.ktm-success {
	text-align: center;
	padding: 34px 10px 14px;
	display: none;
}

.ktm-success.is-visible { display: block; }

.ktm-success-icon {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	margin: 0 auto 16px;
	display: grid;
	place-items: center;
	background: #EAF7F4;
	color: var(--teal-dark, #009A87);
	font-size: 1.9rem;
	font-weight: 800;
}

.ktm-success h3 {
	color: var(--navy, #003C72);
	font-size: 1.25rem;
	margin: 0;
}

.ktm-success p {
	margin-top: 10px;
	color: var(--muted, #5E7180);
}

.ktm-success .ktm-btn { margin-top: 22px; }

/* Honeypot */
.ktm-hp {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* No-JavaScript note */
.ktm-noscript {
	background: #FFF9E7;
	border: 1px solid #FFE7A3;
	border-radius: 10px;
	padding: 12px 14px;
	font-weight: 700;
	color: #7A5C00;
	margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 700px) {
	.ktm-choice-grid,
	.ktm-form-grid {
		grid-template-columns: 1fr;
	}

	.ktm-modal-card { border-radius: 18px; }
	.ktm-modal-head { padding: 18px; }
	.ktm-modal-body .ktm-booking-widget { padding: 20px; }

	.ktm-form-actions {
		flex-direction: column-reverse;
	}

	.ktm-form-actions .ktm-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ktm-btn { transition: none; }
}
