/* FWBooking Frontend Styles */

.fwbooking-page {
	max-width: 100%;
	margin: 0 auto;
}

.fwbooking-section {
	margin: 40px 0;
	padding: 20px;
}

.fwbooking-section h2,
.fwbooking-section h3 {
	margin-top: 0;
	color: #333;
}

/* Calendar Styles */
.fwbooking-calendar-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 20px;
	gap: 10px;
}

.fwbooking-nav-btn {
	padding: 10px 20px;
	background: #0073aa;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.2s;
}

.fwbooking-nav-btn:hover:not(:disabled) {
	background: #005a87;
}

.fwbooking-nav-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.fwbooking-calendar-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

@media (min-width: 768px) {
	.fwbooking-calendar-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.fwbooking-month {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 15px;
	background: #fff;
}

.fwbooking-month-header {
	text-align: center;
	font-weight: bold;
	margin-bottom: 15px;
	font-size: 16px;
}

.fwbooking-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
	margin-bottom: 10px;
	text-align: center;
	font-weight: bold;
	font-size: 12px;
	color: #666;
}

.fwbooking-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
}

.fwb-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	border: 1px solid #ddd;
	cursor: pointer;
	user-select: none;
	font-size: 12px;
	font-weight: 500;
	transition: all 0.2s;
}

.fwb-day-free {
	background: white;
	color: #333;
}

.fwb-day-free:hover {
	background: #f5f5f5;
	border-color: #0073aa;
	box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.fwb-day-requested {
	background: #C46E00;
	color: white;
	font-weight: bold;
	cursor: not-allowed;
}

.fwb-day-confirmed {
	background: #185FA5;
	color: white;
	font-weight: bold;
	cursor: not-allowed;
}

.fwb-day-past {
	background: #cccccc;
	color: #aaaaaa;
	cursor: not-allowed;
}

.fwb-day-today {
	text-decoration: underline;
}

.fwb-day-selected {
	background: #C46E00;
	color: white;
	font-weight: bold;
}

.fwbooking-calendar-legend {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #ddd;
}

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

.legend-box {
	width: 20px;
	height: 20px;
	border-radius: 3px;
	border: 1px solid #ccc;
}

/* Availability Checker */
.fwbooking-checker {
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.fwbooking-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
	margin: 20px 0;
}

@media (min-width: 768px) {
	.fwbooking-form {
		grid-template-columns: 1fr 1fr;
	}
}

.fwbooking-form label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-weight: 500;
	color: #333;
	font-size: 13px;
}

.fwbooking-form input,
.fwbooking-form textarea {
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: inherit;
	font-size: 13px;
}

.fwbooking-form input:focus,
.fwbooking-form textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.fwbooking-form button {
	grid-column: 1 / -1;
	padding: 12px 20px;
	background: #0073aa;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: bold;
	transition: background 0.2s;
}

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

/* Check Result */
#fwbooking-check-result {
	margin-top: 20px;
}

.fwbooking-available {
	background: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: 4px;
	padding: 15px;
	color: #155724;
	margin-bottom: 15px;
}

.fwbooking-unavailable {
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	padding: 15px;
	color: #721c24;
	margin-bottom: 15px;
}

/* Modal */
.fwbooking-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 20px;
}

.fwbooking-modal {
	background: white;
	border-radius: 8px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 30px;
	position: relative;
}

.fwbooking-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	color: #666;
	line-height: 1;
	padding: 0;
	width: 30px;
	height: 30px;
}

.fwbooking-modal-close:hover {
	color: #333;
}

.fwbooking-modal h3 {
	margin-top: 0;
}

.fwbooking-modal-summary {
	background: #E6F1FB;
	border-radius: 4px;
	padding: 15px;
	margin-bottom: 20px;
	font-size: 13px;
	line-height: 1.6;
}

.fwbooking-modal-summary strong {
	display: block;
	margin-bottom: 8px;
}

.fwbooking-konditionen {
	max-height: 110px;
	overflow-y: auto;
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin-bottom: 20px;
	font-size: 12px;
	line-height: 1.6;
}

/* Success Message */
.fwbooking-success {
	text-align: center;
	padding: 30px 20px;
	background: #EAF3DE;
	border: 1px solid #97C459;
	border-radius: 4px;
	color: #155724;
}

.fwbooking-success h3 {
	margin: 0 0 15px 0;
	color: #155724;
}

.fwbooking-success p {
	margin: 10px 0;
	font-size: 13px;
	line-height: 1.6;
}

.fwbooking-success button {
	margin-top: 20px;
	padding: 10px 30px;
	background: #0073aa;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

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

/* Weather Widget */
.fwbooking-weather {
	background: #f0f8ff;
	border: 1px solid #b3d9ff;
	border-radius: 4px;
}

.fwbooking-weather p {
	margin-top: 0;
	color: #666;
}

.fwbooking-weather-current {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 20px;
	background: white;
	border-radius: 4px;
	margin-bottom: 15px;
}

.fwbooking-weather-icon {
	font-size: 48px;
}

.fwbooking-weather-info h4 {
	margin: 0;
	font-size: 18px;
	color: #333;
}

.fwbooking-weather-info p {
	margin: 5px 0 0 0;
	font-size: 13px;
	color: #666;
}

.fwbooking-weather-forecast {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.fwbooking-forecast-day {
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 10px;
	text-align: center;
	font-size: 12px;
}

.fwbooking-forecast-day strong {
	display: block;
	margin-bottom: 5px;
}

.fwbooking-forecast-icon {
	font-size: 24px;
	margin: 5px 0;
}

.fwbooking-forecast-temp {
	font-size: 11px;
	color: #666;
}

.fwbooking-weather-attribution {
	font-size: 11px;
	color: #999;
	margin-top: 15px;
	text-align: center;
}

.fwbooking-weather-attribution a {
	color: #0073aa;
	text-decoration: none;
}

/* Responsive */
@media (max-width: 479px) {
	.fwbooking-calendar-grid {
		grid-template-columns: 1fr;
	}

	.fwbooking-month {
		padding: 10px;
	}

	.fwb-day {
		aspect-ratio: auto;
		padding: 8px 4px;
		font-size: 11px;
	}

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

	.fwbooking-form button {
		grid-column: 1;
	}

	.fwbooking-modal {
		max-width: 95%;
		padding: 20px;
	}

	.fwbooking-calendar-legend {
		flex-direction: column;
		gap: 10px;
	}
}

@media (max-width: 768px) {
	.fwbooking-weather-forecast {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Utility */
.button {
	display: inline-block;
	padding: 8px 14px;
	background: #2271b1;
	color: white;
	border: 1px solid #2271b1;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.2s;
}

.button:hover {
	background: #135e96;
}

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

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