/**
 * Motorhome Booking Frontend Styles
 * Mobile-first, minimal, functional
 */

/* =====================================================
   REUSABLE UI COMPONENTS (Namespaced with .mhb)
   ===================================================== */

/* Base Wrapper */
.mhb {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	box-sizing: border-box;
}

.mhb *,
.mhb *::before,
.mhb *::after {
	box-sizing: inherit;
}

/* Card Component */
.mhb-card {
	max-width: 400px;
	margin: 30px auto;
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mhb-card__title {
	margin-top: 0;
	margin-bottom: 20px;
	text-align: center;
	color: #2271b1;
	font-size: 20px;
	font-weight: 600;
}

/* Button Component */
.mhb-btn {
	display: inline-block;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
	line-height: 1.5;
}

.mhb-btn--primary {
	background: #2271b1;
	color: white;
}

.mhb-btn--primary:hover {
	background: #135e96;
	color: white;
}

.mhb-btn--logout {
	background: #dc3232;
	color: white;
}

.mhb-btn--logout:hover {
	background: #a02222;
	color: white;
}

/* =====================================================
   WARDEN LOGIN FORM STYLING
   ===================================================== */

.mhb-warden-login {
	/* Extends .mhb-card */
}

/* Style wp_login_form() elements ONLY within warden login */
.mhb-warden-login form {
	margin: 0;
}

.mhb-warden-login label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
	font-size: 16px;
}

.mhb-warden-login input[type="text"],
.mhb-warden-login input[type="password"] {
	width: 100%;
	padding: 12px 16px;
	font-size: 16px;
	line-height: 1.5;
	border: 2px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	transition: border-color 0.2s;
	margin-bottom: 15px;
}

.mhb-warden-login input[type="text"]:focus,
.mhb-warden-login input[type="password"]:focus {
	outline: none;
	border-color: #2271b1;
}

.mhb-warden-login .login-remember {
	margin-bottom: 15px;
}

.mhb-warden-login .login-remember label {
	display: inline;
	font-weight: normal;
	font-size: 14px;
	margin-left: 5px;
}

.mhb-warden-login input[type="checkbox"] {
	margin: 0;
	transform: scale(1.1);
	cursor: pointer;
}

.mhb-warden-login input[type="submit"] {
	width: 100%;
	padding: 14px 24px;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
	color: #fff;
	background: #2271b1;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
	min-height: 50px;
}

.mhb-warden-login input[type="submit"]:hover {
	background: #135e96;
}

/* =====================================================
   WARDEN FRONTEND VIEWS
   ===================================================== */

.mhb-warden-frontend {
	max-width: 100%;
	padding: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mhb-warden-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 8px;
}

.mhb-warden-user {
	font-size: 14px;
	color: #666;
}

.mhb-warden-message {
	padding: 20px;
	text-align: center;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 8px;
	color: #333;
}

.mhb-warden-section {
	margin-bottom: 20px;
}

.mhb-warden-section-header {
	background: #2271b1;
	color: white;
	padding: 15px;
	margin: 0 0 15px 0;
	border-radius: 8px;
	font-size: 18px;
	font-weight: 600;
}

.mhb-warden-today-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mhb-warden-today-item {
	background: white;
	border: 2px solid #2271b1;
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.mhb-warden-bay {
	font-size: 24px;
	font-weight: 700;
	color: #2271b1;
}

.mhb-warden-reg {
	font-family: monospace;
	font-size: 20px;
	font-weight: 700;
	color: #333;
	text-transform: uppercase;
}

.mhb-warden-vehicle-details {
	font-size: 14px;
	color: #666;
	margin-top: 5px;
}

.mhb-warden-vehicle-details span {
	margin-right: 8px;
}

.mhb-warden-empty {
	text-align: center;
	padding: 30px;
	color: #666;
	background: #f9f9f9;
	border-radius: 8px;
}

.mhb-warden-advanced {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 3px solid #ddd;
}

.mhb-warden-filters {
	background: #f9f9f9;
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 8px;
	border: 1px solid #ddd;
}

.mhb-warden-filter-group {
	margin-bottom: 12px;
}

.mhb-warden-filter-group:last-child {
	margin-bottom: 0;
}

.mhb-warden-filter-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	font-size: 14px;
}

.mhb-warden-filter-group input,
.mhb-warden-filter-group select {
	width: 100%;
	padding: 10px;
	font-size: 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-sizing: border-box;
}

.mhb-warden-filter-actions {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

.mhb-warden-button {
	flex: 1;
	padding: 12px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

.mhb-warden-button-primary {
	background: #2271b1;
	color: white;
}

.mhb-warden-button-secondary {
	background: #f0f0f0;
	color: #333;
}

.mhb-warden-booking-card {
	background: white;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 15px;
}

.mhb-warden-status {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.mhb-warden-status-HOLD {
	background: #f0f0f0;
	color: #666;
}

.mhb-warden-status-CONFIRMED {
	background: #d4edda;
	color: #155724;
}

.mhb-warden-status-CANCELLED {
	background: #f8d7da;
	color: #721c24;
}

.mhb-warden-status-EXPIRED {
	background: #fff3cd;
	color: #856404;
}

.mhb-warden-field {
	margin-bottom: 8px;
}

.mhb-warden-label {
	font-weight: 600;
	color: #666;
	font-size: 13px;
	display: inline-block;
	min-width: 80px;
}

.mhb-warden-value {
	color: #333;
	font-size: 14px;
}

@media (min-width: 768px) {
	.mhb-warden-frontend {
		padding: 20px;
		max-width: 800px;
		margin: 0 auto;
	}
	
	.mhb-warden-filter-actions {
		justify-content: flex-start;
	}
	
	.mhb-warden-button {
		flex: 0 0 auto;
		min-width: 120px;
	}
}

/* =====================================================
   BOOKING FORM STYLES (Pre-existing)
   ===================================================== */

/* Base Container */
.mhb-booking-form {
	max-width: 600px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

/* Step Containers */
.mhb-step {
	margin-bottom: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	border: 1px solid #ddd;
}

.mhb-step h3 {
	margin: 0 0 20px 0;
	font-size: 20px;
	font-weight: 600;
	color: #333;
}

/* Form Groups */
.mhb-form-group {
	margin-bottom: 20px;
}

/* Labels */
.mhb-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
	font-size: 16px;
}

/* Input Fields */
.mhb-input {
	width: 100%;
	padding: 12px 16px;
	font-size: 16px;
	line-height: 1.5;
	border: 2px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	transition: border-color 0.2s;
	max-width: 100%;
}

.mhb-input:focus {
	outline: none;
	border-color: #0073aa;
}

.mhb-input:disabled {
	background: #f0f0f0;
	cursor: not-allowed;
}

/* Date input specific fixes for mobile */
.mhb-date-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

/* Select Dropdown */
.mhb-select {
	appearance: none;
	background: #fff;
	background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27%3E%3Cpath fill=%27%23333%27 d=%27M0 0l6 8 6-8z%27/%3E%3C/svg%3E');
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	padding-right: 36px;
}

/* Field Notes */
.mhb-field-note {
	display: block;
	margin-top: 6px;
	font-size: 14px;
	color: #666;
	font-style: italic;
}

/* Buttons */
.mhb-button {
	display: inline-block;
	width: 100%;
	padding: 14px 24px;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
	color: #fff;
	background: #0073aa;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
	min-height: 50px;
}

.mhb-button:hover {
	background: #005a87;
}

.mhb-button:disabled {
	background: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

.mhb-button-primary {
	background: #0073aa;
}

/* Bay Selection */
.mhb-bay-option {
	margin-bottom: 15px;
	padding: 15px;
	border: 2px solid #ddd;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.mhb-bay-option:hover {
	border-color: #0073aa;
	background: #f0f8ff;
}

.mhb-bay-option input[type="radio"] {
	margin-right: 10px;
	transform: scale(1.2);
	cursor: pointer;
}

.mhb-bay-name {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
}

.mhb-bay-price {
	font-size: 16px;
	color: #0073aa;
	font-weight: 600;
}

.mhb-pricing-breakdown {
	margin-top: 5px;
	font-size: 14px;
	color: #666;
}

/* Messages */
.mhb-messages {
	margin: 20px 0;
}

.mhb-message {
	padding: 15px;
	margin-bottom: 15px;
	border-radius: 4px;
	font-size: 16px;
}

.mhb-error-message {
	background: #ffebee;
	color: #c62828;
	border-left: 4px solid #c62828;
}

.mhb-success-message {
	background: #e8f5e9;
	color: #2e7d32;
	border-left: 4px solid #2e7d32;
}

.mhb-info-message {
	background: #e3f2fd;
	color: #1565c0;
	border-left: 4px solid #1565c0;
}

/* Loading Indicator */
.mhb-loading {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	z-index: 9999;
	text-align: center;
}

.mhb-spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #0073aa;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: mhb-spin 1s linear infinite;
	margin: 0 auto 15px;
}

@keyframes mhb-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.mhb-loading p {
	margin: 0;
	font-size: 16px;
	color: #333;
}

/* Availability Results */
#mhb-availability-results {
	margin-bottom: 20px;
}

.mhb-availability-header {
	font-size: 16px;
	margin-bottom: 15px;
	color: #333;
}

.mhb-no-availability {
	padding: 20px;
	text-align: center;
	color: #666;
	background: #fff;
	border: 2px dashed #ddd;
	border-radius: 4px;
}

/* Registration Fields Validation States */
.mhb-reg-input.mhb-valid {
	border-color: #4caf50;
}

.mhb-reg-input.mhb-invalid {
	border-color: #f44336;
}

.mhb-reg-match-status {
	margin-top: 10px;
	padding: 10px;
	border-radius: 4px;
	font-size: 14px;
}

.mhb-reg-match-status.match {
	background: #e8f5e9;
	color: #2e7d32;
}

.mhb-reg-match-status.no-match {
	background: #ffebee;
	color: #c62828;
}

/* Tablet and Desktop Enhancements */
@media (min-width: 768px) {
	.mhb-booking-form {
		padding: 30px;
	}
	
	.mhb-step {
		padding: 30px;
	}
	
	.mhb-button {
		width: auto;
		min-width: 200px;
	}
	
	.mhb-form-group {
		margin-bottom: 25px;
	}
}

/* High Contrast for Accessibility */
@media (prefers-contrast: high) {
	.mhb-input {
		border-width: 3px;
	}
	
	.mhb-bay-option {
		border-width: 3px;
	}
}

/* Alternatives Section */
.mhb-alternatives-section {
	margin-top: 30px;
	padding: 20px;
	background: #fff;
	border: 2px solid #0073aa;
	border-radius: 8px;
}

.mhb-alternatives-header {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 600;
	color: #0073aa;
}

.mhb-alternatives-note {
	margin: 0 0 15px 0;
	font-size: 14px;
	color: #666;
}

.mhb-alternatives-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mhb-alternative-option {
	margin: 0;
}

.mhb-alternative-button {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 18px;
	background: #f5f5f5;
	border: 2px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 16px;
}

.mhb-alternative-button:hover {
	background: #e8f5fa;
	border-color: #0073aa;
}

.mhb-alternative-button:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.mhb-alternative-date {
	font-weight: 600;
	color: #333;
}

.mhb-alternative-count {
	font-size: 14px;
	color: #666;
}

/* Print Styles */
@media print {
	.mhb-button {
		display: none;
	}
	
	.mhb-loading {
		display: none;
	}
}

/* Calendar Section */
.mhb-calendar-section {
	margin: 25px 0;
	padding: 20px;
	background: #fff;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
}

.mhb-calendar-section h4 {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.mhb-calendar-note {
	margin: 0 0 15px 0;
	font-size: 14px;
	color: #666;
}

.mhb-calendar-container {
	overflow-x: auto;
	margin-bottom: 15px;
}

.mhb-calendar-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	min-width: 600px;
}

.mhb-calendar-table th,
.mhb-calendar-table td {
	padding: 8px;
	text-align: center;
	border: 1px solid #ddd;
}

.mhb-cal-bay-header,
.mhb-cal-date-header {
	background: #f5f5f5;
	font-weight: 600;
	color: #333;
}

.mhb-cal-bay-name {
	font-weight: 500;
	text-align: left;
	background: #fafafa;
	white-space: nowrap;
}

.mhb-cal-cell {
	width: 40px;
	height: 40px;
	position: relative;
}

/* Calendar Cell States */
.mhb-cal-available {
	background: #c8e6c9;
}

.mhb-cal-unavailable {
	background: #ffcdd2;
}

.mhb-cal-partial {
	background: #fff9c4;
}

.mhb-cal-past {
	background: #f0f0f0;
	color: #999;
}

/* Selectable cells - enabled for both desktop and mobile */
.mhb-cal-selectable {
	cursor: pointer;
	transition: transform 0.1s, box-shadow 0.1s;
}

.mhb-cal-selectable:hover {
	transform: scale(1.05);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 10;
}

/* Mobile-specific touch improvements */
@media (max-width: 767px) {
	.mhb-cal-selectable {
		touch-action: manipulation; /* Prevent double-tap zoom */
	}
	
	.mhb-cal-selectable:active {
		transform: scale(0.95);
		background-color: rgba(0, 115, 170, 0.1);
	}
}

/* Calendar Legend */
.mhb-calendar-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	font-size: 14px;
}

.mhb-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mhb-legend-swatch {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 1px solid #ddd;
	border-radius: 3px;
}

.mhb-legend-available {
	background: #c8e6c9;
}

.mhb-legend-unavailable {
	background: #ffcdd2;
}

.mhb-legend-partial {
	background: #fff9c4;
}

/* Mobile adjustments for calendar */
@media (max-width: 767px) {
	.mhb-calendar-table {
		font-size: 12px;
	}
	
	.mhb-calendar-table th,
	.mhb-calendar-table td {
		padding: 6px 4px;
	}
	
	.mhb-cal-cell {
		width: 30px;
		height: 30px;
	}
	
	.mhb-calendar-note {
		font-size: 13px;
	}
}

/* DVLA vehicle details section */
.mhb-dvla-section {
	background: #f0f8ff;
	border: 1px solid #b8daff;
	border-radius: 5px;
	padding: 15px;
	margin: 20px 0;
}

.mhb-dvla-section h4 {
	margin-top: 0;
	margin-bottom: 10px;
	color: #004085;
}

.mhb-dvla-note {
	font-size: 14px;
	color: #004085;
	margin-bottom: 15px;
}

.mhb-dvla-section .mhb-form-group {
	margin-bottom: 12px;
}

.mhb-dvla-section .mhb-form-group label {
	font-weight: normal;
}

.mhb-dvla-section input[type="checkbox"] {
	margin-right: 8px;
}

/* =====================================================
   BRANDING & ATTRIBUTION (Milestone 9.3)
   ===================================================== */

/* Frontend Powered By Footer */
.mhb-poweredby {
margin-top: 24px;
padding: 12px 16px;
background: #f8f9fa;
border-top: 1px solid #ddd;
text-align: center;
font-size: 13px;
color: #666;
}

.mhb-poweredby p {
margin: 0;
line-height: 1.5;
}

.mhb-poweredby a {
color: #2271b1;
text-decoration: none;
}

.mhb-poweredby a:hover {
text-decoration: underline;
}

/* Responsive: smaller padding on narrow screens */
@media (max-width: 480px) {
.mhb-poweredby {
padding: 10px 12px;
font-size: 12px;
}
}

/* =====================================================
   ADD-ONS SECTION
   ===================================================== */

.mhb-addons-section {
	margin: 20px 0;
	padding: 20px;
	background: #fff;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
}

.mhb-addons-section h4 {
	margin: 0 0 15px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.mhb-addons-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mhb-addon-option {
	padding: 15px;
	border: 2px solid #ddd;
	border-radius: 4px;
	background: #f9f9f9;
	transition: border-color 0.2s, background 0.2s;
}

.mhb-addon-option:hover {
	background: #f0f8ff;
	border-color: #0073aa;
}

.mhb-addon-label {
	display: flex;
	align-items: flex-start;
	cursor: pointer;
	margin: 0;
}

.mhb-addon-checkbox {
	margin-right: 12px;
	margin-top: 2px;
	width: 18px;
	height: 18px;
	cursor: pointer;
	flex-shrink: 0;
}

.mhb-addon-details {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1;
}

.mhb-addon-name {
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.mhb-addon-price {
	font-size: 15px;
	color: #0073aa;
	font-weight: 600;
}

.mhb-addon-description {
	font-size: 14px;
	color: #666;
	font-style: italic;
}

/* Tablet and Desktop - horizontal layout for add-on details */
@media (min-width: 768px) {
	.mhb-addon-details {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
	}
	
	.mhb-addon-name {
		flex: 0 0 auto;
	}
	
	.mhb-addon-price {
		flex: 0 0 auto;
		margin-left: auto;
	}
	
	.mhb-addon-description {
		flex: 1 0 100%;
		margin-top: 5px;
	}
}
