.agenda-medica-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;
		}
	}

	.agenda-wrapper {
		overflow-x: auto;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		background: #fff;
	}

	.agenda-table {
		width: 100%;
		border-collapse: collapse;
		min-width: 600px;

		thead {
			tr {
				background: #5867dd;
			}

			th {
				padding: 15px 10px;
				text-align: center;
				color: white;
				font-weight: 600;
				font-size: 14px;
				border-right: 1px solid rgba(255,255,255,0.2);
				white-space: nowrap;

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

				mat-icon {
					font-size: 18px;
					width: 18px;
					height: 18px;
					vertical-align: middle;
					margin-right: 5px;
				}

				span {
					vertical-align: middle;
				}

				&.hora-header {
					width: 100px;
					min-width: 100px;
					background: #4a5bcf;
				}

				&.operador-header {
					min-width: 200px;

					mat-icon {
						display: block;
						margin: 0 auto 5px;
					}

					span {
						display: block;
						max-width: 150px;
						overflow: hidden;
						text-overflow: ellipsis;
						margin: 0 auto;
					}
				}
			}
		}

		tbody {
			.hora-row {
				&:nth-child(even) {
					background-color: #fafafa;
				}

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

			td {
				border: 1px solid #eee;
				vertical-align: top;
			}

			.hora-cell {
				padding: 10px;
				text-align: center;
				background: #f8f9fa;
				font-weight: 600;
				width: 100px;
				min-width: 100px;

				.hora-text {
					font-size: 13px;
					color: #5867dd;
				}
			}

			.servicio-cell {
				padding: 8px;
				min-height: 80px;
				transition: background-color 0.2s;

				&.celda-vacia {
					.disponible {
						display: block;
						text-align: center;
						color: #ccc;
						font-size: 11px;
						font-style: italic;
						padding: 20px 0;
					}
				}
			}

			.servicio-card {
				background: white;
				border-radius: 6px;
				padding: 10px;
				border-left: 4px solid;
				box-shadow: 0 2px 4px rgba(0,0,0,0.1);
				height: 100%;

				> div {
					display: flex;
					align-items: center;
					margin-bottom: 6px;

					&:last-child {
						margin-bottom: 0;
					}

					mat-icon {
						font-size: 14px;
						width: 14px;
						height: 14px;
						margin-right: 6px;
						color: #999;
					}
				}

				.servicio-hora {
					font-weight: 600;
					font-size: 13px;
					color: #333;
				}

				.servicio-cliente {
					font-size: 12px;
					color: #555;

					mat-icon {
						color: #5867dd;
					}
				}

				.servicio-duracion {
					font-size: 11px;
					color: #888;
				}

				.servicio-estatus {
					margin-top: 8px;

					.estatus-badge {
						display: inline-block;
						padding: 3px 8px;
						border-radius: 3px;
						color: white;
						font-size: 10px;
						font-weight: 600;
						text-transform: uppercase;
					}
				}
			}
		}
	}
}

// Responsive
@media (max-width: 992px) {
	.agenda-medica-container {
		.agenda-table {
			thead th {
				padding: 10px 5px;
				font-size: 12px;

				&.operador-header {
					min-width: 150px;

					span {
						max-width: 100px;
						font-size: 11px;
					}
				}
			}

			tbody {
				.hora-cell {
					padding: 8px 5px;

					.hora-text {
						font-size: 11px;
					}
				}

				.servicio-card {
					padding: 6px;

					> div {
						margin-bottom: 4px;

						mat-icon {
							font-size: 12px;
							width: 12px;
							height: 12px;
						}
					}

					.servicio-hora {
						font-size: 11px;
					}

					.servicio-cliente {
						font-size: 10px;
					}

					.servicio-duracion {
						font-size: 9px;
					}

					.servicio-estatus .estatus-badge {
						font-size: 8px;
						padding: 2px 5px;
					}
				}
			}
		}
	}
}

// Altura fija por hora para mejor visualización
.agenda-table tbody .servicio-cell {
	height: 90px;
}
