/**
 * Property Booking Widget Styles
 * HHBR-9.6: Styles for interactive booking widget shortcode
 * 
 * @package HolidayHomeBooking
 * @fs_premium_only
 */

/* Booking Widget Container */
.hhb-property-booking-widget {
	background: #fff;
	padding: 24px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	max-width: 400px;
	margin: 0 auto;
}

/* Configuration Notice */
.hhb-property-booking-widget .hhb-notice-warning {
	margin: 0 0 16px 0;
	padding: 12px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
	font-size: 14px;
}

.hhb-property-booking-widget .hhb-notice-warning p {
	margin: 0;
}

/* Form Fields */
.hhb-bw-field {
	margin-bottom: 16px;
}

.hhb-bw-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.hhb-bw-field input[type="date"],
.hhb-bw-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.2s;
}

.hhb-bw-field input[type="date"]:focus,
.hhb-bw-field select:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.hhb-bw-field input[type="date"]:disabled,
.hhb-bw-field select:disabled {
	background: #f5f5f5;
	color: #999;
	cursor: not-allowed;
}

/* Result Display */
.hhb-bw-result {
	background: #f8f9fa;
	padding: 16px;
	border-radius: 6px;
	margin-bottom: 16px;
}

.hhb-bw-price-label {
	font-size: 14px;
	color: #666;
	margin-bottom: 12px;
	font-weight: 500;
}

/* Breakdown Lines - matching grid/list modal format */
.hhb-bw-breakdown-line {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
	color: #4B5563;
	font-weight: 500;
	font-size: 14px;
}

.hhb-bw-breakdown-line span:first-child {
	flex: 1;
	margin-right: 16px;
}

.hhb-bw-breakdown-line span:last-child {
	white-space: nowrap;
	font-weight: 600;
}

.hhb-bw-breakdown-total {
	display: flex;
	justify-content: space-between;
	padding-top: 12px;
	margin-top: 8px;
	border-top: 2px solid #111827;
	font-size: 16px;
	font-weight: 700;
	color: #111827;
}

.hhb-bw-breakdown-total span:last-child {
	color: #28a745;
	font-size: 18px;
}

/* Legacy styles kept for backward compatibility */
.hhb-bw-price-total {
	font-size: 32px;
	font-weight: 700;
	color: #28a745;
	line-height: 1.2;
}

.hhb-bw-price-nights {
	font-size: 14px;
	color: #666;
	margin-top: 4px;
}

/* Buttons */
.hhb-bw-check-btn,
.hhb-bw-proceed-btn {
	display: block;
	width: 100%;
	padding: 14px 24px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	margin-bottom: 12px;
}

.hhb-bw-check-btn {
	background: #0073aa;
	color: #fff;
}

.hhb-bw-check-btn:hover {
	background: #005a87;
}

.hhb-bw-check-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

.hhb-bw-proceed-btn {
	background: #28a745;
	color: #fff;
}

.hhb-bw-proceed-btn:hover {
	background: #218838;
	color: #fff;
}

/* No Booking Message */
.hhb-bw-no-booking {
	background: #f8f9fa;
	padding: 12px;
	border-radius: 4px;
	text-align: center;
	margin-bottom: 12px;
}

.hhb-bw-no-booking p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

/* Messages */
.hhb-bw-message {
	padding: 12px;
	border-radius: 4px;
	font-size: 14px;
	text-align: center;
	margin-bottom: 12px;
}

.hhb-bw-message.hhb-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.hhb-bw-message.hhb-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

/* Calendar Day Selected State (for calendar-to-widget connection) */
.hhb-availability-calendar .hhb-day-selected {
	background: #0073aa !important;
	color: #fff !important;
	border-color: #005a87 !important;
}

.hhb-availability-calendar .hhb-day-selected .hhb-day-number {
	color: #fff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
	.hhb-property-booking-widget {
		padding: 16px;
		max-width: 100%;
	}
	
	.hhb-bw-price-total {
		font-size: 28px;
	}
	
	.hhb-bw-check-btn,
	.hhb-bw-proceed-btn {
		padding: 12px 20px;
		font-size: 15px;
	}
}

/* Small screens */
@media (max-width: 480px) {
	.hhb-property-booking-widget {
		padding: 12px;
		border-radius: 6px;
	}
	
	.hhb-bw-field {
		margin-bottom: 12px;
	}
	
	.hhb-bw-price-total {
		font-size: 24px;
	}
}

/* Accessibility */
.hhb-bw-check-btn:focus,
.hhb-bw-proceed-btn:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Loading State */
.hhb-bw-check-btn:disabled::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: hhb-spin 0.6s linear infinite;
}

@keyframes hhb-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Integration with existing HHB styles */
.hhb-ui .hhb-property-booking-widget {
	/* Inherits spacing and typography from .hhb-ui wrapper */
}
