/* Nausys WooCommerce – Frontend Styles */

/* ── Yacht specs table ────────────────────────────────────────────── */
.nausys-yacht-specs {
	margin: 1.5em 0;
}

.nausys-specs-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.nausys-specs-table th,
.nausys-specs-table td {
	padding: 6px 10px;
	border: 1px solid #e0e0e0;
	text-align: left;
}

.nausys-specs-table th {
	background: #f5f5f5;
	font-weight: 600;
	width: 40%;
}

/* ── Booking form ────────────────────────────────────────────────── */
.nausys-booking-form {
	margin: 1.5em 0;
	padding: 1.2em 1.5em;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.nausys-booking-form h3 {
	margin-top: 0;
}

.nausys-date-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: flex-end;
}

.nausys-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 140px;
}

.nausys-field label {
	font-size: 0.85em;
	font-weight: 600;
}

.nausys-datepicker {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 0.95em;
	width: 100%;
	box-sizing: border-box;
}

.nausys-check-btn-wrap {
	flex: 0 0 auto;
}

.nausys-check-btn-wrap .button {
	white-space: nowrap;
}

/* ── Availability result ─────────────────────────────────────────── */
.nausys-availability-result {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 0.95em;
}

.nausys-available {
	color: #2a7a3b;
}

.nausys-unavailable {
	color: #a00;
}

.nausys-checking {
	color: #555;
}

.nausys-icon {
	margin-right: 6px;
	font-weight: bold;
}

.nausys-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid #999;
	border-top-color: #333;
	border-radius: 50%;
	animation: nausys-spin 0.6s linear infinite;
	margin-right: 6px;
	vertical-align: middle;
}

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

/* ── Search form ────────────────────────────────────────────────── */
.nausys-search-wrap {
	margin: 1.5em 0;
}

.nausys-search-form {
	background: #f3f3f3;
	padding: 1.2em;
	border-radius: 4px;
	margin-bottom: 1.5em;
}

.nausys-search-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: flex-end;
	margin-bottom: 12px;
}

.nausys-filters {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.nausys-filters select {
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 3px;
}

/* ── Search results grid ─────────────────────────────────────────── */
.nausys-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.nausys-yacht-card {
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s;
}

.nausys-yacht-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.nausys-card-image img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.nausys-no-image {
	width: 100%;
	height: 180px;
	background: #eee;
}

.nausys-card-body {
	padding: 14px;
}

.nausys-card-body h3 {
	margin: 0 0 8px;
	font-size: 1em;
}

.nausys-specs {
	color: #666;
	font-size: 0.85em;
	margin: 0 0 8px;
}

.nausys-price {
	margin: 0 0 10px;
	font-size: 1.05em;
}

.nausys-book-btn {
	display: inline-block;
	text-decoration: none;
}

/* ── Pagination ─────────────────────────────────────────────────── */
.nausys-pagination {
	margin-top: 16px;
}

.nausys-page-btn {
	margin: 0 3px;
}

.nausys-page-active {
	font-weight: bold;
	border-color: #333 !important;
}

/* ── Availability calendar ──────────────────────────────────────── */
.nausys-availability-calendar {
	margin: 1.5em 0;
}

.flatpickr-day.nausys-booked {
	background: #f88 !important;
	color: #fff !important;
	text-decoration: line-through;
}

.nausys-calendar-legend {
	display: flex;
	gap: 16px;
	margin-top: 10px;
	font-size: 0.85em;
}

.nausys-legend-available::before,
.nausys-legend-booked::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
	margin-right: 5px;
	vertical-align: middle;
}

.nausys-legend-available::before {
	background: #4caf50;
}

.nausys-legend-booked::before {
	background: #f88;
}

.nausys-error {
	color: #a00;
}
