/* /itinerary/css/tables.css */

.table-responsive {
	display: block; width: 100%;
	overflow-x: auto; -webkit-overflow-scrolling: touch;
	margin-bottom: 1.5em;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	background-color: var(--content-bg-color); /* Background for the container */
}

.table-responsive > table { /* Base table style within wrapper */
	margin-bottom: 0; border: none; border-collapse: collapse;
	background-color: transparent; /* Let container handle background */
	width: 100%; font-size: 0.95em;
}

.table-responsive > table th,
.table-responsive > table td {
	border: 1px solid var(--border-light-color);
	padding: 10px 12px;
	vertical-align: middle;
	white-space: nowrap; /* Default to nowrap */
}

.table-responsive > table thead th {
	background-color: #f8f9fa; font-weight: 500;
	border-bottom: 2px solid var(--border-color);
	position: sticky; top: 0; z-index: 1; /* Sticky header */
}

/* Custom Itinerary Table Specifics */
.custom-itinerary-table { /* Inherits base styles */
	font-size: 0.9em; /* Adjust font size */
}

.custom-itinerary-table th,
.custom-itinerary-table td {
	text-align: center; /* Default alignment */
}

.custom-itinerary-table thead th {
	/* Specific header styles if needed */
}

.custom-itinerary-table tbody tr {
	cursor: grab; transition: background-color 0.2s ease;
}
.custom-itinerary-table tbody tr:not(.sortable-chosen):not(.sortable-ghost) {
	cursor: pointer; /* Allow clicking for edit */
}
.custom-itinerary-table tbody tr:hover:not(.sortable-chosen):not(.sortable-ghost) {
	background-color: #f1f3f5; /* Hover effect */
}

/* Column Specific Styles */
.custom-itinerary-table th:nth-child(1), /* Select checkbox */
.custom-itinerary-table td:nth-child(1) {
	 width: 40px; cursor: default;
}
.custom-itinerary-table th:nth-child(5), /* Budget */
.custom-itinerary-table td:nth-child(5) {
	width: 10%;
}
.custom-itinerary-table th:nth-child(6), /* Currency */
.custom-itinerary-table td:nth-child(6) {
	width: 10%; text-align: center;
}
.custom-itinerary-table td:nth-child(4), /* Activity */
.custom-itinerary-table td:nth-child(7) { /* Notes */
	text-align: left; 
	white-space: normal; /* Allow wrapping */
	vertical-align: top; /* Align content to top */
	min-width: 150px;
}

.custom-itinerary-table td a { /* Links within activity */
	color: var(--primary-color); text-decoration: none; font-weight: 500;
}
.custom-itinerary-table td a:hover {
	text-decoration: underline; color: var(--hover-accent-color);
}

.custom-itinerary-table input[type="checkbox"] {
	vertical-align: middle; cursor: pointer;
}

/* Sortable Placeholders */
.custom-itinerary-table tbody tr.sortable-ghost {
	opacity: 0.4; background-color: var(--primary-light-color);
}
.custom-itinerary-table tbody tr.sortable-chosen {
	cursor: grabbing !important; background-color: #e9ecef;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Media Queries for Tables */
@media (max-width: 767px) {
	.table-responsive > table th,
	.table-responsive > table td {
		padding: 8px 10px;
		font-size: 0.9em;
	}
	.custom-itinerary-table { font-size: 0.85em; }

	.custom-itinerary-table td:nth-child(4), /* Activity */
	.custom-itinerary-table td:nth-child(7) { /* Notes */
		white-space: normal; vertical-align: top; min-width: 120px;
	}
}