/* Trex OTT Channels Widget Styles */

.trex-ott-widget {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: #f8f9fa;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.trex-ott-container {
	display: flex;
	height: 100%;
	gap: 0;
}

.trex-ott-sidebar {
	width: 30%;
	background: #ffffff;
	border-right: 1px solid #e0e0e0;
	overflow-y: auto;
	padding: 16px;
	box-sizing: border-box;
}

.trex-ott-main {
	width: 70%;
	background: #ffffff;
	overflow-y: auto;
	padding: 24px;
	box-sizing: border-box;
}

/* Search Input */
.trex-ott-search {
	position: relative;
	margin-bottom: 16px;
}

.trex-ott-search input {
	width: 100%;
	padding: 10px 12px 10px 36px;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	font-size: 14px;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
}

.trex-ott-search input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.trex-ott-search::before {
	content: "🔍";
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	opacity: 0.5;
}

/* Group List */
.trex-ott-groups-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.trex-ott-group-item {
	padding: 12px;
	margin-bottom: 8px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	background: #ffffff;
}

.trex-ott-group-item:hover {
	border-color: #0073aa;
	background: #f0f7ff;
}

.trex-ott-group-item.active {
	background: #0073aa;
	color: #ffffff;
	border-color: #0073aa;
}

.trex-ott-group-name {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
}

.trex-ott-group-count {
	font-size: 12px;
	opacity: 0.7;
}

/* Channels List */
.trex-ott-channels-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.trex-ott-channel-item {
	padding: 12px;
	margin-bottom: 8px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #f8f9fa;
	transition: all 0.3s ease;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.trex-ott-channel-item:hover {
	border-color: #0073aa;
	background: #f0f7ff;
}

.trex-ott-channel-name {
	font-weight: 500;
	font-size: 14px;
	flex: 1;
}

.trex-ott-favorite-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 18px;
	padding: 4px 8px;
	transition: transform 0.2s ease;
}

.trex-ott-favorite-btn:hover {
	transform: scale(1.2);
}

.trex-ott-favorite-btn.active {
	color: #ff6b6b;
}

/* Empty State */
.trex-ott-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

.trex-ott-empty-state-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.trex-ott-empty-state-text {
	font-size: 14px;
	line-height: 1.6;
}

/* Loading State */
.trex-ott-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #666;
}

.trex-ott-spinner {
	border: 3px solid #f0f0f0;
	border-top: 3px solid #0073aa;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	animation: spin 1s linear infinite;
	margin-right: 12px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
	.trex-ott-container {
		flex-direction: column;
	}

	.trex-ott-sidebar {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid #e0e0e0;
		max-height: 300px;
	}

	.trex-ott-main {
		width: 100%;
		padding: 16px;
	}

	.trex-ott-group-item {
		padding: 10px;
		margin-bottom: 6px;
	}

	.trex-ott-channel-item {
		padding: 10px;
		margin-bottom: 6px;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.trex-ott-widget {
		background: #1e1e1e;
	}

	.trex-ott-sidebar,
	.trex-ott-main {
		background: #2d2d2d;
		color: #e0e0e0;
	}

	.trex-ott-group-item,
	.trex-ott-channel-item {
		background: #3a3a3a;
		border-color: #4a4a4a;
		color: #e0e0e0;
	}

	.trex-ott-group-item:hover,
	.trex-ott-channel-item:hover {
		background: #4a4a4a;
		border-color: #0073aa;
	}

	.trex-ott-search input {
		background: #3a3a3a;
		border-color: #4a4a4a;
		color: #e0e0e0;
	}

	.trex-ott-search input:focus {
		border-color: #0073aa;
	}
}

/* Accessibility */
.trex-ott-group-item:focus,
.trex-ott-channel-item:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Print Styles */
@media print {
	.trex-ott-search,
	.trex-ott-favorite-btn {
		display: none;
	}
}
