/* Ultima Hora Clasificados sobre Bootstrap 5.3 (sustituye a uhcl.css y calendario.css en la web publica) */
:root {
	--uh-rojo: #e60005;
	--uh-rojo-osc: #b80004;
	--uh-gris: #cecfca;
	--uh-gris-claro: #f3f3f1;
	--bs-primary: #e60005;
	--bs-primary-rgb: 230, 0, 5;
	--bs-link-color: #b80004;
	--bs-link-color-rgb: 184, 0, 4;
	--bs-link-hover-color: #e60005;
	--bs-link-hover-color-rgb: 230, 0, 5;
	--bs-body-font-family: Arial, Helvetica, sans-serif;
}

body { background: var(--uh-gris); min-height: 100vh; display: flex; flex-direction: column; }
.uh-hoja { background: #fff; flex: 1 0 auto; }

/* Botones */
.btn-primary {
	--bs-btn-bg: var(--uh-rojo); --bs-btn-border-color: var(--uh-rojo);
	--bs-btn-hover-bg: var(--uh-rojo-osc); --bs-btn-hover-border-color: var(--uh-rojo-osc);
	--bs-btn-active-bg: var(--uh-rojo-osc); --bs-btn-active-border-color: var(--uh-rojo-osc);
	--bs-btn-disabled-bg: var(--uh-rojo); --bs-btn-disabled-border-color: var(--uh-rojo);
	--bs-btn-focus-shadow-rgb: 230, 0, 5;
	font-weight: bold;
}
.btn-outline-primary {
	--bs-btn-color: var(--uh-rojo); --bs-btn-border-color: var(--uh-rojo);
	--bs-btn-hover-bg: var(--uh-rojo); --bs-btn-hover-border-color: var(--uh-rojo);
	--bs-btn-active-bg: var(--uh-rojo-osc); --bs-btn-active-border-color: var(--uh-rojo-osc);
	--bs-btn-focus-shadow-rgb: 230, 0, 5;
}
.form-check-input:checked { background-color: var(--uh-rojo); border-color: var(--uh-rojo); }
.form-check-input:focus, .form-control:focus, .form-select:focus { border-color: #f08080; box-shadow: 0 0 0 .25rem rgba(230, 0, 5, .2); }

/* Cabecera: logo sobre rojo y, en pantallas anchas, la imagen de anuncios a la derecha */
.uh-cabecera { background: var(--uh-rojo); }
@media (min-width: 768px) { .uh-cabecera { background: var(--uh-rojo) url("/images/cab_3.gif") no-repeat right top; } }
.uh-logo img { display: block; max-width: 100%; height: auto; }

/* Titulo del paso */
.uh-titulo { border-bottom: 4px solid var(--uh-rojo); }
.uh-titulo h1 { font-size: 1.35rem; font-weight: bold; margin: 0; }
@media (min-width: 992px) { .uh-titulo h1 { font-size: 1.6rem; } }
.uh-eleccion { font-size: .875rem; color: #555; }
.uh-eleccion strong { color: #000; text-transform: uppercase; }

/* Indicador de pasos */
.uh-pasos { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.uh-pasos li { flex: 1 1 0; text-align: center; font-size: .75rem; line-height: 1.2; color: #888; }
.uh-pasos .uh-num {
	display: flex; align-items: center; justify-content: center; margin: 0 auto .25rem;
	width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 2px solid #bbb;
	background: #fff; color: #888; font-weight: bold; font-size: 1rem; text-decoration: none;
}
.uh-pasos a.uh-num { border-color: var(--uh-rojo); color: var(--uh-rojo); }
.uh-pasos a.uh-num:hover, .uh-pasos a.uh-num:focus { background: var(--uh-rojo); color: #fff; }
.uh-pasos .actual .uh-num { background: var(--uh-rojo); border-color: var(--uh-rojo); color: #fff; }
.uh-pasos .actual { color: #000; font-weight: bold; }
.uh-pasos .hecho { color: #333; }
.uh-progreso { height: .5rem; }
.uh-progreso .progress-bar { background: var(--uh-rojo); }

/* Columna de ayuda */
.uh-ayuda { background: var(--uh-gris-claro); font-size: .875rem; }
.uh-ayuda h2 { font-size: 1rem; font-weight: bold; color: var(--uh-rojo); }
.uh-ayuda p { margin-bottom: .6rem; }

/* Barra inferior de navegacion: fija abajo en movil */
.uh-nav { background: var(--uh-gris-claro); border-top: 1px solid #ddd; }
@media (max-width: 991.98px) {
	.uh-nav { position: sticky; bottom: 0; z-index: 1020; box-shadow: 0 -2px 6px rgba(0,0,0,.08); }
}
.uh-nav .btn { min-width: 8rem; white-space: nowrap; }
@media (max-width: 400px) { .uh-nav .btn { min-width: 6.5rem; } }

/* Portada: los 8 pasos */
.uh-portada-pasos { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; gap: .6rem; }
@media (min-width: 576px) { .uh-portada-pasos { grid-template-columns: repeat(4, 1fr); } }
.uh-portada-pasos > * {
	background: #e6e6e3; color: #555; font-weight: bold; border: 0; border-radius: .4rem; text-align: left;
	padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; gap: .75rem;
	font-size: 1.05rem; line-height: 1.25; min-height: 8.5rem;
}
@media (min-width: 576px) { .uh-portada-pasos > * { min-height: 10rem; font-size: 1.15rem; } }
.uh-portada-pasos .num { font-size: 2.5rem; line-height: 1; color: #aaa; }
@media (min-width: 576px) { .uh-portada-pasos .num { font-size: 3rem; } }
/* El 1 empieza el proceso: rojo y con un pulso que invita a pulsarlo */
.uh-portada-pasos > .primero {
	background: var(--uh-rojo); color: #fff; cursor: pointer;
	animation: uh-pulso 2s ease-out infinite; transition: background .15s, transform .15s;
}
.uh-portada-pasos > .primero .num { color: #fff; }
.uh-portada-pasos > .primero:hover, .uh-portada-pasos > .primero:focus-visible { background: var(--uh-rojo-osc); transform: translateY(-2px); }
@keyframes uh-pulso {
	0%   { box-shadow: 0 0 0 0 rgba(230, 0, 5, .55); }
	70%  { box-shadow: 0 0 0 .6rem rgba(230, 0, 5, 0); }
	100% { box-shadow: 0 0 0 0 rgba(230, 0, 5, 0); }
}
@media (prefers-reduced-motion: reduce) { .uh-portada-pasos > .primero { animation: none; } }

/* Categorias (paso 1) */
.uh-categoria { text-align: left; border: 1px solid #ddd; border-radius: .5rem; background: #fff; width: 100%; height: 100%; padding: 1rem; display: flex; gap: 1rem; align-items: center; color: inherit; }
.uh-categoria:hover, .uh-categoria:focus { border-color: var(--uh-rojo); box-shadow: 0 0 0 .2rem rgba(230,0,5,.15); }
.uh-categoria.activa { border-color: var(--uh-rojo); border-width: 2px; }
.uh-categoria img { flex: 0 0 auto; width: 59px; height: 59px; object-fit: contain; }
.uh-categoria .tit { font-weight: bold; font-size: 1.05rem; display: block; }
.uh-categoria .txt { font-size: .85rem; color: #555; }

/* Secciones (paso 2): opciones grandes */
.uh-secciones .list-group-item { padding: .75rem 1rem; cursor: pointer; }
.uh-secciones .list-group-item:has(input:checked) { background: #fff0f0; }

/* Resumen del anuncio */
.uh-resumen th { width: 9rem; color: #555; font-weight: normal; }
@media (max-width: 575.98px) { .uh-resumen th { width: 6.5rem; } }
.uh-resumen td { word-break: break-word; }
.uh-total { font-size: 1.25rem; font-weight: bold; color: var(--uh-rojo); }

/* Calendario (paso 4): la tabla la genera js/drawCalendar.js; aqui solo se adapta al dedo */
#lCalendar { border: 1px solid #ccc; border-radius: .5rem; overflow: hidden; background: #fff; }
#lCalendar table { width: 100%; border-collapse: separate; border-spacing: 3px; }
#lCalendar tr.head td { font-weight: bold; text-align: center; padding: .4rem 0; font-size: 1rem; }
#lCalendar tr.head td.nav { width: 3rem; }
#lCalendar tr.head td.nav a { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border-radius: 50%; }
#lCalendar tr.head td.nav a:hover { background: var(--uh-gris-claro); }
#lCalendar .calLatSpacer, #lCalendar td[width="10"] { display: none; }
#lCalendar .dayNamesRow { text-align: center; font-size: .75rem; color: #666; padding-bottom: .2rem; }
#lCalendar table.mainTable td {
	height: 2.75rem; text-align: center; vertical-align: middle; font-size: 1rem;
	border-radius: .35rem; border: 1px solid transparent; user-select: none;
}
#lCalendar .diaDis { background: #f2f2f2; color: #bbb; }
#lCalendar .diaEmpty { background: transparent; }
#lCalendar .diaOFF { background: #f9e4dc; cursor: pointer; }
#lCalendar .diaFinOFF { background: #f9e7b5; cursor: pointer; }
#lCalendar .diaON { background: var(--uh-rojo); color: #fff; font-weight: bold; cursor: pointer; }
#lCalendar .diaFinON { background: #f39200; color: #fff; font-weight: bold; cursor: pointer; }
#lCalendar .diaOFF:hover, #lCalendar .diaFinOFF:hover { border-color: #999; }
#lCalendar .calPieSep { height: .25rem; }
.uh-leyenda span { display: inline-block; width: 1rem; height: 1rem; border-radius: .2rem; vertical-align: -.15rem; margin-right: .25rem; }
#listaDias .weekendDay { font-weight: bold; color: var(--uh-rojo); }
#listaDiasClean { visibility: hidden; }

/* Paso 3: texto */
#txtIntro { min-height: 9rem; }
.uh-contador { font-size: 1.1rem; }

/* Mensajes */
.uh-pie { background: var(--uh-gris); padding: 1rem 0 1.25rem; text-align: center; font-size: .875rem; }
.uh-pie a { color: #000; }
.uh-empresa { color: var(--uh-rojo); text-transform: uppercase; font-weight: bold; }
.uh-telefono { font-weight: bold; text-decoration: none; }

/* 404 */
.uh-404 { font-size: 4.5rem; line-height: 1; color: var(--uh-rojo); font-weight: bold; }

/* resumenEconomico() (uhcl.inc.php) en el paso 4: tabla antigua, se actualiza desde printDayList() */
.resTable { width: 100%; font-size: .875rem; border-top: 1px solid #ddd; }
.resTable td { padding: .35rem .5rem .35rem 0; vertical-align: top; border-bottom: 1px solid #eee; }
.resEcTitulo, .resEcTituloTotal { color: #555; width: 6rem; }
.resEcIVA { color: #555; }
.resEcTotal { display: block; font-size: 1.25rem; font-weight: bold; color: var(--uh-rojo); }
.uh-resumen td.uh-total { color: var(--uh-rojo); }
#uhAviso .modal-body h3 { font-size: 1.1rem; font-weight: bold; margin-top: 1rem; }

/* Paso 4: presupuesto, con laborables y fines de semana en los colores del calendario */
.uh-linea { border-left: 5px solid; border-radius: .25rem; padding: .5rem .75rem; margin-bottom: .6rem; }
.uh-lab { border-color: var(--uh-rojo); background: #fdf1ed; }
.uh-fin { border-color: #f39200; background: #fdf5e0; }
.uh-linea.vacia { opacity: .6; }
.uh-concepto { font-weight: bold; font-size: 1.05rem; }
.uh-marca { display: inline-block; width: .8rem; height: .8rem; border-radius: .2rem; margin-right: .4rem; vertical-align: .05rem; }
.uh-lab .uh-marca { background: var(--uh-rojo); }
.uh-fin .uh-marca { background: #f39200; }
.uh-subtotal { font-weight: bold; font-size: 1.1rem; white-space: nowrap; }
.uh-detalle { font-size: .85rem; color: #555; }
.uh-fechas { font-size: .8rem; color: #333; margin-top: .15rem; }
.uh-base { font-size: 1.05rem; color: #555; }
.uh-base strong { color: #000; }
.uh-presupuesto-total { border-top: 2px solid var(--uh-rojo); margin-top: .5rem; padding-top: .6rem; font-size: 1.15rem; font-weight: bold; }
#resEcTotal { font-size: 2rem; color: var(--uh-rojo); white-space: nowrap; }
@media (min-width: 768px) { .uh-presupuesto { position: sticky; top: 1rem; } }
.uh-leyenda span + span { margin-left: 0; border-radius: 0 .2rem .2rem 0; }

/* Paso 7: condiciones a todo el ancho, en columnas */
@media (min-width: 992px) {
	.uh-condiciones #ayudaTexto { column-count: 2; column-gap: 2rem; }
	.uh-condiciones #ayudaTexto h2 { column-span: all; }
	.uh-condiciones #ayudaTexto p { break-inside: avoid; }
}
@media (min-width: 1200px) { .uh-condiciones #ayudaTexto { column-count: 3; } }

/* Portada: logotipos de las tarjetas, sin fondo */
.uh-tarjetas { display: inline-flex; align-items: center; gap: .9rem; vertical-align: middle; margin-left: .75rem; }
