/* Karpatour Orders – front-end form. Override --kto-* variables or any .kto-* class in your theme. */
.kto-root {
	--kto-accent: #1f7a5c;
	--kto-text: inherit;
	--kto-muted: #6b7280;
	--kto-border: #d4d8de;
	--kto-bg: #fff;
	--kto-bg-soft: #f4f7f6;
	--kto-danger: #b42318;
	--kto-radius: 8px;
	max-width: 680px;
	margin: 0 auto;
	color: var(--kto-text);
	box-sizing: border-box;
}
.kto-root *, .kto-root *::before, .kto-root *::after { box-sizing: inherit; }

.kto-form { display: grid; gap: 16px; }
.kto-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .kto-row { grid-template-columns: 1fr; } }

.kto-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kto-field[hidden] { display: none; }
.kto-field > label, .kto-label { font-weight: 600; font-size: 0.95em; }

.kto-root input[type="text"], .kto-root input[type="email"], .kto-root input[type="tel"],
.kto-root input[type="date"], .kto-root input[type="number"], .kto-root select, .kto-root textarea {
	width: 100%;
	padding: 10px 12px;
	font: inherit;
	color: inherit;
	background: var(--kto-bg);
	border: 1px solid var(--kto-border);
	border-radius: var(--kto-radius);
	min-height: 44px;
}
.kto-root input:focus, .kto-root select:focus, .kto-root textarea:focus {
	outline: 2px solid var(--kto-accent);
	outline-offset: 1px;
	border-color: var(--kto-accent);
}
.kto-invalid input, .kto-invalid select, .kto-invalid textarea { border-color: var(--kto-danger); }

.kto-desc { margin: 0; color: var(--kto-muted); font-size: 0.92em; white-space: pre-line; }
.kto-desc:empty { display: none; }
.kto-block { display: grid; gap: 16px; padding: 14px 16px; background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: var(--kto-radius, 10px); }
.kto-tourcard { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: var(--kto-radius, 10px); }
.kto-tourcard[hidden] { display: none; }
.kto-card-title { font-size: 1.1em; font-weight: 700; color: #2b2b2b; }
.kto-tourinfo { display: flex; flex-direction: column; gap: 10px; }
.kto-tour-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--kto-radius, 10px); }
.kto-tour-img.kto-ratio-4x3 { aspect-ratio: 4 / 3; }
.kto-tour-img.kto-ratio-16x9 { aspect-ratio: 16 / 9; }
.kto-tour-img[hidden] { display: none; }
.kto-tourinfo.kto-has-img { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kto-tourinfo.kto-has-img .kto-desc { grid-column: 1; grid-row: 1; }
.kto-tourinfo.kto-has-img .kto-tour-img { grid-column: 2; grid-row: 1; }
@media (max-width: 640px) {
	.kto-tourinfo.kto-has-img { display: flex; flex-direction: column; gap: 10px; }
	.kto-tourinfo.kto-has-img .kto-tour-img { order: -1; }
}
.kto-hint { color: var(--kto-muted); font-size: 0.85em; }
.kto-err { color: var(--kto-danger); font-size: 0.88em; }
.kto-err:empty { display: none; }

.kto-slotmsg { margin: 0; color: var(--kto-muted); font-size: 0.92em; }
.kto-slotlist { display: flex; flex-wrap: wrap; gap: 8px; }
.kto-slotlist.kto-slotlist-long { max-height: 340px; overflow-y: auto; }
.kto-slot {
	display: flex; flex-direction: column; gap: 2px;
	padding: 8px 14px; min-width: 112px;
	border: 1px solid var(--kto-border); border-radius: var(--kto-radius);
	cursor: pointer; background: var(--kto-bg);
	font-weight: 400 !important;
}
.kto-slot input { position: absolute; opacity: 0; pointer-events: none; }
.kto-slot-time { font-weight: 600; }
.kto-slot-note { font-size: 0.8em; color: var(--kto-muted); }
.kto-slot:hover { border-color: var(--kto-accent); }
.kto-slot:has(input:checked) { border-color: var(--kto-accent); background: var(--kto-accent); color: #fff; }
.kto-slot:has(input:checked) .kto-slot-note { color: rgba(255, 255, 255, 0.85); }
.kto-slot:has(input:focus-visible) { outline: 2px solid var(--kto-accent); outline-offset: 2px; }
.kto-slot-full { opacity: 0.5; cursor: not-allowed; }

.kto-price {
	display: grid; gap: 2px;
	padding: 14px 16px;
	background: var(--kto-bg-soft);
	border-left: 4px solid var(--kto-accent);
	border-radius: var(--kto-radius);
}
.kto-price[hidden] { display: none; }
.kto-price-label { font-size: 0.85em; color: var(--kto-muted); }
.kto-price-total { font-size: 1.7em; font-weight: 700; color: var(--kto-accent); line-height: 1.2; }
.kto-price-detail { font-size: 0.9em; color: var(--kto-muted); }

.kto-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 0.92em; }
.kto-f-newsletter { margin-top: -4px; }
.kto-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

.kto-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.kto-submit {
	padding: 12px 22px; min-height: 48px;
	font: inherit; font-weight: 600; color: #fff;
	background: var(--kto-accent);
	border: 0; border-radius: var(--kto-radius);
	cursor: pointer;
}
.kto-submit:hover { filter: brightness(0.93); }
.kto-submit:disabled { opacity: 0.6; cursor: progress; }
.kto-general { margin-top: -4px; }

.kto-success h3 { margin: 0 0 4px; }
.kto-muted { color: var(--kto-muted); margin-top: 0; }
.kto-card { margin: 16px 0; padding: 16px; border: 1px solid var(--kto-border); border-radius: var(--kto-radius); }
.kto-card h4 { margin: 0 0 10px; }
.kto-kv { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--kto-border); }
.kto-kv:last-of-type { border-bottom: 0; }
.kto-k { color: var(--kto-muted); }
.kto-v { font-weight: 600; text-align: right; word-break: break-word; }
.kto-qrs { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 12px; }
.kto-qr { margin: 0; text-align: center; font-size: 0.85em; color: var(--kto-muted); }
.kto-qr img { display: block; width: 220px; height: 220px; max-width: 100%; border: 1px solid var(--kto-border); margin-bottom: 6px; }

.kto-price-total.kto-price-request { font-size: 1.3em; }

.kto-v { white-space: pre-line; }

/* ---------- calendar ---------- */
.kto-cal { padding: 14px; border: 1px solid var(--kto-border); border-radius: var(--kto-radius); background: var(--kto-bg); }
.kto-cal[hidden] { display: none; }
.kto-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.kto-cal-title { font-weight: 700; text-transform: capitalize; text-align: center; flex: 1; }
.kto-cal-nav {
	width: 40px; height: 40px; padding: 0; line-height: 1; font-size: 1.5em;
	color: var(--kto-accent); background: var(--kto-bg);
	border: 1px solid var(--kto-border); border-radius: var(--kto-radius); cursor: pointer;
}
.kto-cal-nav:hover:not(:disabled) { border-color: var(--kto-accent); }
.kto-cal-nav:disabled { opacity: 0.35; cursor: default; }
.kto-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; transition: opacity .15s; }
.kto-cal-loading { opacity: 0.45; }
.kto-dow { text-align: center; font-size: 0.78em; text-transform: uppercase; color: var(--kto-muted); padding: 2px 0 4px; }
.kto-day {
	display: flex; align-items: center; justify-content: center;
	min-height: 42px; border-radius: var(--kto-radius);
	font: inherit; font-size: 0.95em; line-height: 1;
}
.kto-day-off { color: #b3b8c0; }
.kto-day-blank { visibility: hidden; }
button.kto-day-on {
	cursor: pointer; font-weight: 700; color: var(--kto-accent);
	background: var(--kto-bg-soft);
	background: color-mix(in srgb, var(--kto-accent) 13%, #fff);
	border: 1px solid var(--kto-accent); padding: 0;
}
button.kto-day-on:hover { background: color-mix(in srgb, var(--kto-accent) 24%, #fff); }
button.kto-day-on:focus-visible { outline: 2px solid var(--kto-accent); outline-offset: 2px; }
button.kto-day-on.kto-day-sel { background: var(--kto-accent); color: #fff; }
.kto-cal-msg { margin: 8px 0 0; font-size: 0.9em; color: var(--kto-muted); }
.kto-cal-msg:empty { display: none; }
.kto-cal-hint { margin: 10px 0 0; font-size: 0.85em; color: var(--kto-muted); }
.kto-date-sel { font-weight: 600; }
.kto-date-sel:empty { display: none; }
.kto-f-date .kto-date-sel + .kto-cal { margin-top: 2px; }

.kto-tour-title { font-size: 1.2em; font-weight: 700; }
.kto-formhost-day { margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--kto-accent); }
.kto-formhost-day:empty { display: none; }
.kto-day-title { margin: 0 0 14px; }
.kto-again {
	margin-top: 8px; padding: 10px 18px; min-height: 44px; font: inherit; font-weight: 600;
	color: var(--kto-accent); background: var(--kto-bg); border: 1px solid var(--kto-accent);
	border-radius: var(--kto-radius); cursor: pointer;
}
.kto-again:hover { background: var(--kto-bg-soft); }

.kto-time { display: flex; align-items: center; gap: 8px; }
.kto-time[hidden] { display: none; }
.kto-time select { width: auto; min-width: 5.5em; }
.kto-time-sep { font-weight: 700; }

.kto-types { display: grid; gap: 8px; margin: 4px 0; }
.kto-type-row { display: grid; grid-template-columns: 1fr auto 84px; gap: 10px; align-items: center; }
.kto-type-label { margin: 0; font-weight: 500; }
.kto-type-price { color: var(--kto-muted, #666); white-space: nowrap; }
.kto-type-row input { width: 100%; box-sizing: border-box; }
@media (max-width: 480px) { .kto-type-row { grid-template-columns: 1fr 84px; } .kto-type-price { grid-column: 1 / 2; grid-row: 2; } }
.kto-type-label { display: flex; flex-direction: column; gap: 2px; }
.kto-type-note { color: var(--kto-muted, #666); font-weight: 400; font-size: .85em; line-height: 1.3; }
.kto-price-total .kto-vat { font-size: .5em; font-weight: 400; color: var(--kto-muted, #666); white-space: nowrap; }
.kto-cancel-note { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--kto-line, #e1e4e8); font-size: .9em; color: var(--kto-muted, #555); }
.kto-cancel-note.kto-cancel-none { color: #8a1f11; }

/* Waiting list */
.kto-slot-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kto-slot-row .kto-slot { flex: 1 1 auto; }
.kto-wl-btn { background: none; border: 1px solid #999; border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 0.9em; cursor: pointer; color: inherit; }
.kto-wl-btn:hover { border-color: #333; }
.kto-wl { flex: 1 1 100%; margin-top: 12px; padding: 14px 16px; background: #f4f4f4; border: 1px solid #dcdcdc; border-radius: 10px; }
.kto-wl .kto-field { margin-bottom: 10px; }
.kto-wl-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kto-wl-close { background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; color: inherit; }
.kto-wl-hold, .kto-wl-expired { margin-bottom: 14px; padding: 12px 14px; border-radius: 8px; background: #eaf5ee; border: 1px solid #b9dcc6; }
.kto-wl-expired { background: #f6f1e4; border-color: #e1d3a8; }

/* KarpaClub */
.kto-club-title { margin: 0 0 6px; }
.kto-club-msg { margin: 14px 0 6px; font-weight: 600; }
.kto-club-ok { color: var(--kto-accent, #1f7a5c); }
.kto-club-result .kto-form { margin-top: 12px; }
.kto-club-result select { width: 100%; }
.kto-price-disc { color: var(--kto-accent, #1f7a5c); font-weight: 600; }
.kto-club-card h4 { margin: 0 0 6px; font-size: 1.15em; }
.kto-club-level { margin: 0 0 6px; font-weight: 600; color: var(--kto-accent, #1f7a5c); }
.kto-club-bonus { margin: 0 0 6px; font-weight: 600; }
.kto-club-levels ul { margin: 6px 0 10px 1.2em; padding: 0; }
.kto-news[hidden] { display: none; }
.kto-news-note { margin: 10px 0 0; font-size: 0.85em; }

.kto-paybtn { display: inline-block; text-decoration: none; text-align: center; box-sizing: border-box; max-width: 100%; }
.kto-paycard .kto-paybtn { margin: 4px 0 8px; }

.kto-link { color: var(--kto-accent); font-weight: 600; text-decoration: underline; }

.kto-payopts { display: flex; flex-direction: column; gap: 8px; }
.kto-f-pay .kto-label { font-weight: 600; margin-bottom: 4px; }

/* Gift voucher code in the booking form */
.kto-voucher-row { display: flex; gap: 8px; }
.kto-voucher-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.kto-voucher-apply { border: 2px solid var(--kto-accent, #1f7a5c); background: #fff; color: var(--kto-accent, #1f7a5c); border-radius: 8px; padding: 0 16px; font: inherit; font-weight: 700; cursor: pointer; }
.kto-voucher-apply:disabled { opacity: .6; cursor: wait; }
.kto-voucher-msg { color: var(--kto-accent, #1f7a5c); margin-top: 4px; }
