/**
 * Public CSS
 *
 * @package Hoptown_Rental
 */

/* Calendar Styling */
.hoptown-booking-calendar {
	max-width: 600px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.hoptown-calendar-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
}

.hoptown-calendar-prev,
.hoptown-calendar-next {
	background: #79009e;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 8px 16px;
	cursor: pointer;
	font-size: 18px;
	transition: background 0.2s;
}

.hoptown-calendar-prev:hover,
.hoptown-calendar-next:hover {
	background: #5c0077;
}

.hoptown-calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
	margin-bottom: 10px;
}

.hoptown-calendar-weekday {
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	color: #555;
	padding: 10px 0;
}

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

.hoptown-calendar-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 14px;
	position: relative;
}

.hoptown-day-number {
	line-height: 1;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.hoptown-day-price {
	font-size: 11px;
	color: #7b7b7b;
	line-height: 1;
	opacity: 0.6;
	pointer-events: none;
	position: absolute;
	top: calc(50% + 10px);
	left: 50%;
	transform: translateX(-50%);
}

.hoptown-calendar-day.hoptown-day-selected .hoptown-day-price {
	color: #f3e6f8;
}

.hoptown-calendar-day.hoptown-day-disabled .hoptown-day-price,
.hoptown-calendar-day.hoptown-day-past .hoptown-day-price {
	color: #b5b5b5;
}

.hoptown-calendar-day:hover:not(.hoptown-day-disabled):not(.hoptown-day-past) {
	background: #f0f0f0;
	border-color: #79009e;
}

.hoptown-calendar-day.hoptown-day-disabled {
	background: #f5f5f5;
	color: #999;
	cursor: not-allowed;
	text-decoration: line-through;
}

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

.hoptown-calendar-day.hoptown-day-selected {
	background: #79009e;
	color: white;
	border-color: #79009e;
	font-weight: 600;
}

.hoptown-calendar-day.hoptown-day-empty {
	border: none;
	cursor: default;
}

.hoptown-calendar-legend {
	display: flex;
	gap: 20px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #ddd;
}

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

.hoptown-legend-color {
	width: 20px;
	height: 20px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.hoptown-legend-available {
	background: white;
}

.hoptown-legend-booked {
	background: #f5f5f5;
	text-decoration: line-through;
}

.hoptown-legend-selected {
	background: #79009e;
}

/* Booking Form Styling */
.hoptown-booking-form-wrapper {
	max-width: 600px;
	margin: 20px auto;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hoptown-form-section {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.hoptown-form-section:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
}

.hoptown-form-section h3 {
	margin: 0 0 15px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.hoptown-selected-date {
	font-size: 16px;
	color: #666;
	font-style: italic;
}

.hoptown-pricing-table {
	width: 100%;
	border-collapse: collapse;
}

.hoptown-pricing-table tr {
	border-bottom: 1px solid #eee;
}

.hoptown-pricing-table tr:last-child {
	border-bottom: none;
	font-size: 18px;
}

.hoptown-pricing-table td {
	padding: 10px 0;
}

.hoptown-pricing-table td:last-child {
	text-align: right;
	color: #79009e;
	font-weight: 600;
}

.hoptown-form-group {
	margin-bottom: 20px;
}

.hoptown-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
}

.hoptown-form-group input[type="text"],
.hoptown-form-group input[type="email"],
.hoptown-form-group input[type="tel"],
.hoptown-form-group input[type="time"],
.hoptown-form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.2s;
}

.hoptown-form-group input[type="text"]:focus,
.hoptown-form-group input[type="email"]:focus,
.hoptown-form-group input[type="tel"]:focus,
.hoptown-form-group input[type="time"]:focus,
.hoptown-form-group textarea:focus {
	outline: none;
	border-color: #79009e;
}

.hoptown-form-group input[type="radio"] {
	margin-right: 8px;
}

.hoptown-form-group label input[type="radio"] {
	margin-right: 8px;
	display: inline-block;
}

.hoptown-submit-booking {
	width: 100%;
	padding: 15px;
	background: #79009e;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.hoptown-submit-booking:hover {
	background: #5c0077;
}

.hoptown-submit-booking:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.hoptown-form-messages {
	margin-top: 20px;
}

.hoptown-message {
	padding: 12px 15px;
	border-radius: 4px;
	margin-bottom: 10px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
	.hoptown-booking-calendar,
	.hoptown-booking-form-wrapper {
		padding: 15px;
	}

	.hoptown-calendar-day {
		font-size: 12px;
	}

	.hoptown-calendar-header h3 {
		font-size: 18px;
	}
}


/* Layout improvements */
.hoptown-booking-calendar,
.hoptown-booking-form-wrapper {
	max-width: 720px;
}

.hoptown-inflatable-single .booking-section {
	margin-top: 40px;
}

.hoptown-booking-form-wrapper {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.hoptown-form-section h3 {
	font-size: 20px;
	letter-spacing: 0.2px;
}

.hoptown-pricing-table tr:last-child td {
	border-top: 1px solid #f0f0f0;
	padding-top: 14px;
}

.hoptown-booking-calendar {
	border-radius: 12px;
	padding: 24px;
}

.hoptown-calendar-day {
	border-radius: 6px;
}

.hoptown-calendar-day.hoptown-day-selected {
	box-shadow: 0 6px 18px rgba(121, 0, 158, 0.25);
}

.hoptown-form-group input[type="text"],
.hoptown-form-group input[type="email"],
.hoptown-form-group input[type="tel"],
.hoptown-form-group input[type="time"],
.hoptown-form-group textarea {
	border-radius: 8px;
	border-color: #e3e3e3;
}

.hoptown-submit-booking {
	border-radius: 8px;
}


/* Single product layout */
.single-hoptown_inflatable .wp-block-post-date,
.single-hoptown_inflatable .wp-block-post-terms,
.single-hoptown_inflatable .wp-block-post-author {
	display: none;
}

.hoptown-product {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 32px;
	align-items: start;
	margin-bottom: 40px;
}

.hoptown-product-media {
	min-width: 0;
}

.hoptown-product-gallery {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hoptown-product-main img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
}

.hoptown-product-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
	gap: 10px;
	margin-top: 12px;
}

.hoptown-product-thumbs img {
	width: 100%;
	border-radius: 8px;
	border: 1px solid #e6e6e6;
}

.hoptown-product-summary {
	position: sticky;
	top: 20px;
}

.hoptown-product-title {
	margin: 0 0 8px 0;
	font-size: 32px;
}

.hoptown-product-price {
	font-size: 24px;
	font-weight: 700;
	color: #79009e;
	margin: 0 0 12px 0;
}

.hoptown-product-excerpt {
	margin: 0 0 20px 0;
	color: #555;
}

.hoptown-booking-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.hoptown-booking-title {
	margin: 0 0 16px 0;
	font-size: 20px;
}

.hoptown-product-details {
	margin-top: 24px;
	max-width: 100%;
}

@media (max-width: 980px) {
	.hoptown-product {
		grid-template-columns: 1fr;
	}

	.hoptown-product-summary {
		position: static;
	}
}


.hoptown-product-gallery a {
	display: block;
	cursor: zoom-in;
}

.hoptown-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 24px;
}

.hoptown-lightbox.is-open {
	display: flex;
}

.hoptown-lightbox img {
	max-width: 95vw;
	max-height: 90vh;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hoptown-booking-card .hoptown-booking-calendar,
.hoptown-booking-card .hoptown-booking-form-wrapper {
	box-shadow: none;
	border: 1px solid #eee;
	padding: 16px;
	max-width: 100%;
	margin: 0;
}

.hoptown-booking-card .hoptown-booking-form-wrapper {
	margin-top: 16px;
}
