.timeline-container {
	padding: 20px;

	.loading-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 40px;

		.loading-text {
			margin-top: 15px;
			color: #666;
		}
	}

	.no-data {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 60px;
		color: #999;

		mat-icon {
			font-size: 48px;
			width: 48px;
			height: 48px;
			margin-bottom: 15px;
		}

		span {
			font-size: 16px;
		}
	}

	.resumen {
		margin-bottom: 20px;
		padding: 15px;
		background-color: #f5f5f5;
		border-radius: 4px;

		.resumen-text {
			color: #333;
			font-size: 14px;
		}
	}

	.timeline-wrapper {
		background: #fff;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		overflow: hidden;
	}

	.timeline-header {
		display: flex;
		background: #5867dd;
		color: white;
		padding: 12px 0;
		border-bottom: 2px solid #4a5bcf;

		.operador-label-header {
			width: 180px;
			min-width: 180px;
			padding: 0 15px;
			font-weight: 600;
			font-size: 14px;
			display: flex;
			align-items: center;
		}

		.horas-container {
			flex: 1;
			display: flex;
			position: relative;

			.hora-mark {
				flex: 1;
				text-align: center;
				font-size: 12px;
				font-weight: 500;

				span {
					background: rgba(255,255,255,0.2);
					padding: 2px 6px;
					border-radius: 3px;
				}
			}
		}
	}

	.timeline-body {
		.timeline-row {
			display: flex;
			border-bottom: 1px solid #eee;
			min-height: 60px;

			&:last-child {
				border-bottom: none;
			}

			&:hover {
				background-color: #f9f9f9;
			}

			.operador-label {
				width: 180px;
				min-width: 180px;
				padding: 10px 15px;
				display: flex;
				align-items: center;
				background: #fafafa;
				border-right: 1px solid #eee;

				mat-icon {
					font-size: 20px;
					width: 20px;
					height: 20px;
					margin-right: 8px;
					color: #5867dd;
				}

				span {
					font-size: 13px;
					font-weight: 500;
					color: #333;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}
			}

			.timeline-track {
				flex: 1;
				position: relative;
				padding: 8px 0;

				.hora-line {
					position: absolute;
					top: 0;
					bottom: 0;
					width: 1px;
					background: #eee;
				}

				.servicio-block {
					position: absolute;
					top: 8px;
					bottom: 8px;
					border-radius: 4px;
					padding: 4px 8px;
					cursor: pointer;
					overflow: hidden;
					transition: transform 0.2s, box-shadow 0.2s;
					box-shadow: 0 1px 3px rgba(0,0,0,0.2);

					&:hover {
						transform: translateY(-2px);
						box-shadow: 0 4px 8px rgba(0,0,0,0.3);
						z-index: 10;
					}

					.servicio-content {
						display: flex;
						flex-direction: column;
						height: 100%;
						justify-content: center;
						color: white;

						.cliente-nombre {
							font-size: 11px;
							font-weight: 600;
							white-space: nowrap;
							overflow: hidden;
							text-overflow: ellipsis;
						}

						.servicio-hora {
							font-size: 10px;
							opacity: 0.9;
						}
					}
				}
			}
		}
	}

	.timeline-legend {
		display: flex;
		flex-wrap: wrap;
		gap: 15px;
		padding: 15px;
		background: #fafafa;
		border-top: 1px solid #eee;

		.legend-item {
			display: flex;
			align-items: center;

			.legend-color {
				width: 16px;
				height: 16px;
				border-radius: 3px;
				margin-right: 6px;
			}

			.legend-text {
				font-size: 12px;
				color: #666;
			}
		}
	}
}

@media (max-width: 768px) {
	.timeline-container {
		.timeline-header {
			.operador-label-header {
				width: 100px;
				min-width: 100px;
				font-size: 12px;
			}

			.horas-container .hora-mark {
				font-size: 10px;
			}
		}

		.timeline-body .timeline-row {
			.operador-label {
				width: 100px;
				min-width: 100px;

				span {
					font-size: 11px;
				}
			}

			.timeline-track .servicio-block .servicio-content {
				.cliente-nombre {
					font-size: 9px;
				}
				.servicio-hora {
					font-size: 8px;
				}
			}
		}
	}
}
