/**
 * NauSYS front-end styles — light touch so they inherit the active theme
 * (Twenty Twenty-Five) rather than fighting it. Uses relative units and the
 * theme's own button styling where possible.
 */

.nausys-search {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-end;
	margin: 0 0 1.5rem;
}
.nausys-search__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1 1 10rem;
}
.nausys-search__field label {
	font-size: 0.85rem;
	font-weight: 600;
}
.nausys-search__field input {
	padding: 0.5rem 0.6rem;
	max-width: 100%;
}
.nausys-search__submit {
	flex: 0 0 auto;
}

.nausys-results__count {
	font-weight: 600;
	margin: 0 0 1rem;
}
.nausys-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1.25rem;
}
.nausys-card {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.5rem;
	overflow: hidden;
	background: #fff;
}
.nausys-card__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.nausys-card__body {
	padding: 0.9rem 1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	flex: 1 1 auto;
}
.nausys-card__title {
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.2;
}
.nausys-card__title a {
	text-decoration: none;
}
.nausys-card__meta {
	margin: 0;
	font-size: 0.85rem;
	opacity: 0.75;
}
.nausys-card__price {
	margin: 0;
	font-weight: 700;
}
.nausys-card__cta {
	margin-top: auto;
	align-self: flex-start;
}

.nausys-specs {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}
.nausys-specs li {
	display: flex;
	flex-direction: column;
}
.nausys-spec-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.6;
}
.nausys-spec-value {
	font-size: 1.1rem;
	font-weight: 700;
}

.nausys-booking {
	margin: 1.5rem 0;
	padding: 1.2rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.5rem;
}
.nausys-booking__dates {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 0.75rem;
}
.nausys-booking__hint {
	font-size: 0.9rem;
	margin: 0.5rem 0;
}
.nausys-booking .nausys-booking__cta {
	display: block;
	float: none;
	width: fit-content;
	margin: 0.25rem 0 0;
}
.nausys-booking .nausys-booking__note {
	display: block;
	clear: both;
	float: none;
	font-size: 0.8rem;
	opacity: 0.7;
	margin: 0.75rem 0 0;
}

.nausys-notice {
	padding: 0.9rem 1rem;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 0.4rem;
}

.nausys-cal-msg {
	color: #b32d2e;
	font-size: 0.85rem;
	margin: 0.4rem 0 0;
	min-height: 1em;
}
.nausys-booking__next {
	font-size: 0.85rem;
	opacity: 0.8;
	margin: 0.35rem 0 0;
}
.nausys-portal__bookings {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.5rem;
}
.nausys-portal__bookings th,
.nausys-portal__bookings td {
	text-align: left;
	padding: 0.4rem 0.6rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	font-size: 0.9rem;
}

/* Availability calendar / date-range picker (flatpickr). */
.nausys-availability__intro {
	font-size: 0.9rem;
	margin: 0 0 0.75rem;
}
.nausys-availability {
	display: none; /* the read-only input; only its inline calendar shows */
}
.nausys-availability-wrap .flatpickr-calendar.inline {
	margin: 0 auto;
	box-shadow: none;
}
/* Booked (and past) days: clearly struck-through and hatched. */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
	background: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 4px, rgba(0, 0, 0, 0.12) 4px, rgba(0, 0, 0, 0.12) 8px);
	color: rgba(0, 0, 0, 0.32);
	text-decoration: line-through;
	cursor: not-allowed;
}
/* Selected range accent (match the booking CTA). */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
	background: #7850c8;
	border-color: #7850c8;
	color: #fff;
}
.flatpickr-day.inRange {
	background: rgba(120, 80, 200, 0.18);
	border-color: rgba(120, 80, 200, 0.18);
	box-shadow: -5px 0 0 rgba(120, 80, 200, 0.18), 5px 0 0 rgba(120, 80, 200, 0.18);
}
/* Read-only availability tab: clicks do nothing. */
.nausys-availability .flatpickr-day:not(.flatpickr-disabled) {
	cursor: default;
}

.nausys-confirm {
	margin: 0 0 1.5rem;
	padding: 1rem 1.2rem;
	border-radius: 0.5rem;
	border-left: 4px solid transparent;
}
.nausys-confirm p {
	margin: 0.25rem 0;
}
.nausys-confirm--ok {
	background: rgba(28, 160, 90, 0.1);
	border-left-color: #1ca05a;
}
.nausys-confirm--pending {
	background: rgba(220, 150, 20, 0.1);
	border-left-color: #dc9614;
}
.nausys-confirm__dates {
	font-size: 0.9rem;
	opacity: 0.85;
}

@media (prefers-color-scheme: dark) {
	.nausys-card,
	.nausys-booking {
		background: rgba(255, 255, 255, 0.04);
		border-color: rgba(255, 255, 255, 0.15);
	}
	.nausys-notice {
		background: rgba(255, 255, 255, 0.06);
	}
	.flatpickr-day.flatpickr-disabled,
	.flatpickr-day.flatpickr-disabled:hover {
		background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 4px, rgba(255, 255, 255, 0.14) 4px, rgba(255, 255, 255, 0.14) 8px);
		color: rgba(255, 255, 255, 0.35);
	}
}
