/* Weekly Schedule Widget - default dark theme, override via Elementor Style tab */
.wsw-container {
	--wsw-bg: #0d0d0d;
	--wsw-header-color: #8a8a8a;
	--wsw-row-color: #f2f2f2;
	--wsw-accent: #ffffff;
	--wsw-border: rgba(255, 255, 255, 0.08);

	background-color: var(--wsw-bg);
	color: var(--wsw-row-color);
	padding: 24px;
	border-radius: 8px;
	box-sizing: border-box;
	width: 100%;
	overflow: hidden;
}

.wsw-container *,
.wsw-container *::before,
.wsw-container *::after {
	box-sizing: border-box;
}

/* Tabs */
.wsw-tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 28px;
	border-bottom: 1px solid var(--wsw-border);
	margin: 0 0 20px;
	padding: 0 0 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.wsw-tabs::-webkit-scrollbar {
	height: 4px;
}

.wsw-tab {
	background: none;
	border: none;
	margin: 0;
	color: var(--wsw-header-color);
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 0 0 12px;
	cursor: pointer;
	white-space: nowrap;
	position: relative;
	transition: color 0.2s ease;
	flex: 0 0 auto;
}

.wsw-tab:hover {
	color: var(--wsw-row-color);
}

.wsw-tab.wsw-tab-active {
	color: var(--wsw-accent);
}

.wsw-tab.wsw-tab-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background-color: var(--wsw-accent);
}

/* Panels */
.wsw-panel {
	display: none;
}

.wsw-panel.wsw-panel-active {
	display: block;
}

.wsw-empty {
	padding: 20px 0;
	color: var(--wsw-header-color);
	font-size: 14px;
	margin: 0;
}

.wsw-editor-notice {
	padding: 16px;
	border: 1px dashed var(--wsw-border, #ccc);
	color: #a24040;
	font-size: 13px;
}

/* Table */
.wsw-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wsw-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
}

.wsw-table thead th {
	text-align: left;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.5px;
	font-weight: 700;
	color: var(--wsw-header-color);
	padding: 12px 16px;
	border-bottom: 1px solid var(--wsw-border);
	white-space: nowrap;
}

.wsw-table tbody td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--wsw-border);
	font-size: 14px;
	color: var(--wsw-row-color);
	vertical-align: middle;
}

.wsw-table tbody tr:last-child td {
	border-bottom: none;
}

.wsw-table tbody tr:hover {
	background-color: rgba(255, 255, 255, 0.03);
}

.wsw-align-left {
	text-align: left;
}

.wsw-align-center {
	text-align: center;
}

.wsw-align-right {
	text-align: right;
}

.wsw-swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	margin-right: 8px;
	vertical-align: middle;
	flex: 0 0 auto;
}

.wsw-cell-text {
	vertical-align: middle;
	font-weight: 700;
}

/* Sticky first column (e.g. "Jour"/time): stays pinned to the left while
   the rest of the table scrolls horizontally, on every screen size. */
.wsw-table th:first-child,
.wsw-table td:first-child {
	position: sticky;
	left: 0;
	background-color: var(--wsw-bg);
	box-shadow: 1px 0 0 var(--wsw-border);
	white-space: nowrap;
}

.wsw-table thead th:first-child {
	z-index: 3;
}

.wsw-table tbody td:first-child {
	z-index: 2;
}

.wsw-table tbody tr:hover td:first-child {
	background-color: var(--wsw-bg);
}

/* Loading state for a tab whose table is being fetched via AJAX */
.wsw-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 0;
}

.wsw-spinner {
	width: 22px;
	height: 22px;
	border: 2px solid var(--wsw-border);
	border-top-color: var(--wsw-accent);
	border-radius: 50%;
	animation: wsw-spin 0.7s linear infinite;
}

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

/* Tablet */
@media (max-width: 1024px) {
	.wsw-container {
		padding: 20px;
	}
}

/* Mobile: same horizontally-scrollable table, just tighter spacing */
@media (max-width: 767px) {
	.wsw-container {
		padding: 16px;
		border-radius: 6px;
	}

	.wsw-tabs {
		gap: 18px;
		margin-bottom: 16px;
	}

	.wsw-tab {
		font-size: 12px;
	}

	.wsw-table thead th,
	.wsw-table tbody td {
		padding: 12px;
		font-size: 13px;
	}
}
