/**
 * Booking Calendar Styles
 * 
 * @package Bouncy_Castle_Booking
 */

/* Main Container */
.bcb-booking-widget {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Product Info */
.bcb-product-info {
	margin-bottom: 30px;
	text-align: center;
}

.bcb-product-info h3 {
	font-size: 28px;
	margin-bottom: 15px;
	color: #333;
}

.bcb-product-image {
	margin: 20px 0;
}

.bcb-product-image img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bcb-product-excerpt {
	font-size: 16px;
	color: #666;
	line-height: 1.6;
}

/* Legend */
.bcb-legend {
	margin-top: 10px;
	padding: 15px;
	background: white;
	border-radius: 8px;
}

.bcb-legend h4 {
	margin: 0 0 10px 0;
	font-size: 16px;
	color: #333;
}

.bcb-legend-items {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

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

.bcb-legend-color {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	display: inline-block;
	border: 1px solid #ddd;
}

.bcb-legend-selected {
	background: #ffd700;
	border: 2px solid #ffa500;
}

/* Calendar Container */
.bcb-calendar-container {
	margin-bottom: 30px;
	background: #fff;
	border-radius: 15px;
	padding: 20px;
}

.bcb-calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.bcb-calendar-header h4 {
	margin: 0;
	font-size: 20px;
	color: #333;
}

.bcb-prev-month,
.bcb-next-month {
	background: #3498db;
	color: #fff;
	border: none;
	padding: 8px 15px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 18px;
	transition: background 0.3s;
}

.bcb-prev-month:hover,
.bcb-next-month:hover {
	background: #2980b9;
}

/* Calendar Grid */
.bcb-calendar {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
}

.bcb-calendar-day-header,
.bcb-calendar-day {
	padding: 12px;
	text-align: center;
	border-radius: 4px;
	min-height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bcb-calendar-day-header {
	font-weight: 600;
	color: #666;
	background: #f1f3f5;
}

.bcb-calendar-day {
	background: #fff;
	border: 1px solid #e1e4e8;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
}

.bcb-calendar-day:hover:not(.disabled):not(.booked-pending):not(.booked-approved) {
	background: #f8f9fa;
	border-color: #3498db;
	transform: translateY(-2px);
}

.bcb-calendar-day.disabled {
	color: #ccc;
	background: #fafafa;
	cursor: not-allowed;
}

.bcb-calendar-day.other-month {
	color: #ccc;
	background: #fafbfc;
}

.bcb-calendar-day.today {
	font-weight: bold;
	border: 2px solid #3498db;
}

.bcb-calendar-day.selected {
	background: #ffd700 !important;
	border-color: #ffa500;
	color: #333;
	font-weight: bold;
}

.bcb-calendar-day.booked-pending {
	background: #3498db;
	color: #fff;
	cursor: not-allowed;
}

.bcb-calendar-day.booked-approved {
	background: #e74c3c;
	color: #fff;
	cursor: not-allowed;
}

.bcb-calendar-day.past {
	color: #999;
	background: #f5f5f5;
	cursor: not-allowed;
}

/* Booking Form */
.bcb-booking-form-container {
	background: #fff;
	border-radius: 15px;
	padding: 25px;
}

.bcb-booking-form-container h4 {
	margin: 0 0 20px 0;
	font-size: 22px;
	color: #333;
}

.bcb-booking-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.bcb-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.bcb-form-row.bcb-form-row-full {
	grid-template-columns: 1fr;
}

.bcb-form-group {
	display: flex;
	flex-direction: column;
}

.bcb-form-group-full {
	grid-column: 1 / -1;
}

.bcb-form-group label {
	margin-bottom: 5px;
	font-weight: 500;
	color: #333;
	font-size: 14px;
}

.bcb-form-group input,
.bcb-form-group textarea {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.3s;
}

.bcb-form-group input:focus,
.bcb-form-group textarea:focus {
	outline: none;
	border-color: #3498db;
}

.bcb-form-group textarea {
	resize: vertical;
}

.bcb-submit-btn {
	background: #27ae60;
	color: #fff;
	border: none;
	padding: 12px 30px;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s;
	width: 100%;
	max-width: 300px;
	justify-self: center;
}

.bcb-submit-btn:hover {
	background: #229954;
}

.bcb-submit-btn:disabled {
	background: #95a5a6;
	cursor: not-allowed;
}

.bcb-form-message {
	padding: 12px;
	border-radius: 4px;
	margin-top: 15px;
	display: none;
}

.bcb-form-message.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
	display: block;
}

.bcb-form-message.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	display: block;
}

/* Notice */
.bcb-notice {
	background: #fff3cd;
	color: #856404;
	padding: 15px;
	border-radius: 4px;
	border: 1px solid #ffeeba;
	margin: 20px 0;
}

.bcb-editor-notice {
	background: #e3f2fd;
	color: #0d47a1;
	padding: 15px;
	border-radius: 4px;
	border: 1px solid #90caf9;
	margin: 20px 0;
	text-align: center;
}

/* Loading Spinner */
.bcb-loading {
	display: none;
	text-align: center;
	padding: 20px;
}

.bcb-loading.active {
	display: block;
}

.bcb-spinner {
	border: 3px solid #f3f3f3;
	border-top: 3px solid #3498db;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 0 auto;
}

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

/* Responsive */
@media (max-width: 768px) {
	.bcb-booking-widget {
		padding: 15px;
	}

	.bcb-form-row {
		grid-template-columns: 1fr;
	}

	.bcb-calendar-day,
	.bcb-calendar-day-header {
		padding: 8px;
		font-size: 14px;
		min-height: 40px;
	}

	.bcb-legend-items {
		flex-direction: column;
	}

	.bcb-product-info h3 {
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	.bcb-calendar-day,
	.bcb-calendar-day-header {
		padding: 5px;
		font-size: 12px;
		min-height: 35px;
	}

	.bcb-prev-month,
	.bcb-next-month {
		padding: 6px 12px;
		font-size: 16px;
	}
}

