/**
 * Hotel Booking frontend design system. Scoped under .hb-root so it
 * coexists with any WordPress theme without collisions.
 */
.hb-root {
	--hb-ink: #0f172a;
	--hb-muted: #64748b;
	--hb-line: #e5e7eb;
	--hb-bg: #ffffff;
	--hb-surface: #f8fafc;
	--hb-accent: #111827;
	--hb-accent-soft: #1f2937;
	--hb-green: #059669; --hb-green-bg: #ecfdf5;
	--hb-amber: #b45309; --hb-amber-bg: #fffbeb;
	--hb-red: #dc2626; --hb-red-bg: #fef2f2;
	--hb-radius: 18px;
	--hb-shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -16px rgba(15,23,42,.12);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--hb-ink);
	line-height: 1.5;
}

.hb-root .hb-card {
	background: var(--hb-bg);
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius);
	padding: 24px;
	margin-bottom: 18px;
	box-shadow: var(--hb-shadow);
}
.hb-root .hb-category-card { padding: 18px; }

/* Search form */
.hb-root .hb-search-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 14px;
	align-items: end;
}
.hb-root .hb-field { display: flex; flex-direction: column; gap: 6px; }
.hb-root .hb-field label {
	font-size: 11px; font-weight: 700; color: var(--hb-muted);
	text-transform: uppercase; letter-spacing: .05em;
}
.hb-root .hb-field input,
.hb-root .hb-field select {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--hb-line);
	border-radius: 12px; font-size: 14.5px; box-sizing: border-box;
	background: var(--hb-surface); transition: border-color .15s, background .15s;
}
.hb-root .hb-field select { padding: 0; }
.hb-root .hb-field input:focus,
.hb-root .hb-field select:focus {
	outline: none; border-color: var(--hb-accent); background: #fff;
}

/* Buttons */
.hb-root .hb-btn {
	background: var(--hb-accent); color: #fff; border: none; border-radius: 12px;
	padding: 13px 24px; font-size: 14.5px; font-weight: 600; cursor: pointer;
	transition: transform .1s, background .15s; white-space: nowrap;
}
.hb-root .hb-btn:hover { background: var(--hb-accent-soft); }
.hb-root .hb-btn:active { transform: scale(.98); }
.hb-root .hb-btn:disabled { opacity: .55; cursor: not-allowed; }
.hb-root .hb-btn-secondary { background: #fff; color: var(--hb-ink); border: 1.5px solid var(--hb-line); }

/* Room cards */
.hb-root .hb-room-card { 
	display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
	transition: box-shadow .2s, transform .2s;
}
.hb-root .hb-room-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.hb-root .hb-room-meta { color: var(--hb-muted); font-size: 13.5px; margin-bottom: 10px; }
.hb-root .hb-price { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.hb-root .hb-price small { font-size: 12px; font-weight: 500; color: var(--hb-muted); }

/* Badges */
.hb-root .hb-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.hb-root .hb-badge-available { background: var(--hb-green-bg); color: var(--hb-green); }
.hb-root .hb-badge-limited { background: var(--hb-amber-bg); color: var(--hb-amber); }
.hb-root .hb-badge-unavailable { background: var(--hb-red-bg); color: var(--hb-red); }
.hb-root .hb-status-badge {
	display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 11.5px;
	font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
	background: var(--hb-surface); color: var(--hb-ink); border: 1px solid var(--hb-line);
}

/* Summary rows */
.hb-root .hb-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; }
.hb-root .hb-summary-row.hb-total {
	border-top: 2px solid var(--hb-ink); font-weight: 800; font-size: 17px;
	padding-top: 14px; margin-top: 8px;
}

/* State messages */
.hb-root .hb-error {
	background: var(--hb-red-bg); color: var(--hb-red); border: 1px solid #fecaca;
	border-radius: 12px; padding: 14px 16px; font-size: 14px; margin-bottom: 14px;
}
.hb-root .hb-success { background: var(--hb-green-bg); color: var(--hb-green); border: 1px solid #a7f3d0; border-radius: 9px; padding: 12px 14px; margin-top: 14px; font-size: 13px; font-weight: 600; }
.hb-root .hb-empty {
	color: var(--hb-muted); font-size: 14.5px; padding: 40px 20px; text-align: center;
	background: var(--hb-surface); border-radius: var(--hb-radius);
}
.hb-root .hb-loading {
	color: var(--hb-muted); font-size: 14px; padding: 24px; text-align: center;
	position: relative;
}
.hb-root .hb-loading::after { display: none; }

/* Calendar */
.hb-root .hb-calendar-controls { display: flex; gap: 8px; margin-bottom: 10px; }
.hb-root .hb-calendar-controls select { min-width: 120px; padding: 8px 10px; border: 1px solid var(--hb-line); border-radius: 8px; background: var(--hb-surface); color: var(--hb-ink); font: inherit; }
.hb-root .hb-calendar-controls select:focus { outline: none; border-color: var(--hb-accent); }
.hb-root .hb-calendar-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hb-root .hb-calendar-month-panel { min-width: 0; }
.hb-root .hb-calendar-month-title { margin: 0 0 8px; color: var(--hb-ink); font-size: 15px; font-weight: 700; }
.hb-root .hb-calendar-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.hb-root .hb-calendar-headcell { min-width: 0; overflow: hidden; color: var(--hb-muted); font-size: 10px; font-weight: 700; text-align: center; white-space: nowrap; }
.hb-root .hb-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hb-root .hb-cal-day {
	aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center;
	justify-content: center; gap: 1px; font-size: 12.5px; font-weight: 600; cursor: pointer;
	transition: transform .1s, box-shadow .15s;
}
.hb-root .hb-cal-day-count { font-size: 8px; font-weight: 700; line-height: 1; opacity: .8; }
.hb-root .hb-cal-day:hover:not(.hb-cal-disabled) { transform: scale(1.08); box-shadow: 0 4px 10px rgba(15,23,42,.15); }
.hb-root .hb-cal-empty { visibility: hidden; pointer-events: none; }
.hb-root .hb-cal-available { background: var(--hb-green-bg); color: var(--hb-green); }
.hb-root .hb-cal-partial { background: var(--hb-amber-bg); color: var(--hb-amber); }
.hb-root .hb-cal-booked, .hb-root .hb-cal-blocked { background: var(--hb-red-bg); color: var(--hb-red); }
.hb-root .hb-cal-disabled { cursor: not-allowed; opacity: .55; }
.hb-root .hb-cal-past { background: #e2e8f0 !important; color: #94a3b8 !important; cursor: not-allowed; text-decoration: line-through; }
.hb-root .hb-cal-selected { outline: 2.5px solid var(--hb-accent); outline-offset: 1px; }
.hb-root .hb-cal-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hb-line); }
.hb-root .hb-cal-legend { font-size: 12px; color: var(--hb-muted); margin: 0 0 10px; }
.hb-root .hb-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }

/* Category / room browsing */
.hb-root .hb-room-type-picker,
.hb-root .hb-room-number-picker { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.hb-root .hb-room-type-picker { max-width: 320px; margin-bottom: 12px; }
.hb-root .hb-room-type-picker label,
.hb-root .hb-room-number-picker label { color: var(--hb-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hb-root .hb-room-type-select,
.hb-root .hb-room-number-select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--hb-line); border-radius: 9px; background: var(--hb-surface); color: var(--hb-ink); font: inherit; }
.hb-root .hb-room-type-select:focus,
.hb-root .hb-room-number-select:focus { outline: none; border-color: var(--hb-accent); background: #fff; }
.hb-root .hb-cat-image { width: 100%; max-width: 220px; border-radius: 12px; margin-bottom: 10px; display: block; }
.hb-root .hb-toggle-rooms { margin-top: 14px; }
.hb-root .hb-room-row { display: none; border-top: 1px solid var(--hb-line); padding-top: 12px; margin-top: 12px; }
.hb-root .hb-open .hb-room-row { display: block; }
.hb-root .hb-room-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hb-root .hb-room-row-price { display: block; font-size: 13px; color: var(--hb-muted); font-weight: 600; margin-top: 2px; }
.hb-root .hb-room-number-picker { max-width: 260px; margin-bottom: 12px; }
.hb-root .hb-hint { color: var(--hb-muted); font-size: 13px; margin: -8px 0 16px; }
.hb-root .hb-room-row .hb-cal-wrap { width: 100%; }
.hb-root .hb-room-row .hb-calendar-head,
.hb-root .hb-room-row .hb-calendar { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }

/* Booking modal */
.hb-booking-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15,23,42,.64); animation: hb-modal-fade .18s ease-out; }
.hb-booking-modal-panel { position: relative; width: min(580px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; box-sizing: border-box; padding: 22px 24px 20px; border: 1px solid #e2e8f0; border-radius: 18px; background: linear-gradient(145deg, #fff 0%, #f8fafc 100%); box-shadow: 0 28px 80px rgba(15,23,42,.3); animation: hb-modal-rise .22s ease-out; }
.hb-booking-modal-panel h3 { margin: 0 0 4px; color: #0f172a; font-size: 21px; }
.hb-modal-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f5f9; color: #334155; font-size: 24px; line-height: 1; cursor: pointer; }
.hb-modal-close:hover { background: #e2e8f0; }
.hb-modal-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 12px; }
.hb-modal-dates label { display: flex; flex-direction: column; gap: 6px; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hb-modal-dates select { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #0f172a; font: inherit; }
.hb-modal-dates select:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.hb-modal-calendar-hint { margin: 8px 0 6px; color: #64748b; font-size: 12px; }
.hb-modal-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 14px; }
.hb-modal-dates label { display: flex; flex-direction: column; gap: 6px; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hb-modal-dates input { height: 50px; width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--hb-line); border-radius: 12px; background: var(--hb-surface); color: var(--hb-ink); font: inherit; font-size: 14.5px; }
.hb-modal-dates input[readonly] { cursor: pointer; }
.hb-modal-dates input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.ui-datepicker { z-index: 100001 !important; }
.hb-modal-calendar { margin: 12px 0 14px; padding: 10px; border: 1px solid var(--hb-line); border-radius: 12px; background: var(--hb-surface); }
.hb-modal-calendar .hb-calendar-controls { margin-bottom: 8px; }
.hb-modal-calendar .hb-cal-wrap { padding: 0; border: 0; background: transparent; }
.hb-modal-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0 14px; padding: 12px 14px; border: 1px solid #c7d2fe; border-radius: 12px; background: #eef2ff; color: #3730a3; }
.hb-modal-summary span { font-size: 13px; font-weight: 700; }
.hb-modal-summary div { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.hb-modal-summary strong { font-size: 19px; text-align: right; }
.hb-modal-summary small { color: #6366f1; font-size: 12px; font-weight: 600; }
.hb-modal-summary .hb-summary-breakdown { color: #475569; font-size: 11px; font-weight: 500; }
.hb-stay-times { display: flex; justify-content: space-between; gap: 12px; margin: -4px 0 14px; color: var(--hb-muted); font-size: 12px; font-weight: 600; }
.hb-date-summary { margin: 4px 0 10px; color: var(--hb-ink); font-size: 13px; font-weight: 700; }
.hb-stay-days-field { display: inline-flex; flex-direction: column; gap: 5px; width: 48%; margin: 0 2% 12px 0; color: var(--hb-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.hb-stay-days-field:last-of-type { margin-right: 0; }
.hb-stay-days-field input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid var(--hb-line); border-radius: 10px; background: #fff; color: var(--hb-ink); font: inherit; font-size: 14px; }
.hb-availability-message { margin: 0 0 12px; padding: 9px 12px; border-radius: 9px; font-size: 12px; font-weight: 600; }
.hb-availability-unavailable { background: var(--hb-red-bg); color: var(--hb-red); }
.hb-availability-available { background: var(--hb-green-bg); color: var(--hb-green); }
.hb-booking-modal-panel > .hb-btn { width: 100%; margin-top: 4px; }
.hb-booking-modal-panel .hb-guest-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px; margin-bottom: 10px; }
.hb-booking-modal-panel .hb-guest-row input { width: 100% !important; min-width: 0; box-sizing: border-box; padding: 10px 12px; border-radius: 9px; }
.hb-booking-modal-panel .hb-error { margin-top: 14px; }
@keyframes hb-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hb-modal-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 640px) {
	.hb-root .hb-calendar-months { grid-template-columns: 1fr; }
	.hb-root .hb-calendar-head { grid-template-columns: repeat(7, 1fr); }
	.hb-root .hb-calendar { grid-template-columns: repeat(7, 1fr); }
}

/* Guest form */
.hb-root .hb-guest-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.hb-root .hb-guest-row input,
.hb-root textarea {
	width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--hb-line);
	border-radius: 12px; font-size: 14.5px; background: var(--hb-surface); font-family: inherit;
	height: 50px;
}
.hb-root .hb-guest-row input:focus, .hb-root textarea:focus { outline: none; border-color: var(--hb-accent); background: #fff; }

/* Room card header (name + price), calendar sits below full-width */
.hb-root .hb-room-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.hb-root .hb-room-card-header h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

/* Inline booking calendar */
.hb-root .hb-cal-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hb-muted); margin-bottom: 10px; flex-wrap: wrap; }
.hb-root .hb-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 2px; }
.hb-root .hb-calendar-inline { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 5px; margin-bottom: 14px; }
.hb-root .hb-calendar-inline .hb-cal-day { aspect-ratio: 1; border-radius: 8px; font-weight: 600; position: relative; }
.hb-root .hb-cal-clickable { cursor: pointer; transition: transform .1s; }
.hb-root .hb-cal-clickable:hover { transform: scale(1.08); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.hb-root .hb-cal-disabled { cursor: not-allowed; opacity: .55; text-decoration: line-through; }
.hb-root .hb-cal-selected { background: var(--hb-accent) !important; color: #fff !important; box-shadow: 0 0 0 2px var(--hb-accent); }
.hb-root .hb-cal-in-range { background: #e0e7ff !important; color: var(--hb-accent) !important; }
.hb-root .hb-cal-summary { font-size: 14px; margin-bottom: 12px; min-height: 22px; }
.hb-root .hb-cal-hint { color: var(--hb-muted); }
.hb-root .hb-cal-actions { display: flex; gap: 10px; }
.hb-root .hb-btn-sm { padding: 9px 16px; font-size: 13px; }
.hb-root .hb-inline-note {
	margin-top: 10px; background: var(--hb-amber-bg); color: var(--hb-amber);
	border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; font-size: 13.5px;
}
	.hb-root .hb-room-card { grid-template-columns: 1fr; text-align: left; }
	.hb-root .hb-room-card > div:last-child { text-align: left; }
	.hb-root .hb-guest-row { grid-template-columns: 1fr; }

@media (max-width: 520px) {
	.hb-booking-modal { padding: 12px; }
	.hb-booking-modal-panel { padding: 20px 16px 16px; }
	.hb-modal-calendar .hb-calendar { grid-template-columns: repeat(7, minmax(26px, 1fr)); }
	.hb-modal-calendar .hb-calendar-head { grid-template-columns: repeat(7, minmax(26px, 1fr)); }
	.hb-booking-modal-panel .hb-guest-row { grid-template-columns: 1fr !important; }
	.hb-modal-dates { grid-template-columns: 1fr; }
	.hb-modal-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
	.hb-modal-summary div { align-items: flex-start; }
	.hb-modal-summary strong { text-align: left; }
}
.hb-badge.hb-badge-limited {
	display: none;
}
.hb-room-row-head button {
	display: none;
}