/**
 * Hotel Booking Manager - Frontend Styles
 * Uses theme's CSS custom properties (--primary, --heading, --text, --primary-font)
 * defined by the HotelFT theme in inc/class-main.php so these components look
 * 100% native to the site design. Falls back to sensible defaults if unavailable.
 */

.hbm-box {
	background: #fff;
	border-radius: 6px;
	padding: 30px;
	max-width: 480px;
	margin: 30px auto;
	box-shadow: 0 2px 20px rgba(0,0,0,0.08);
	font-family: var(--primary-font, inherit);
}

/* Booking form is meant to sit inside a page layout (e.g. the room page
   sidebar), not float centered like the login box - so it fills its slot. */
.hbm-booking-form-wrapper {
	max-width: 100%;
	margin: 0;
	border-radius: 12px;
}

.hbm-booking-summary {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f0f1;
}

.hbm-booking-summary img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
}

.hbm-booking-summary .hbm-box-title {
	margin-bottom: 4px;
	font-size: 17px;
}

.hbm-booking-summary-price {
	font-size: 14px;
	color: var(--text, #666);
}

.hbm-form-section {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f0f1;
}

.hbm-form-section:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.hbm-form-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 15px;
	color: var(--heading, #222);
}

.hbm-form-section-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--primary, #d4a656);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}

.hbm-cancel-policy-note {
	display: flex;
	align-items: center;
	gap: 6px;
	justify-content: center;
	font-size: 12px;
	color: #1a7f3c;
	margin-top: 12px;
}

.hbm-cancel-policy-note .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.hbm-box-title {
	color: var(--heading, #222);
	margin-top: 0;
	margin-bottom: 6px;
	font-size: 22px;
}

.hbm-box-subtitle {
	color: var(--text, #666);
	margin-bottom: 20px;
	font-size: 14px;
}

.hbm-form-row {
	margin-bottom: 16px;
}

.hbm-form-row label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--heading, #222);
	font-size: 14px;
}

.hbm-form-row-half {
	display: flex;
	gap: 12px;
}

.hbm-form-row-half > div {
	flex: 1;
}

.hbm-input,
.hbm-form input[type="text"],
.hbm-form input[type="email"],
.hbm-form input[type="tel"],
.hbm-form input[type="number"],
.hbm-form input[type="date"],
.hbm-form select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #e1e1e1;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
}

.hbm-input:focus,
.hbm-form input:focus,
.hbm-form select:focus {
	border-color: var(--primary, #d4a656);
	outline: none;
}

.hbm-btn {
	display: inline-block;
	padding: 12px 24px;
	background: var(--primary, #d4a656);
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.hbm-btn:hover {
	opacity: 0.9;
	color: #fff;
}

.hbm-btn-block {
	width: 100%;
	text-align: center;
}

.hbm-btn-secondary {
	background: #efefef;
	color: #222;
}

.hbm-btn-link {
	background: none;
	color: var(--primary, #d4a656);
	padding: 8px 0;
}

.hbm-form-message {
	font-size: 13px;
	margin-top: 8px;
	min-height: 18px;
}

.hbm-form-message.hbm-success { color: #1a7f3c; }
.hbm-form-message.hbm-error { color: #b32d2e; }

.hbm-phone-group {
	display: flex;
	gap: 8px;
}

.hbm-country-select {
	max-width: 180px;
	flex-shrink: 0;
}

.hbm-coupon-group {
	display: flex;
	gap: 8px;
}

.hbm-coupon-group input {
	flex: 1;
}

.hbm-payment-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hbm-radio-label {
	display: flex !important;
	align-items: center;
	gap: 8px;
	font-weight: 400 !important;
	cursor: pointer;
}

/* ---- Payment method radio cards ---- */

.hbm-payment-card {
	position: relative;
	display: flex !important;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 400 !important;
	transition: border-color 0.15s, background 0.15s;
}

.hbm-payment-card input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.hbm-payment-card-dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #ccc;
	flex-shrink: 0;
	position: relative;
}

.hbm-payment-card input:checked ~ .hbm-payment-card-dot {
	border-color: var(--primary, #d4a656);
}

.hbm-payment-card input:checked ~ .hbm-payment-card-dot::after {
	content: '';
	position: absolute;
	inset: 3px;
	background: var(--primary, #d4a656);
	border-radius: 50%;
}

.hbm-payment-card:has(input:checked) {
	border-color: var(--primary, #d4a656);
	background: #fdf8ef;
}

.hbm-payment-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 2px;
}

.hbm-payment-card-body strong {
	font-size: 14px;
	color: var(--heading, #222);
}

.hbm-payment-card-body span {
	font-size: 12px;
	color: #888;
}

.hbm-payment-card-badge {
	font-size: 10px;
	font-weight: 700;
	background: #fdf1d8;
	color: #92650b;
	padding: 4px 10px;
	border-radius: 20px;
	white-space: nowrap;
}

/* ---- Policy notice box ---- */

.hbm-policy-notice {
	background: #fdf8ef;
	border: 1px solid #f2e2bc;
	border-radius: 12px;
	padding: 16px 18px;
	margin-bottom: 16px;
}

.hbm-policy-notice h4 {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #92650b;
}

.hbm-policy-notice ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 12px;
	color: #6b5330;
}

.hbm-secure-checkout-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 11px;
	color: #999;
	margin-top: 12px;
}

.hbm-secure-checkout-note .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.hbm-price-summary {
	background: #f9f7f2;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 16px;
}

.hbm-price-row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	margin-bottom: 6px;
}

.hbm-total-row {
	font-weight: 700;
	font-size: 18px;
	border-top: 1px solid #e5e0d5;
	padding-top: 10px;
	margin-top: 6px;
	color: var(--heading, #222);
}

.hbm-discount-row {
	color: #1a7f3c;
}

.hbm-availability-message {
	font-size: 13px;
	margin: -8px 0 16px;
}

.hbm-availability-message.hbm-available { color: #1a7f3c; }
.hbm-availability-message.hbm-unavailable { color: #b32d2e; }

/* My Bookings dashboard */
.hbm-my-bookings-wrapper {
	max-width: 800px;
}

.hbm-bookings-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hbm-booking-card {
	border: 1px solid #eee;
	border-radius: 6px;
	padding: 16px 20px;
}

.hbm-booking-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.hbm-booking-id {
	font-weight: 700;
	color: var(--heading, #222);
}

.hbm-status {
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
}

.hbm-status-pending { background:#fff3cd; color:#8a6d00; }
.hbm-status-confirmed { background:#d1ecf1; color:#0c5460; }
.hbm-status-checked_in { background:#d4edda; color:#155724; }
.hbm-status-checked_out { background:#e2e3e5; color:#41464b; }
.hbm-status-cancelled { background:#f8d7da; color:#721c24; }

.hbm-booking-card-body p {
	margin: 4px 0;
	font-size: 14px;
}

.hbm-booking-card-footer {
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.hbm-cancel-note {
	font-size: 12px;
	color: #b32d2e;
}
