/* ==========================================================================
 * Tunutriplan · 1.33.0 · Hoy, Recetas y la ficha de receta (app del cliente)
 * Buzón #2008, #2009, #2011, #2013, #2015, #2016, #2018, #2019, #2004, #2020.
 * Hoja propia (la encola TNP_Hoy_Recetas) para no tocar las compartidas.
 * Solo variables de color del tema: el modo oscuro sale solo (html.oscuro
 * redefine --tnp-*). Lo que pisa a tnp-recetario.css (que se carga después,
 * al pie) lleva un selector más concreto.
 * ========================================================================== */

/* ---------- Hoy · cabecera (#2008) ---------- */
.app-top .app-top-hueco.tnp-con-fecha { font-weight: 400; }
.app-top .app-top-hueco.tnp-con-fecha b { font-weight: 600; }
.app-top .app-top-hueco.tnp-con-fecha.is-larga { font-size: 17px; }

/* ---------- Hoy · menos hueco arriba (#2011) ---------- */
/* El <p> vacío que deja el editor alrededor del shortcode sumaba 16 px. */
.app-main > p:empty, .app-main > p:not(:has(*)):has(+ .tnp-app-pantalla) { display: none; }
.app-main:has(> .tnp-app-hoy) { padding-top: 6px; }
.tnp-app-hoy .tnp-ag-cab.tnp-ag-cab-cli { margin-bottom: 0; }
.tnp-app-hoy .tnp-ag-cab-cli .tnp-ag-tira { padding-top: 8px; padding-bottom: 4px; }

/* ---------- Hoy · «Cómo lo ves» y total del día (#2009) ---------- */
.tnp-ag-vista-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin: 0 0 6px; }
.tnp-ag-resumen { margin: 0; min-width: 0; font-size: 12.5px; line-height: 1.3; color: var(--tnp-texto-suave); font-variant-numeric: tabular-nums; }
.tnp-ag-resumen[hidden] { display: none; }
.tnp-ag-vista-btn {
	flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 0 -6px 0 auto; padding: 0 6px;
	border: 0; border-radius: 8px; background: transparent; color: var(--tnp-texto-suave);
	font: 500 13px/1 var(--tnp-font); cursor: pointer; position: relative;
}
.tnp-ag-vista-btn::after { content: ""; position: absolute; inset: -6px -2px; } /* Más sitio para el dedo. */
.tnp-ag-vista-btn svg { width: 16px; height: 16px; }
.tnp-ag-vista-btn:hover, .tnp-ag-vista-btn:focus-visible { color: var(--tnp-verde); background: var(--tnp-menta); }
.tnp-ag-vista-btn:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 2px; }
.tnp-ag-a-vista { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--tnp-borde); }
.tnp-ag-a-vista .tnp-el-enlace { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; }
.tnp-ag-a-vista svg { width: 18px; height: 18px; }
.tnp-hoja-vista .tnp-seg-btn { white-space: nowrap; }
.tnp-ag-info-ayuda { margin: 6px 0 14px; }

/* Tiempo de la receta (y calorías si se pidieron) en cada tarjeta. */
.tnp-dc .tnp-dc-dato { font-size: 13px; color: var(--tnp-texto-suave); }
.tnp-dc .tnp-dc-macros { font-size: 12px; color: var(--tnp-texto-suave); line-height: 1.35; }

/* ---------- Hoy · fotos sin «cuadros verdes» (#2011) ---------- */
/* 1.34.0 (#2011): mientras carga, un fondo neutro de la marca (crema a arena; en
   oscuro, gris verdoso) con el cuenco muy suave, no un cuadro verde. Con el
   contenedor delante para ganar a oscuro.css, que lo pintaba de menta. */
.tnp-dc .tnp-dc-img, .tnp-comida-marco .tnp-comida-img, .tnp-comida-marco .tnp-comida-mini-img, .tnp-recetario .tnp-rc-foto, .tnp-hoja .tnp-cc-img { position: relative; background: linear-gradient(135deg, var(--tnp-crema) 0%, var(--tnp-borde) 160%); }
.tnp-dc-img::before, .tnp-comida-img::before, .tnp-comida-mini-img::before {
	content: ""; position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; background: var(--tnp-texto-suave); opacity: .16;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M3 11h18a9 9 0 0 1-18 0zM7 7c0-2 2-2 2-4M12 7c0-2 2-2 2-4M17 7c0-2 2-2 2-4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M3 11h18a9 9 0 0 1-18 0zM7 7c0-2 2-2 2-4M12 7c0-2 2-2 2-4M17 7c0-2 2-2 2-4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tnp-dc.is-ahora .tnp-dc-img::before { width: 48px; height: 48px; }
.tnp-dc-img img, .tnp-comida-img img, .tnp-comida-mini-img img { position: relative; }
.tnp-dc-img .tnp-recipe-card-noimg, .tnp-comida-img .tnp-recipe-card-noimg, .tnp-comida-mini-img .tnp-recipe-card-noimg { background: transparent; }
.tnp-agenda img.is-rota, .tnp-recetario img.is-rota { visibility: hidden; }

/* ---------- Hoy · aviso de la noche, más corto (#2008, #2011) ---------- */
.tnp-app-hoy .tnp-ag-noche { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 10px; padding: 10px 14px; }
.tnp-app-hoy .tnp-ag-noche-tit { margin: 0; font-size: 16px; }
.tnp-app-hoy .tnp-ag-noche-lista { flex: 1 0 100%; order: 2; margin: 4px 0 2px; }
.tnp-app-hoy .tnp-ag-noche .tnp-ag-dia-ir { min-height: 36px; padding: 4px 0; }

/* ---------- Ficha · ingredientes (#2013) ---------- */
.tnp-recipe-ingredients .tnp-ing-poco { color: var(--tnp-texto-suave); }

/* ---------- Modo cocina (#2016) ---------- */
.tnp-cocina .tnp-cocina-estado { display: flex; flex-wrap: wrap; gap: 0 10px; margin: 0; font-size: 13px; line-height: 1.35; color: var(--tnp-texto-suave); }
.tnp-cocina .tnp-cocina-estado .tnp-cocina-luz { margin: 0; }
.tnp-cocina .tnp-cocina-quedan:empty { display: none; }
.tnp-cocina button.tnp-cocina-reloj { border: 0; min-height: 44px; cursor: pointer; }
.tnp-cocina button.tnp-cocina-reloj:focus-visible { outline: 2px solid var(--tnp-texto); outline-offset: 2px; }
.tnp-cocina .tnp-cocina-texto { margin-bottom: 20px; }
.tnp-cocina .tnp-cocina-temp { margin: 0 0 20px; max-width: 100%; text-align: left; line-height: 1.2; }
.tnp-cocina .tnp-cocina-temp span { min-width: 0; }
/* Qué viene después: también da sentido a los pasos cortos, sin ingredientes. */
.tnp-cocina-luego { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--tnp-borde); font-size: 16px; line-height: 1.4; color: var(--tnp-texto-suave); }
.tnp-cocina-luego span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
/* Aviso de «¡Tiempo!» encima de los botones, se vea el paso que se vea. */
.tnp-cocina-fin-aviso {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none;
	width: calc(100% - 40px); max-width: 640px; margin: 0 auto 4px; padding: 12px 16px; border-radius: 14px;
	background: var(--tnp-ambar); color: #1F2A26; font-size: 16px; box-shadow: var(--tnp-sombra-elevada);
}
.tnp-cocina-fin-aviso[hidden] { display: none; }
.tnp-cocina-fin-aviso p { margin: 0; }
.tnp-cocina-fin-aviso .tnp-btn { flex: none; min-height: 44px; background: #1F2A26; color: #FAF6F0; }
/* Al terminar: «¿Te ha gustado?» con el bloque de gustos de la ficha. */
.tnp-cocina-final .tnp-cocina-sub { font-size: 17px; color: var(--tnp-texto); margin-bottom: 12px; }
.tnp-cocina-gusto .tnp-receta-gusto { margin: 0; padding: 0; background: transparent; }
.tnp-cocina-gusto .tnp-receta-gusto-tit { display: none; }
.tnp-cocina-gusto .tnp-gusto-btn { min-height: 52px; padding: 0 20px; font-size: 17px; }

/* ---------- Recetas · tarjetas sin «…» (#2020) ---------- */
/* 1.34.0 (#2020): el nombre entero. En el carrusel (unos 140 px en el móvil) los
   más largos ocupan 4 o 5 líneas; el tope de 6 es solo por si llega uno enorme. */
.tnp-recetario .tnp-rc-tit { -webkit-line-clamp: 6; line-clamp: 6; }
/* 1.40.0 (verifui): lo mismo en «Más recetas como esta» de la ficha (web y app), que
   cortaba a dos líneas («Caballa al horno sobre cama de patatas y…»). */
.tnp-rt-rejilla .tnp-rc-tit { -webkit-line-clamp: 6; line-clamp: 6; }
.tnp-rt-rejilla .tnp-rc-dato { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 1.35; }
.tnp-recetario .tnp-rc-dato { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 1.35; }

/* ---------- Recetas · «Personalizar» (#2004; 1.41.0, P53; 1.42.0, P73: el botón, solo con el dibujo, junto a «Ordenar y filtrar») ---------- */
.tnp-rt-mias-h { margin: 20px 0 4px; font: 600 12px/1.3 var(--tnp-font); letter-spacing: .06em; text-transform: uppercase; color: var(--tnp-texto-suave); }
.tnp-rt-mias-h:first-child { margin-top: 0; }
.tnp-rt-mias-ver li { min-height: 52px; }
.tnp-rt-mias-lista { list-style: none; margin: 0; padding: 0; }
.tnp-rt-mias-lista li { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 4px 0; border-top: 1px solid var(--tnp-borde); }
.tnp-rt-mias-lista li:first-child { border-top: 0; }
.tnp-rt-mias-tit { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; color: var(--tnp-texto); }
.tnp-rt-mias-lista li.is-off .tnp-rt-mias-tit { color: var(--tnp-texto-suave); text-decoration: line-through; text-decoration-color: var(--tnp-borde); }
.tnp-rt-mias-acc { flex: none; display: flex; align-items: center; gap: 2px; }
.tnp-rt-mias-acc .tnp-interruptor { margin-left: 6px; }
.tnp-rt-mias-flecha {
	width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--tnp-texto);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.tnp-rt-mias-flecha:hover:not(:disabled), .tnp-rt-mias-flecha:focus-visible { background: var(--tnp-menta); color: var(--tnp-verde); }
.tnp-rt-mias-flecha:disabled { opacity: .25; cursor: default; }
.tnp-rt-mias-fija { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--tnp-menta); color: var(--tnp-verde); font-size: 13px; font-weight: 600; }
.tnp-hoja-mias .tnp-hoja-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Puesto · Estantería: fila fija (#2004) ---------- */
.tnp-est-fija { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; color: var(--tnp-texto-suave); cursor: pointer; }
.tnp-est-fija input { margin: 0; accent-color: var(--tnp-verde); }

/* ==========================================================================
 * 1.34.0 · Rama A (app del cliente)
 * ========================================================================== */

/* ---------- Hoy · «Cambiar» no se queda remarcado (#2106) ---------- */
/* Al cerrar una hoja abierta con el dedo o el ratón, el foco vuelve al botón
   sin anillo (tnp-ficha.js le pone .tnp-sin-anillo hasta que se use el teclado). */
.tnp-sin-anillo:focus-visible { outline: none !important; box-shadow: none !important; }
.tnp-dc .tnp-dc-cambiar.tnp-sin-anillo:focus-visible { background: transparent; color: var(--tnp-texto-suave); }
/* En el móvil, «:hover» se queda pegado tras tocar: sin fondo si no hay ratón. */
@media (hover: none) {
	.tnp-dc .tnp-dc-cambiar:hover:not(:focus-visible) { background: transparent; color: var(--tnp-texto-suave); }
}
/* Con el teclado, el anillo va por dentro del botón: no se monta sobre la foto ni la tarjeta. */
.tnp-dc .tnp-dc-cambiar:focus-visible { outline-offset: -3px !important; }

/* ---------- Hoy · hoja «Cambiar la comida» (#2106, #2064) ---------- */
/* Arriba, lo justo. */
.tnp-hoja-cambiar .tnp-cc-ahora { margin-bottom: 10px; }
.tnp-hoja-cambiar .tnp-cc-sub { margin: 0 0 4px; font-size: 13px; }
.tnp-hoja-cambiar .tnp-cc-lista { margin-bottom: 12px; }
/* «Con lo que tengo en casa», bien a la vista (donde estaban los invitados). */
.tnp-cc-casa {
	display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin: 0; padding: 12px 12px 12px 14px;
	border: 0; border-radius: 16px; background: var(--tnp-menta); color: var(--tnp-texto); text-align: left; text-decoration: none;
	font: inherit; cursor: pointer; box-sizing: border-box;
}
.tnp-cc-casa:hover { color: var(--tnp-texto); box-shadow: inset 0 0 0 1px var(--tnp-verde); }
.tnp-cc-casa-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tnp-superficie); color: var(--tnp-verde); }
.tnp-cc-casa-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tnp-cc-casa-txt strong { font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--tnp-verde); }
.tnp-cc-casa-txt small { font-size: 13px; line-height: 1.35; color: var(--tnp-texto-suave); }
/* «Pregúntale a tu asistente», una fila más ligera. */
.tnp-hoja-cambiar .tnp-cc-duda { margin-top: 8px; min-height: 52px; }
.tnp-cc-duda-txt small { display: block; font-size: 13px; color: var(--tnp-texto-suave); }
/* Los invitados, al final y en una línea pequeña (funcionan igual). */
.tnp-hoja-cambiar .tnp-cc-gente { margin: 10px 0 0; padding: 4px 2px 0; border-radius: 0; background: transparent; gap: 10px; }
.tnp-hoja-cambiar .tnp-cc-gente-txt { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--tnp-texto-suave); }
.tnp-hoja-cambiar .tnp-cc-gente-txt svg { flex: none; }
.tnp-hoja-cambiar .tnp-cc-gente .tnp-stepper button { position: relative; background: var(--tnp-superficie); }
.tnp-hoja-cambiar .tnp-cc-gente .tnp-stepper button::after { content: ""; position: absolute; inset: -6px; } /* 44 px para el dedo. */
/* Abajo, solo «Buscar otra receta». */
.tnp-hoja-cambiar .tnp-hoja-pie .tnp-btn { flex: 1 1 auto; }

/* ---------- Hoy · el nombre de la receta entero (#2020) ---------- */
/* Con dos líneas se cortaban «… con verduras y…» o «(Versión sin gluten)».
   1.40.0 (verifui): con tres, a 390 px seguía cortándose lo que más importa a quien tiene
   una alergia («Tostadas integrales con tomate, jamón cocido y queso (Versión sin…»): cuatro. */
.tnp-dc .tnp-dc-tit { -webkit-line-clamp: 4; line-clamp: 4; }

/* ---------- Accesibilidad · texto grande (#2007) ---------- */
/* La fecha de Hoy y los días de Compra, en la barra de arriba: con el texto
   grande caben en dos líneas en vez de cortarse («Del 7 al 13 d…»). */
html[data-texto] .app-top .app-top-hueco.tnp-con-fecha { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; font-size: 16px; line-height: 1.2; }
