/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 12px 26px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 1rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn .icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.btn-primary {
	background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
	color: #1f2937;
	box-shadow: 0 10px 24px rgba(247, 147, 30, 0.28);
}

.btn-primary:hover {
	box-shadow: 0 14px 30px rgba(247, 147, 30, 0.36);
	transform: translateY(-1px);
	color: #1f2937;
}

.btn-outline {
	background: transparent;
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.btn-outline:hover {
	background: var(--color-primary);
	color: #fff;
}

/* =========================================================
   Quantity stepper (search-card "Số phòng" field)
   ========================================================= */
.qty-stepper {
	display: flex;
	align-items: center;
	gap: 12px;
}

.qty-stepper-btn {
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	border-radius: 50%;
	border: 1px solid var(--color-border);
	background: #fff;
	color: var(--color-primary-dark);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.qty-stepper-btn:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.qty-stepper-value {
	min-width: 14px;
	text-align: center;
	font-weight: 700;
	color: var(--color-text);
}

/* =========================================================
/* Custom date picker — replaces every native <input type="date">'s
   OS/browser-drawn calendar with one consistent click-to-pick UI (main.js).
   The native input is kept (not removed) so existing
   value/`change`-event-reading code needs no changes — just visually
   hidden here, off-screen rather than display:none so it stays reachable by
   its <label for>. Default look matches `.booking-card-field input`'s
   bordered box; `.hero-search-card-field` gets its own override below since
   that context is already borderless with its own label icon. */
.knt-datepicker {
	position: relative;
}

.knt-datepicker-native {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.knt-datepicker-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	text-align: left;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-bg);
	padding: 10px 14px;
	font: inherit;
	color: var(--color-text-light);
	cursor: pointer;
}

.knt-datepicker-trigger.has-value {
	color: var(--color-text);
}

.knt-datepicker-trigger .icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--color-text-light);
}

/* This context already shows a calendar icon on the <label> above (same
   convention as every other .hero-search-card-field) and is borderless/
   pill-inline, not boxed — override rather than editing the shared rule
   above, same pattern as the .shop-hero + .hero-search-card-float-wrap
   scoped override elsewhere in this file. */
.hero-search-card-field .knt-datepicker-trigger {
	border: 0;
	padding: 2px 0;
	background: transparent;
	font-size: 1rem;
}

.hero-search-card-field .knt-datepicker-trigger .icon {
	display: none;
}

.knt-datepicker-panel {
	position: absolute;
	z-index: 40;
	top: calc(100% + 8px);
	left: 0;
	width: 280px;
	max-width: 90vw;
	background: var(--color-bg);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	padding: 16px;
}

.knt-datepicker-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	font-weight: 700;
}

.knt-datepicker-nav {
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 999px;
	background: var(--color-bg-alt);
	font-size: 1.125rem;
	line-height: 1;
	color: var(--color-text);
	cursor: pointer;
}

.knt-datepicker-weekdays,
.knt-datepicker-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.knt-datepicker-weekdays span {
	text-align: center;
	padding-bottom: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--color-text-light);
}

.knt-datepicker-day {
	aspect-ratio: 1;
	border: none;
	border-radius: 8px;
	background: none;
	font: inherit;
	font-size: 0.875rem;
	color: var(--color-text);
	cursor: pointer;
}

.knt-datepicker-day:hover:not(:disabled) {
	background: var(--color-bg-alt);
}

.knt-datepicker-day.is-selected {
	background: var(--color-primary);
	color: #fff;
	font-weight: 700;
}

.knt-datepicker-day:disabled {
	color: var(--color-border);
	cursor: not-allowed;
}

.knt-datepicker-day.is-empty {
	pointer-events: none;
}

@media (max-width: 600px) {
	/* The inline panel positioned below its trigger can overlap/obscure the
	   content right after it on a narrow card — the panel's own fixed 280px
	   width can leave the qty-stepper +/- buttons peeking out beside it in a
	   broken-looking overlap on the checkout page's order-summary card
	   (~320-380px wide), and the day grid can run past the viewport bottom
	   needing a scroll to see the rest. A fixed, centered panel (same idea
	   as .knt-package-sheet's own fixed-bottom-sheet treatment above, just
	   centered instead of docked) sidesteps the whole problem — its position
	   no longer depends on where the trigger sits inside a narrow card, so
	   it can never collide with that card's own content again. The
	   outside-click-to-close listener (main.js) still works unchanged — it
	   checks DOM containment, not screen position. */
	.knt-datepicker-panel {
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: min(320px, calc(100vw - 40px));
		max-height: 80vh;
		overflow-y: auto;
		z-index: 500;
	}

	/* main.js toggles this on <body> alongside the panel itself — same
	   scroll-lock-plus-backdrop pattern as body.nav-open/.knt-modal-open
	   elsewhere in this file, needed here since the panel is no longer
	   anchored to its trigger and a dimmed backdrop is what actually reads
	   as "centered picker UI" rather than a stray floating box. */
	body.knt-datepicker-open {
		overflow: hidden;
	}

	body.knt-datepicker-open::after {
		content: '';
		position: fixed;
		inset: 0;
		background: rgba(9, 20, 23, 0.55);
		z-index: 499;
	}
}

.tour-header {
	padding: 28px 0 0;
}
@media (max-width: 782px) {
	/* Tighter gap from the gallery photo down to the title specifically on
	   mobile — desktop keeps its original 28px/10px (.tour-header/.tour-title
	   base rules above), mobile gets the smaller spacing instead. */
	.tour-header {
		padding-top: 14px;
	}
}

.tour-header-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

/* Side-by-side nhận/trả phòng date pair (chi-tiet-khach-san.html's booking
   card) — wraps two .booking-card-field elements; their own margin-bottom
   still provides the gap below the row. */
.booking-card-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 14px;
}

/* Native <input type="date"> has a min-content width (calendar icon + its
   own locale-formatted digits) wide enough to refuse shrinking to a true
   1fr half-share, which can push the 2nd field's right edge past the
   sidebar card's edge. */
.booking-card-field-row .booking-card-field {
	min-width: 0;
}

.booking-card-field-row input {
	width: 100%;
	min-width: 0;
}

.booking-card-field-row .booking-card-field {
	margin-bottom: 0;
}

.booking-card-field label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--color-text-light);
	margin-bottom: 6px;
}

.booking-card-field input,
.booking-card-field select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font: inherit;
	color: var(--color-text);
}

/* Custom caret for this field's <select> only — same native-arrow-overflow
   fix as .shop-sort select above. */
.booking-card-field select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 34px;
	background-color: var(--color-bg);
	background-image: linear-gradient(45deg, transparent 50%, var(--color-text-light) 50%), linear-gradient(135deg, var(--color-text-light) 50%, transparent 50%);
	background-position: right 18px center, right 13px center;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

.booking-card .btn {
	width: 100%;
	justify-content: center;
	margin-bottom: 10px;
}

.booking-card-trust {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--color-border);
	font-size: 0.8125rem;
	color: var(--color-text-light);
}

.booking-card-trust-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.booking-card-trust-item .icon {
	width: 16px;
	height: 16px;
	color: var(--color-primary);
	flex-shrink: 0;
}

