/* ============================================================ VARIABLES DE COLOR ============================================================ */
:root {
	--primary-color: #005689;
	--primary-2-color: #0078aa;
	--primary-3-color: #1f3a5f;
	--secondary-color: #ed9b00;
	--secondary-2-color: #FFC000;
	--third-color: #ff6f00;
	--gray: #767676;
	--down-gray: #ebebeb;
	--color-black: #000000;
	--color-white: #ffffff;

	/* Turnos OAT Colors 
	--turno-oat-1: #d9ead3;
	--turno-oat-2: #fce5cd;
	--turno-oat-3: #f9cb9c;
	--turno-oat-4: #ead1dc;
	--turno-oat-5: #c6e0f5;
	--turno-oat-6: #f4cccc;
	--no-turno: #e6e6e6;
	*/
}

/* ============================================================ BASE ============================================================ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--down-gray);
	font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

main {
	width: 95%;
	margin: 20px auto;
	display: flex;
	flex-direction: column;
	gap: 20px; /* se toma el valor mayor */
}

button {
	background-color: var(--primary-2-color);
	color: var(--color-white);
	padding: 0.6rem 1rem;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.3s;
	width: fit-content;
}

/* ============================================================ BOTÓN VOLVER ============================================================ */

.btn-volver {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 16px;
    min-width: 140px;
    min-height: 50px;

    font-size: 16px;
    font-weight: 600;

    border-radius: 12px;
}

.btn-volver i {
    font-size: 24px;
    line-height: 1;
}
.btn-volver span {
    display: flex;
    align-items: center;
}

/* ============================================================ BOTONES SUPERIORES ============================================================ */

.botones-superiores button,
#mes-anterior,
#mes-siguiente {
	background-color: var(--primary-2-color);
	color: var(--color-white);
	border: none;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: 0.3s;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
	display: flex;
	align-items: center;
	gap: 6px;
}

#mes-anterior:hover,
#mes-siguiente:hover {
	background-color: var(--secondary-color);
}

#mes-anterior:active,
#mes-siguiente:active {
	transform: scale(0.97);
}

/* Acomodarlos en línea */

.botones-mes {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-bottom: 15px;
}

.nav-meses {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.nav-meses h2{
	background-color: var(--primary-color);
	color: var(--color-white);
	text-align: center;
	padding: 15px;
	/* border-radius: 8px 8px 0 0; */
}

/* ============================================================ LOGO ============================================================ */

.logo {
	width: 220px; /* valor intermedio entre ambos */
	display: block;
	margin: 0 auto 15px auto;
}

/* ============================================================ CONTENEDORES GENERALES DE SECCIONES ============================================================ */

.horario-mantenimiento-container,
.dias_especiales-container,
.horario-general-container,
.tabla-programacion-container {
	background-color: var(--color-white);
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.tabla-programacion-container {
	overflow-x: auto;
}

.horario-mantenimiento-container h2,
.dias_especiales-container h2,
.horario-general-container h2,
.tabla-programacion-container h2 {
	background-color: var(--primary-color);
	color: var(--color-white);
	padding: 15px;
	border-radius: 12px 12px 0 0;
	margin: -20px -20px 20px -20px;
	text-align: center;
	font-size: 18px;
}

/* ============================================================ TABLAS GENERALES (NO CALENDARIO) ============================================================ */
.horario-mantenimiento-container table,
.dias_especiales-container table,
.horario-general-container table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.horario-mantenimiento-container thead,
.horario-general-container thead {
	background-color: var(--primary-2-color);
	color: var(--color-white);
}

.horario-mantenimiento-container th,
.horario-mantenimiento-container td,
.dias_especiales-container td,
.horario-general-container th,
.horario-general-container td {
	padding: 10px;
	border: 1px solid var(--down-gray);
	text-align: center;
}

.horario-mantenimiento-container tbody tr:nth-child(even),
.horario-general-container tbody tr:nth-child(even) {
	background-color: #f2f6f9;
}

.horario-mantenimiento-container tbody tr:hover,
.horario-general-container tbody tr:hover {
	background-color: #dbeef9;
}

.th-semana {
	background-color: var(--primary-3-color);
	color: #fff;
	font-weight: bold;
	text-align: center;
}

.dia-domingo,
.celda-turno.dia-domingo {
	background-color: var(--third-color);
}

.dia-festivo,
.celda-turno.dia-festivo {
	background-color: var(--primary-color);
}

.fuera-mes {
	background-color: #e6e6e6;
	color: #999;
}

.celda-turno select {
	width: 100%;
	background: transparent;
	border: none;
	text-align: center;
	font-weight: bold;
}

.selector-turno {
	background-color: transparent;
	border: none;
	width: 100%;
	height: 100%;
	padding: 4px;
	font-weight: bold;
	cursor: pointer;
}

/* 
.horario-procesos_apoyo-container table tr:nth-child(1) td:nth-child(1){
	background-color: var(--turno-oat-1);
}

.horario-procesos_apoyo-container table tr:nth-child(2) td:nth-child(1){
	background-color: var(--turno-oat-2);
}

.horario-procesos_apoyo-container table tr:nth-child(3) td:nth-child(1){
	background-color: var(--turno-oat-3);
}

.horario-procesos_apoyo-container table tr:nth-child(4) td:nth-child(1){
	background-color: var(--turno-oat-4);
}

.horario-procesos_apoyo-container table tr:nth-child(5) td:nth-child(1){
	background-color: var(--turno-oat-5);
}

.horario-procesos_apoyo-container table tr:nth-child(6) td:nth-child(1){
	background-color: var(--no-turno);
} */

/* ============================================================ DÍAS ESPECIALES - ESTILO ESPECIAL ============================================================ */

.dias_especiales-container table td {
	font-weight: 600;
}

.dias_especiales-container table tr:nth-child(1) td {
	background-color: var(--primary-2-color);
	color: var(--color-white);
}

.dias_especiales-container table tr:nth-child(1) td:first-child {
	background-color: var(--third-color);
}

.dias_especiales-container table tr:first-child td:nth-child(2) {
	background-color: var(--secondary-2-color);
}


.dias_especiales-container table tr:nth-child(2) td {
	background-color: #f2f6f9;
}

.dia-domingo {
	background-color: var(--third-color) !important;
	color: var(--color-white);
}

.dia-festivo {
	background-color: var(--secondary-2-color) !important;
	color: var(--color-white);
}
/*=========================================================== TABLA DINÁMICA DE PROGRAMACIÓN ============================================================ */

.tabla-programacion {
	width: max-content;
	min-width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}


.tabla-programacion thead {
	background-color: var(--primary-2-color);
	color: var(--color-white);
}

.tabla-programacion th,
.tabla-programacion td {
	border: 1px solid var(--down-gray);
	padding: 8px 6px;
	text-align: center;
	white-space: nowrap;
}

.tabla-programacion tbody tr:nth-child(even) {
	background-color: #f2f6f9;
}

.tabla-programacion tbody tr:hover {
	background-color: #dbeef9;
}

/* COLUMNAS DE DÍAS */
.dia-semana {
	font-weight: bold;
	font-size: 14px;
}

.num-dia {
	font-size: 13px;
	margin-top: 2px;
}

.selector-turno:focus {
	outline: none;
	background-color: transparent;
}

.selector-turno option {
	background-color: #ffffff;
	color: #000000;
}

.selector-turno option[value="VC"],
.selector-turno option[value="IN"] {
	color: var(--color-white);
	background-color: var(--primary-2-color);
	font-weight: 600;
}

.selector-turno {
	width: 55px;
	padding: 4px 6px;
	border: 1px solid var(--down-gray);
	border-radius: 6px;
	font-weight: bold;
	cursor: pointer;
	background-color: white;
	transition: background-color 0.2s ease-in-out;
}

.selector-turno:disabled {
	background-color: var(--no-turno);
	color: var(--gray);
	cursor: not-allowed;
}

/* COLORES POR TURNO */
.selector-turno option[value="T1"] { background-color: var(--turno-oat-1); }
.selector-turno option[value="T2"] { background-color: var(--turno-oat-2); }
.selector-turno option[value="T3"] { background-color: var(--turno-oat-3); }
.selector-turno option[value="T4"] { background-color: var(--turno-oat-4); }
.selector-turno option[value="S"]  { background-color: var(--turno-oat-5); }
.selector-turno option[value="L"]  { background-color: var(--no-turno); }
/* VC e IN manejados por el selector anterior */

/* COLUMNA HORAS MES */
.horas-mes {
	font-weight: bold;
	background-color: #fff7e6;
	color: #333;
}

/* ============================================================ RESPONSIVE ============================================================ */
@media (max-width: 1024px) {
	.logo {
		width: 200px;
	}

	table th,
	table td,
	.tabla-programacion th,
	.tabla-programacion td {
		font-size: 13px !important;
		padding: 6px !important;
	}
}

@media (max-width: 768px) {
	main {
		width: 98%;
	}

	.logo {
		width: 190px;
	}

	table,
	.tabla-programacion {
		font-size: 13px;
	}

	.tabla-programacion-container {
		padding: 10px;
	}
}

@media (max-width: 600px) {
	main > button,
	.botones-superiores button {
		width: 100%;
		text-align: center;
	}

	.botones-superiores {
		flex-direction: column;
		gap: 10px;
	}

	.logo {
		width: 170px;
	}

	h2 {
		font-size: 15px !important;
	}

	table th,
	table td,
	.tabla-programacion th,
	.tabla-programacion td {
		font-size: 12px !important;
		padding: 6px !important;
	}
}

@media (max-width: 480px) {
	.logo {
		width: 150px;
	}

	table,
	.tabla-programacion {
		font-size: 11px !important;
	}

	.tabla-programacion-container h2 {
		font-size: 15px;
	}
}