/**
 * 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: var(--hbm-bg, #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(--hbm-font, var(--primary-font, inherit));
}

.hbm-recaptcha-wrap {
	margin: 14px 0;
}

/* 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 var(--hbm-border, #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(--hbm-text, var(--text, #666));
}

.hbm-form-section {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--hbm-border, #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(--hbm-heading, 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(--hbm-primary, 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(--hbm-heading, var(--heading, #222));
	margin-top: 0;
	margin-bottom: 6px;
	font-size: 22px;
}

.hbm-box-subtitle {
	color: var(--hbm-text, 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(--hbm-heading, var(--heading, #222));
	font-size: 14px;
}

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

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

@media (max-width: 560px) {
	.hbm-form-row-half {
		flex-direction: column;
		gap: 16px;
	}
}

.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 var(--hbm-border, #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(--hbm-primary, var(--primary, #d4a656));
	outline: none;
}

.hbm-btn {
	display: inline-block;
	padding: 12px 24px;
	background: var(--hbm-primary, 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(--hbm-primary, 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;
	min-width: 0;
}

.hbm-country-select {
	width: 130px;
	flex: 0 0 130px;
	min-width: 0;
	text-overflow: ellipsis;
}

.hbm-phone-group input[type="tel"] {
	flex: 1 1 auto;
	min-width: 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 var(--hbm-border, #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(--hbm-primary, var(--primary, #d4a656));
}

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

.hbm-payment-card:has(input:checked) {
	border-color: var(--hbm-primary, 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(--hbm-heading, 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(--hbm-heading, 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; }

#hbm-booking-otp-panel {
	background: #f9f7f2;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 16px;
}

#hbm-booking-otp-panel label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #555;
	margin-bottom: 8px;
}

#hbm-booking-otp-panel .hbm-input {
	max-width: 160px;
	display: inline-block;
	margin-right: 10px;
	letter-spacing: .08em;
}

/* My Bookings dashboard */
.hbm-my-bookings-wrapper {
	max-width: 920px;
	margin: 0 auto;
}

.hbm-my-bookings-title {
	font-size: 26px;
	font-weight: 700;
	color: var(--hbm-heading, var(--heading, #222));
	margin: 0 0 22px;
}

.hbm-my-bookings-empty {
	text-align: center;
	padding: 60px 20px;
	background: var(--hbm-bg-tint, #faf8f4);
	border: 1px dashed #e2d9c8;
	border-radius: 14px;
}

.hbm-my-bookings-empty .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	color: var(--hbm-primary, var(--primary, #d4a656));
	margin-bottom: 10px;
}

.hbm-my-bookings-empty p {
	font-size: 15px;
	color: #6b6b6b;
	margin: 0 0 18px;
}

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

.hbm-booking-card {
	display: flex;
	gap: 20px;
	background: var(--hbm-bg, #fff);
	border: 1px solid #ece6d9;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 16px rgba(0,0,0,0.05);
	transition: box-shadow .2s ease, transform .2s ease;
	text-decoration: none;
	color: inherit;
}

.hbm-booking-card:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,0.09);
	transform: translateY(-2px);
}

.hbm-booking-card-image {
	flex: 0 0 160px;
	width: 160px;
	height: 140px;
	border-radius: 10px;
	overflow: hidden;
}

.hbm-booking-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hbm-booking-card-main {
	flex: 1;
	min-width: 0;
}

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

.hbm-booking-id {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--hbm-primary, var(--primary, #d4a656));
	margin-bottom: 4px;
}

.hbm-booking-room-name {
	font-size: 18px;
	font-weight: 700;
	color: var(--hbm-heading, var(--heading, #222));
	margin: 0 0 4px;
}

.hbm-booking-hotel-name {
	font-size: 13px;
	color: #777;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

.hbm-booking-hotel-name .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
}

.hbm-status {
	flex-shrink: 0;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
	white-space: nowrap;
}

.hbm-status-pending { background: var(--hbm-warning-bg, #fff3cd); color: var(--hbm-warning-text, #8a6d00); }
.hbm-status-confirmed { background: var(--hbm-success-bg, #e6f7ec); color: var(--hbm-success-text, #1a7f3c); }
.hbm-status-checked_in { background:#d4edda; color:#155724; }
.hbm-status-checked_out { background:#e2e3e5; color:#41464b; }
.hbm-status-cancelled { background: var(--hbm-danger-bg, #f8d7da); color: var(--hbm-danger-text, #721c24); }
.hbm-status-rejected { background: var(--hbm-danger-bg, #f8d7da); color: var(--hbm-danger-text, #721c24); }

.hbm-booking-card-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
	gap: 12px;
	padding: 14px 0;
	border-top: 1px dashed var(--hbm-border, #eee);
	border-bottom: 1px dashed var(--hbm-border, #eee);
}

.hbm-booking-card-details div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hbm-booking-card-details span {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #999;
}

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

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

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

@media (max-width: 600px) {
	.hbm-booking-card {
		flex-direction: column;
	}
	.hbm-booking-card-image {
		width: 100%;
		flex-basis: auto;
		height: 160px;
	}
}

/* ---- My Booking Detail page ---- */

.hbm-my-booking-detail-wrap .hbm-btn-link {
	font-size: 13px;
}

.hbm-my-booking-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding-bottom: 20px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--hbm-border, #ece6d9);
}

.hbm-my-booking-room-name {
	font-size: 24px;
	font-weight: 700;
	color: var(--hbm-heading, var(--heading, #222));
	margin: 4px 0;
}

.hbm-my-booking-hotel-name {
	font-size: 14px;
	color: #777;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

.hbm-my-booking-notice {
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14px;
	margin-bottom: 20px;
}

.hbm-my-booking-notice-success {
	background: var(--hbm-success-bg, #e6f7ec);
	color: var(--hbm-success-text, #1a7f3c);
}

.hbm-my-booking-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
}

.hbm-my-booking-panel {
	background: var(--hbm-bg, #fff);
	border: 1px solid #ece6d9;
	border-radius: 14px;
	padding: 24px;
}

.hbm-my-booking-panel h2 {
	font-size: 16px;
	font-weight: 700;
	color: var(--hbm-heading, var(--heading, #222));
	margin: 0 0 16px;
}

.hbm-my-booking-panel h2:not(:first-child) {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px dashed var(--hbm-border, #eee);
}

.hbm-my-booking-subheading {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #999;
	margin: 20px 0 10px;
}

.hbm-my-booking-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 14px;
}

.hbm-my-booking-details-grid div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hbm-my-booking-details-grid span {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #999;
}

.hbm-my-booking-details-grid strong {
	font-size: 14px;
	color: var(--hbm-heading, var(--heading, #222));
}

.hbm-my-booking-panel > p {
	font-size: 13px;
	color: #555;
	margin: 12px 0 0;
}

.hbm-my-booking-panel > p span {
	color: #999;
}

.hbm-my-booking-rate-plan {
	margin-top: 14px;
	font-size: 14px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.hbm-rate-plan-refund-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.hbm-rate-plan-refund-badge.hbm-refundable {
	background: var(--hbm-success-bg, #e6f7ec);
	color: var(--hbm-success-text, #1a7f3c);
}

.hbm-rate-plan-refund-badge.hbm-non-refundable {
	background: var(--hbm-danger-bg, #f8d7da);
	color: var(--hbm-danger-text, #721c24);
}

.hbm-my-booking-payment-history {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hbm-my-booking-payment-history li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	padding-bottom: 10px;
	border-bottom: 1px dashed var(--hbm-border, #eee);
}

.hbm-my-booking-payment-history li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.hbm-my-booking-history-date {
	flex-shrink: 0;
	color: #999;
	font-size: 12px;
}

.hbm-my-booking-cancel-block {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px dashed var(--hbm-border, #eee);
}

#hbm-cancel-flow {
	margin-top: 16px;
	padding: 16px;
	background: var(--hbm-bg-tint, #faf8f4);
	border-radius: 10px;
}

.hbm-cancel-flow-text {
	font-size: 13px;
	color: #555;
	margin: 0 0 12px;
}

#hbm-cancel-step-verify label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
}

#hbm-cancel-step-verify .hbm-input {
	max-width: 200px;
	display: inline-block;
	margin-right: 10px;
	letter-spacing: .08em;
}

@media (max-width: 780px) {
	.hbm-my-booking-grid {
		grid-template-columns: 1fr;
	}
	.hbm-my-booking-header {
		flex-direction: column;
	}
}
