/* Itinerary Plugin Frontend Styles */

.sc-itinerary-container {
	margin: 25px 0;
}

.sc-itinerary-card {
	border: 2px solid #004b6d;
	border-radius: 12px;
	padding: 20px;
	background: #eef8ff;
}

.sc-itinerary-header {
	margin-bottom: 20px;
}

.sc-itinerary-title {
	color: #003e5d;
	margin: 0;
	font-size: 24px;
	word-break: break-word;
}

.sc-itinerary-meta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
	font-size: 15px;
}

.meta-item {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	line-height: 1.6;
}

.meta-item strong {
	color: #003e5d;
	min-width: fit-content;
}

.meta-item span {
	color: #333;
	flex: 1;
}

.sc-itinerary-description {
	margin-bottom: 20px;
	line-height: 1.6;
	color: #333;
}

.sc-itinerary-description p {
	margin: 0;
}

.sc-itinerary-image {
	margin-bottom: 20px;
	text-align: center;
}

.sc-itinerary-image img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	border-radius: 8px;
}

/* Table Styles */
.sc-itinerary-table-wrapper {
	overflow-x: auto;
	margin-top: 20px;
}

.sc-itinerary-ports-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border-radius: 8px;
	overflow: hidden;
}

.sc-itinerary-ports-table thead {
	background-color: #dcefff;
	font-weight: bold;
}

.sc-itinerary-ports-table thead tr {
	border-bottom: 2px solid #004b6d;
}

.sc-itinerary-ports-table th {
	padding: 12px 15px;
	text-align: left;
	color: #003e5d;
	font-size: 14px;
}

.sc-itinerary-ports-table td {
	padding: 12px 15px;
	border-bottom: 1px solid #ddd;
	color: #333;
	font-size: 14px;
}

.sc-itinerary-ports-table tbody tr:last-child td {
	border-bottom: none;
}

.sc-itinerary-ports-table tbody tr:hover {
	background-color: #f5f5f5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.sc-itinerary-card {
		padding: 15px;
		border: 2px solid #004b6d;
	}

	.sc-itinerary-title {
		font-size: 18px;
	}

	.sc-itinerary-meta {
		gap: 12px;
		font-size: 14px;
	}

	.meta-item {
		flex-direction: column;
		gap: 4px;
	}

	.meta-item strong {
		display: inline;
	}

	.meta-item span {
		flex: none;
	}

	.sc-itinerary-description {
		font-size: 14px;
	}

	/* Responsive Table */
	.sc-itinerary-table-wrapper {
		margin-top: 15px;
		overflow-x: auto;
	}

	.sc-itinerary-ports-table {
		font-size: 12px;
	}

	.sc-itinerary-ports-table th,
	.sc-itinerary-ports-table td {
		padding: 10px;
		text-align: left;
	}

	.sc-itinerary-ports-table th {
		font-size: 12px;
	}

	/* Stack table on very small screens */
	@media (max-width: 600px) {
		.sc-itinerary-card {
			padding: 12px;
			border-radius: 8px;
		}

		.sc-itinerary-title {
			font-size: 16px;
		}

		.sc-itinerary-meta {
			gap: 8px;
			font-size: 13px;
		}

		.sc-itinerary-ports-table {
			font-size: 11px;
		}

		.sc-itinerary-ports-table th,
		.sc-itinerary-ports-table td {
			padding: 8px;
			word-wrap: break-word;
		}

		.sc-itinerary-ports-table thead tr {
			border-bottom: 1px solid #004b6d;
		}

		.sc-itinerary-ports-table tbody tr:hover {
			background-color: transparent;
		}

		/* Create a card-like layout for table rows on mobile */
		.sc-itinerary-table-wrapper {
			display: block;
			width: 100%;
		}

		.sc-itinerary-ports-table {
			display: block;
			width: 100%;
		}

		.sc-itinerary-ports-table thead {
			display: none;
		}

		.sc-itinerary-ports-table tbody {
			display: block;
			width: 100%;
		}

		.sc-itinerary-ports-table tbody tr {
			display: block;
			border: 1px solid #ddd;
			border-radius: 6px;
			margin-bottom: 10px;
			padding: 10px;
			background: white;
		}

		.sc-itinerary-ports-table tbody tr:last-child {
			margin-bottom: 0;
		}

		.sc-itinerary-ports-table td {
			display: block;
			border: none;
			padding: 6px 0;
			text-align: left;
			border-bottom: none;
		}

		.sc-itinerary-ports-table td::before {
			content: attr(data-label);
			font-weight: bold;
			color: #003e5d;
			display: block;
			font-size: 11px;
			margin-bottom: 4px;
		}

		.sc-itinerary-ports-table td:last-child {
			margin-bottom: 0;
			padding-bottom: 0;
		}

		.sc-itinerary-image img {
			border-radius: 6px;
		}
	}
}

/* Extra large screens */
@media (min-width: 1200px) {
	.sc-itinerary-card {
		padding: 30px;
		border-radius: 16px;
	}

	.sc-itinerary-title {
		font-size: 28px;
	}

	.sc-itinerary-meta {
		gap: 12px;
		font-size: 16px;
	}

	.sc-itinerary-description {
		font-size: 15px;
	}

	.sc-itinerary-ports-table th,
	.sc-itinerary-ports-table td {
		padding: 14px 18px;
		font-size: 15px;
	}

	.sc-itinerary-ports-table th {
		font-size: 15px;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.sc-itinerary-card {
		background: #1a3a4d;
		border-color: #0099cc;
	}

	.sc-itinerary-title {
		color: #66d9ff;
	}

	.meta-item strong {
		color: #66d9ff;
	}

	.meta-item span,
	.sc-itinerary-description {
		color: #e0e0e0;
	}

	.sc-itinerary-ports-table {
		background: #2a4a5d;
		color: #e0e0e0;
	}

	.sc-itinerary-ports-table thead {
		background-color: #1a3a4d;
		border-color: #0099cc;
	}

	.sc-itinerary-ports-table thead tr {
		border-bottom-color: #0099cc;
	}

	.sc-itinerary-ports-table th {
		color: #66d9ff;
	}

	.sc-itinerary-ports-table td {
		border-color: #444;
		color: #e0e0e0;
	}

	.sc-itinerary-ports-table tbody tr:hover {
		background-color: #3a5a6d;
	}

	@media (max-width: 600px) {
		.sc-itinerary-ports-table tbody tr {
			background: #2a4a5d;
			border-color: #444;
		}

		.sc-itinerary-ports-table td::before {
			color: #66d9ff;
		}
	}
}
