/* FullCalendar Customization for Yacht Calendar */
.yacht-fullcalendar-wrapper {
	background: #fff;
	padding: 0;
}

/* FullCalendar Custom Colors - for background events */
.fc .fc-bg-event.season-high {
	background-color: #ff9e37 !important;
}

.fc .fc-bg-event.season-mid {
	background-color: #FFCB6B !important;
}

.fc .fc-bg-event.season-low {
	background-color: #ffeca6 !important;
}

.fc .fc-bg-event.season-notavailable {
	background-color: #D3D3D3 !important;
	border: 1px solid #999999 !important;
	opacity: 0.7;
}

.fc .fc-bg-event.listing-home-base {
	background-color: #00527A !important;
}

.fc .fc-bg-event.listing-passage {
	background-color: #0AADFF !important;
}

.fc .fc-bg-event.listing-flexible {
	background-color: #0088CC !important;
}

.fc .fc-bg-event {
	opacity: 1 !important;
	border: none !important;
}

/* Hide all event text and titles from calendar */
.fc .fc-event-title,
.fc .fc-event-title-container,
.fc .fc-daygrid-event-harness,
.fc .fc-h-event,
.fc .fc-v-event {
	display: none !important;
}

/* Make background events clickable */
.fc .fc-daygrid-day.fc-day {
	cursor: pointer;
}

.fc .fc-daygrid-day.fc-day:hover {
	opacity: 0.9;
}

/* FullCalendar Styling */
.fc {
	font-family: inherit;
}

/* Make 12 months fit in one row */
.fc-multiMonthYear-view {
	display: grid !important;
	grid-template-columns: repeat(6, 1fr) !important;
	gap: 8px !important;
}

.fc-multiMonthYear-view .fc-multimonth-month {
	width: 100% !important;
	min-width: 0 !important;
}

.fc-multiMonthYear-view .fc-multimonth-title {
	font-size: 13px !important;
	padding: 6px 4px !important;
	font-weight: 600 !important;
}

.fc-multiMonthYear-view .fc-col-header-cell {
	font-size: 10px !important;
	padding: 3px !important;
}

.fc-multiMonthYear-view .fc-daygrid-day-number {
	font-size: 11px !important;
	padding: 3px !important;
}

.fc-multiMonthYear-view .fc-day-today .fc-daygrid-day-number {
	width: 22px !important;
	height: 22px !important;
	font-size: 10px !important;
}

.fc-multiMonthYear-view .fc-daygrid-day {
	min-height: 28px !important;
}

.fc .fc-toolbar-title {
	font-size: 24px;
	font-weight: 700;
	color: #333;
}

.fc .fc-button {
	background-color: #fff;
	border: 1px solid #A5A5A5;
	color: #333;
	text-transform: capitalize;
	font-weight: 600;
	transition: all 0.3s ease;
}

.fc .fc-button:hover {
	background-color: #333;
	border-color: #00527A;
}

.fc .fc-button-active {
	background-color: #76818D !important;
	border-color: #A5A5A5 !important;
	color: #fff !important;
}

.fc .fc-daygrid-day-top {
	justify-content: center;
}

.fc .fc-daygrid-day-number {
	padding: 8px;
	font-weight: 500;
}

.fc .fc-day-today {
	background-color: #fff9e6 !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
	background-color: #ff7474;
	color: #333;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

/* ===== LISTINGS SECTION ===== */
.yacht-calendar__listings {
	padding: 40px 0;
	background: #fff;
}

.yacht-calendar__listings-header {
	margin-bottom: 10px;
}

.yacht-calendar__listings-header h4 {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	color: #333;
}

.yacht-calendar__listings-text {
	color: #666;
	font-size: 14px;
	margin-bottom: 30px;
	line-height: 1.6;
}

.yacht-calendar__listings-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.yacht-calendar__listing-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px 20px;
}

.yacht-calendar__listing-badge {
	width: 30%;
	padding: 12px 20px;
	border-radius: 8px;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	text-align: center;
}

.listing-home-base {
	background: #00527A;
}

.listing-passage {
	background: #0AADFF;
}

.listing-flexible {
	background: #0088CC;
}

.yacht-calendar__listing-dates {
	text-align: center;
	font-size: 14px;
	color: #666;
	padding: 5px 0;
}

.yacht-calendar__listing-dates .start,
.yacht-calendar__listing-dates .end {
	font-weight: 500;
	color: #333;
}

.yacht-calendar__listing-name {
	width: calc(70% - 150px);
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.yacht-calendar__listing-name a {
	text-decoration: underline;
}

/* ===== LEGEND ===== */
.yacht-calendar__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 80px;
	padding: 25px 20px;
	background: #f8f8f8;
	border-top: 1px solid #e0e0e0;
	justify-content: center;
}

.yacht-calendar__legend-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: #555;
}

.yacht-calendar__legend-box {
	width: 35px;
	height: 22px;
	border-radius: 3px;
	display: inline-block;
}

.yacht-calendar__legend-box.season-high {
	background: #ff9e37;
	border: 1px solid #ddd;
}

.yacht-calendar__legend-box.season-mid {
	background: #ffcb6b;
	border: 1px solid #ddd;
}

.yacht-calendar__legend-box.season-low {
	background: #ffeca6;
	border: 1px solid #ddd;
}

.yacht-calendar__legend-box.season-notavailable {
	background: #D3D3D3;
	border: 1px solid #999999;
}

.yacht-calendar__legend-box.listing-home-base {
	background: #00527A;
}

.yacht-calendar__legend-box.listing-passage {
	background: #0AADFF;
}

.yacht-calendar__legend-box.listing-flexible {
	background: #0088CC;
}

@media (max-width: 1200px) {
	.yacht-calendar__listing-badge,
	.yacht-calendar__listing-name {
		width: 40%;
	}
}

@media (max-width: 992px) {

	.yacht-calendar__listing-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.yacht-calendar__listing-badge,
	.yacht-calendar__listing-name {
		width: 100%;
	}

	.yacht-calendar__listing-name {
		order: 1;
	}

	.yacht-calendar__listing-dates {
		order: 2;
		padding: 0;
		text-align: left;
	}

	.yacht-calendar__listing-badge {
		order: 3;
	}
}

/* ===== MOBILE OPTIMIZATION (95% traffic) ===== */
@media (max-width: 768px) {
	.yacht-fullcalendar-wrapper {
		margin: 20px -15px;
		overflow-x: auto;
	}
	
	/* 6 months per row - better for mobile */
	.fc-multiMonthYear-view {
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 6px !important;
	}
	
	.fc-multiMonthYear-view .fc-multimonth-title {
		font-size: 11px !important;
		padding: 5px 3px !important;
	}
	
	.fc-multiMonthYear-view .fc-col-header-cell {
		font-size: 8px !important;
		padding: 2px !important;
	}
	
	.fc-multiMonthYear-view .fc-daygrid-day-number {
		font-size: 9px !important;
		padding: 2px !important;
	}
	
	.fc-multiMonthYear-view .fc-day-today .fc-daygrid-day-number {
		width: 20px !important;
		height: 20px !important;
	}
	
	/* FullCalendar mobile adjustments */
	.fc .fc-toolbar {
		flex-direction: column;
		gap: 10px;
	}
	
	.fc .fc-toolbar-title {
		font-size: 18px;
	}
	
	.fc .fc-button {
		font-size: 13px;
		padding: 6px 10px;
	}
	
	.fc .fc-daygrid-day-number {
		font-size: 12px;
		padding: 4px;
	}
	
	.fc .fc-day-today .fc-daygrid-day-number {
		width: 28px;
		height: 28px;
	}
	
	/* Listings optimized for mobile */
	.yacht-calendar__listings {
		padding: 30px 15px;
	}
	
	.yacht-calendar__listings-header h4 {
		font-size: 18px;
	}
	
	.yacht-calendar__listings-text {
		font-size: 13px;
	}
	
	.yacht-calendar__listings-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.yacht-calendar__listing-card {
		gap: 5px 10px;
	}
	
	.yacht-calendar__listing-badge {
		font-size: 14px;
		padding: 10px 16px;
	}
	
	/* Legend stacked on mobile */
	.yacht-calendar__legend {
		justify-content: flex-start;
		gap: 15px;
		padding: 20px 15px;
	}
	
	.yacht-calendar__legend-item {
		flex: 0 0 calc(50% - 7.5px);
		font-size: 12px;
	}
}

@media (max-width: 580px) {
	.fc .fc-toolbar-title {
		font-size: 16px;
	}
	
	.fc .fc-button {
		font-size: 12px;
		padding: 5px 8px;
	}

	.yacht-calendar__legend-item {
		flex: 0 0 calc(100% - 7.5px);
		font-size: 12px;
	}
	
	.yacht-calendar__listing-badge {
		font-size: 13px;
		padding: 8px 14px;
	}
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
	.yacht-calendar__listings-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 18px;
	}
}

/* Desktop */
@media (min-width: 1025px) {
	.yacht-calendar__listings-grid {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}
}

/* ===== MODAL STYLES ===== */
.yacht-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	align-items: center;
	justify-content: center;
}

.yacht-modal-content {
	background-color: #fff;
	padding: 30px;
	border-radius: 12px;
	max-width: 500px;
	width: 90%;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.yacht-modal-close {
	position: absolute;
	right: 15px;
	top: 15px;
	font-size: 32px;
	font-weight: 700;
	color: #999;
	cursor: pointer;
	transition: color 0.2s;
	line-height: 1;
}

.yacht-modal-close:hover,
.yacht-modal-close:focus {
	color: #333;
}

.yacht-modal-content h3 {
	margin: 0 0 15px 0;
	font-size: 24px;
	font-weight: 700;
	color: #00527A;
}

.yacht-modal-content p {
	margin: 10px 0;
	font-size: 16px;
	color: #555;
	line-height: 1.6;
}

.yacht-modal-content #yacht-modal-price {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #eee;
}

@media (max-width: 480px) {
	.yacht-modal-content {
		padding: 20px;
		width: 95%;
	}
	
	.yacht-modal-content h3 {
		font-size: 20px;
		margin-bottom: 12px;
	}
	
	.yacht-modal-content p {
		font-size: 14px;
	}
	
	.yacht-modal-close {
		font-size: 28px;
		right: 10px;
		top: 10px;
	}
}
