/**
 * ترحال لحجز الفنادق — واجهة أمامية (RTL أولاً).
 */

.thb-single-hotel,
.thb-archive,
.thb-status-page,
.thb-booking {
	--thb-brand: #0f3d3e;
	--thb-brand-soft: #e7f0f0;
	--thb-accent: #c9a227;
	--thb-ink: #16292a;
	--thb-muted: #6b7b7c;
	--thb-line: #e3eaea;
	--thb-bg: #f7f9f9;
	--thb-ok: #157a4a;
	--thb-ok-bg: #e6f4ec;
	--thb-warn-bg: #fff7e6;
	--thb-error: #b3261e;
	--thb-radius: 14px;
	--thb-shadow: 0 2px 18px rgba(15, 61, 62, .08);

	direction: rtl;
	text-align: right;
	color: var(--thb-ink);
	font-size: 16px;
	line-height: 1.8;
}

.thb-single-hotel *,
.thb-archive *,
.thb-booking *,
.thb-status-page * {
	box-sizing: border-box;
}

/* ------------------------------------------------------- عناصر عامة */

.thb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .1s ease;
}

.thb-btn:active { transform: translateY(1px); }
.thb-btn[disabled] { opacity: .45; cursor: not-allowed; }

.thb-btn-primary { background: var(--thb-brand); color: #fff; }
.thb-btn-primary:hover:not([disabled]) { background: #0b2f30; color: #fff; }

.thb-btn-outline { background: transparent; color: var(--thb-brand); border-color: var(--thb-brand); }
.thb-btn-outline:hover:not([disabled]) { background: var(--thb-brand-soft); }

.thb-btn-text { background: none; color: var(--thb-muted); padding: 11px 6px; }
.thb-btn-text:hover { color: var(--thb-ink); }

.thb-btn-lg { padding: 14px 34px; font-size: 16px; }
.thb-btn-block { display: flex; width: 100%; }

.thb-btn.is-busy { opacity: .7; pointer-events: none; }

.thb-pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.thb-pill-ok { background: var(--thb-ok-bg); color: var(--thb-ok); }
.thb-pill-muted { background: #eceff0; color: var(--thb-muted); }

.thb-req { color: var(--thb-error); }

.thb-empty {
	padding: 28px;
	background: var(--thb-bg);
	border-radius: var(--thb-radius);
	text-align: center;
	color: var(--thb-muted);
}

.thb-card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 180px;
	background: linear-gradient(135deg, #e9eeee, #f6f9f9);
}

.thb-stars { color: var(--thb-accent); letter-spacing: 2px; }
.thb-stars-lg { font-size: 20px; }

/* ------------------------------------------------------- حقول الإدخال */

.thb-field label,
.thb-search-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--thb-muted);
}

.thb-field input,
.thb-field select,
.thb-field textarea,
.thb-search-field input,
.thb-search-field select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--thb-line);
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	color: var(--thb-ink);
}

.thb-field input:focus,
.thb-field select:focus,
.thb-field textarea:focus,
.thb-search-field input:focus,
.thb-search-field select:focus {
	outline: 2px solid var(--thb-brand);
	outline-offset: 1px;
	border-color: var(--thb-brand);
}

/* ------------------------------------------------------- نموذج البحث */

.thb-search {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr .6fr .6fr auto;
	gap: 14px;
	align-items: end;
	padding: 18px;
	margin-bottom: 28px;
	background: #fff;
	border: 1px solid var(--thb-line);
	border-radius: var(--thb-radius);
	box-shadow: var(--thb-shadow);
}

.thb-search-submit .thb-btn { width: 100%; }

/* ------------------------------------------------------- بطاقات الفنادق */

.thb-hotels {
	display: grid;
	gap: 24px;
}

.thb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.thb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.thb-cols-4 { grid-template-columns: repeat(4, 1fr); }

.thb-hotel-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--thb-line);
	border-radius: var(--thb-radius);
	overflow: hidden;
	box-shadow: var(--thb-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}

.thb-hotel-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 61, 62, .12); }
.thb-hotel-card.is-unavailable { opacity: .62; }

.thb-card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.thb-card-media img { width: 100%; height: 100%; object-fit: cover; }

.thb-card-media .thb-stars {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-start: 10px;
	padding: 3px 10px;
	background: rgba(0, 0, 0, .55);
	border-radius: 999px;
	font-size: 13px;
}

.thb-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; }
.thb-card-city { font-size: 13px; color: var(--thb-muted); }
.thb-card-title { margin: 0; font-size: 19px; line-height: 1.5; }
.thb-card-title a { color: var(--thb-ink); text-decoration: none; }
.thb-card-title a:hover { color: var(--thb-brand); }
.thb-card-excerpt { margin: 0; font-size: 14px; color: var(--thb-muted); }

.thb-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--thb-line);
}

.thb-card-price small { display: block; font-size: 12px; color: var(--thb-muted); }
.thb-card-price strong { font-size: 19px; color: var(--thb-brand); }

.thb-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.thb-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--thb-line); border-radius: 10px; text-decoration: none; color: var(--thb-ink); }
.thb-pagination .current { background: var(--thb-brand); color: #fff; border-color: var(--thb-brand); }

/* ------------------------------------------------------- صفحة الفندق */

.thb-single-hotel, .thb-archive { max-width: 1200px; margin: 0 auto; padding: 32px 20px 64px; }

.thb-archive-head h1 { margin: 0 0 8px; }

.thb-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-bottom: 28px; }
.thb-hero-main { aspect-ratio: 16 / 9; border-radius: var(--thb-radius); overflow: hidden; }
.thb-hero-main img { width: 100%; height: 100%; object-fit: cover; }
.thb-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thb-hero-grid a { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; }
.thb-hero-grid img { width: 100%; height: 100%; object-fit: cover; }

.thb-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }

.thb-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.thb-title-row h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.4; }
.thb-location { margin: 0; color: var(--thb-muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 12px; }

.thb-section { margin-top: 36px; }
.thb-section h2 { font-size: 22px; margin: 0 0 14px; }

.thb-amenities { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.thb-amenities li { padding: 7px 14px; background: var(--thb-brand-soft); color: var(--thb-brand); border-radius: 999px; font-size: 14px; }

.thb-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thb-gallery a { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; }
.thb-gallery img { width: 100%; height: 100%; object-fit: cover; }

.thb-sidebar { position: sticky; top: 24px; display: grid; gap: 18px; }

.thb-side-card { padding: 20px; background: #fff; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); box-shadow: var(--thb-shadow); }
.thb-side-card h3 { margin: 0 0 14px; font-size: 17px; }

.thb-kv { list-style: none; margin: 0 0 16px; padding: 0; }
.thb-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--thb-line); font-size: 14px; }
.thb-kv li:last-child { border-bottom: 0; }
.thb-kv span { color: var(--thb-muted); }

.thb-map { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.thb-map iframe { width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------------- صندوق الحجز */

.thb-booking {
	margin-top: 40px;
	padding: 26px;
	background: #fff;
	border: 1px solid var(--thb-line);
	border-radius: var(--thb-radius);
	box-shadow: var(--thb-shadow);
	scroll-margin-top: 20px;
}

.thb-booking-head h2 { margin: 0 0 4px; font-size: 24px; }
.thb-booking-head p { margin: 0 0 20px; color: var(--thb-muted); font-size: 14px; }

.thb-booking-dates {
	display: grid;
	grid-template-columns: 1fr 1fr .6fr .6fr auto;
	gap: 14px;
	align-items: end;
	padding: 18px;
	background: var(--thb-bg);
	border-radius: 12px;
	margin-bottom: 24px;
}

.thb-field-action .thb-btn { width: 100%; }

.thb-rooms { display: grid; gap: 16px; transition: opacity .2s ease; }
.thb-rooms.is-loading { opacity: .5; pointer-events: none; }

.thb-room {
	display: grid;
	grid-template-columns: 200px 1fr 200px;
	gap: 18px;
	padding: 16px;
	border: 1px solid var(--thb-line);
	border-radius: 12px;
	transition: border-color .18s ease, background-color .18s ease;
}

.thb-room.is-selected { border-color: var(--thb-brand); background: var(--thb-brand-soft); }
.thb-room.is-disabled { opacity: .55; }

.thb-room-media { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.thb-room-media img { width: 100%; height: 100%; object-fit: cover; }

.thb-room-info h3 { margin: 0 0 8px; font-size: 18px; }
.thb-room-meta, .thb-room-amenities { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; color: var(--thb-muted); }
.thb-room-meta li::after { content: '·'; margin-inline-start: 8px; }
.thb-room-meta li:last-child::after { content: ''; }
.thb-room-amenities li { padding: 3px 10px; background: var(--thb-bg); border-radius: 999px; }
.thb-room-desc { margin: 0 0 8px; font-size: 14px; color: var(--thb-muted); }

.thb-room-cta { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; }
.thb-room-price strong { display: block; font-size: 22px; color: var(--thb-brand); line-height: 1.3; }
.thb-room-price small { color: var(--thb-muted); font-size: 12px; }
.thb-room-total { display: block; margin-top: 4px; font-size: 13px; color: var(--thb-muted); }
.thb-room-cta .thb-btn { width: 100%; }

/* ------------------------------------------------------- نموذج البيانات */

.thb-booking-form { margin-top: 28px; padding-top: 24px; border-top: 2px dashed var(--thb-line); }
.thb-form-title { margin: 0 0 14px; font-size: 20px; }

.thb-selected {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	margin-bottom: 18px;
	background: var(--thb-brand-soft);
	border-radius: 10px;
	font-size: 14px;
}

.thb-selected-room { font-weight: 700; color: var(--thb-brand); }
.thb-selected-dates { color: var(--thb-muted); direction: ltr; }

.thb-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.thb-field-full { grid-column: 1 / -1; }

.thb-payment { margin: 24px 0 0; padding: 0; border: 0; }
.thb-payment legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 700; }

.thb-payment-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	margin-bottom: 10px;
	border: 1px solid var(--thb-line);
	border-radius: 12px;
	cursor: pointer;
}

.thb-payment-option:has(input:checked) { border-color: var(--thb-brand); background: var(--thb-brand-soft); }
.thb-payment-option input { margin-top: 5px; }
.thb-payment-option strong { display: block; font-size: 15px; }
.thb-payment-option small { color: var(--thb-muted); font-size: 13px; }

.thb-quote { margin-top: 20px; }
.thb-quote-list { list-style: none; margin: 0; padding: 16px; background: var(--thb-bg); border-radius: 12px; }
.thb-quote-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.thb-quote-total { border-top: 1px solid var(--thb-line); margin-top: 6px; padding-top: 12px !important; font-size: 18px !important; font-weight: 700; color: var(--thb-brand); }
.thb-quote-note { color: var(--thb-ok); font-weight: 600; }

.thb-terms { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; }

.thb-hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; overflow: hidden; }

.thb-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

.thb-message { display: none; margin-top: 16px; padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.thb-message.is-visible { display: block; }
.thb-message-error { background: #fdeceb; color: var(--thb-error); }
.thb-message-info { background: var(--thb-brand-soft); color: var(--thb-brand); }

/* ------------------------------------------------------- صفحة الحالة */

.thb-status-page { max-width: 760px; margin: 0 auto; padding: 24px 0 48px; }

.thb-alert { padding: 16px 18px; border-radius: 12px; margin-bottom: 20px; }
.thb-alert-warn { background: var(--thb-warn-bg); color: #6b4e07; }
.thb-alert-error { background: #fdeceb; color: var(--thb-error); }
.thb-alert p { margin: 6px 0 0; font-size: 14px; }

.thb-status-card { background: #fff; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); box-shadow: var(--thb-shadow); overflow: hidden; }

.thb-status-head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: var(--thb-brand-soft); }
.thb-status-head h2 { margin: 0; font-size: 20px; color: var(--thb-brand); }
.thb-status-head.thb-status-cancelled, .thb-status-head.thb-status-expired { background: #fdeceb; }
.thb-status-head.thb-status-cancelled h2, .thb-status-head.thb-status-expired h2 { color: var(--thb-error); }

.thb-status-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; font-size: 22px; color: var(--thb-brand); }
.thb-status-code { margin: 4px 0 0; font-size: 14px; color: var(--thb-muted); }

.thb-status-table { width: 100%; border-collapse: collapse; }
.thb-status-table th, .thb-status-table td { padding: 12px 24px; border-bottom: 1px solid var(--thb-line); text-align: right; font-size: 15px; }
.thb-status-table th { width: 42%; color: var(--thb-muted); font-weight: 600; }
.thb-status-note { padding: 16px 24px; margin: 0; color: var(--thb-muted); font-size: 14px; }

.thb-lookup { padding: 28px; background: var(--thb-bg); border-radius: var(--thb-radius); }
.thb-lookup h2 { margin: 0 0 8px; }

/* ------------------------------------------------------- استجابة */

@media (max-width: 1024px) {
	.thb-layout { grid-template-columns: 1fr; }
	.thb-sidebar { position: static; grid-template-columns: 1fr 1fr; }
	.thb-cols-3, .thb-cols-4 { grid-template-columns: repeat(2, 1fr); }
	.thb-search { grid-template-columns: 1fr 1fr 1fr; }
	.thb-booking-dates { grid-template-columns: 1fr 1fr; }
	.thb-form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
	.thb-single-hotel, .thb-archive { padding: 20px 14px 48px; }
	.thb-hero { grid-template-columns: 1fr; }
	.thb-hero-grid { grid-template-columns: repeat(4, 1fr); }
	.thb-cols-2, .thb-cols-3, .thb-cols-4 { grid-template-columns: 1fr; }
	.thb-search, .thb-booking-dates, .thb-form-grid { grid-template-columns: 1fr; }
	.thb-sidebar { grid-template-columns: 1fr; }
	.thb-room { grid-template-columns: 1fr; }
	.thb-room-media { aspect-ratio: 16 / 9; }
	.thb-gallery { grid-template-columns: repeat(2, 1fr); }
	.thb-title-row h1 { font-size: 25px; }
	.thb-booking { padding: 18px; }
	.thb-status-table th, .thb-status-table td { padding: 10px 16px; font-size: 14px; }
}
