/* claro-extras.css — FROST «Claro» (14-11-2026). Dueño: un solo agente (A3). Ver docs/diseno-14-11/BRIEF-IMPLEMENTAR.md
   Traslados · Ayuda · Buscar (Ctrl K) · ficha de una carga en el celular · «Sin rastreador todavía» del Inicio.
   Va después de style.css: manda sobre lo de antes. */

/* ============ 1. TRASLADOS ============ */
/* Dos pestañas de texto («Ahora» | «Anteriores») en vez de 4 cápsulas */
#perm-filter.perm-seg { display: flex; gap: 0 22px; grid-template-columns: none; background: none; padding: 0; }
#perm-filter.perm-seg button { flex: none; padding: 0 2px; font-size: 16px; }
#perm-filter.perm-seg .count-chip { background: none; border: 0; padding: 0; margin-left: 4px; color: inherit; opacity: .75; font-size: 15px; }
#perm-filter.perm-seg .count-chip:empty { display: none; }
/* Secciones de UNA lista: solo las que tienen algo */
.perm-sec { margin: 18px 0 2px; font: 700 13px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.perm-sec:first-child { margin-top: 4px; }
.perm-sec .count-chip { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; }
/* Tarjeta: qué cargas (grande) → quién la lleva y hasta cuándo → a dónde/por qué → quién lo pidió (chico) */
.perm-card { gap: 8px; padding: 16px 18px; }
.perm-card .pa-chip { padding: 6px 12px 6px 8px; font-size: 16px; font-weight: 600; background: none; border: 0; padding-left: 0; color: var(--text); }
.perm-card .pa-chip svg { width: 20px; height: 20px; }
.perm-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0; font-size: 15.5px; color: var(--text-2); line-height: 1.4; }
.perm-line b { color: var(--text); font-weight: 600; }
.perm-line .perm-st { font-size: 13px; padding: 3px 10px; }
.perm-meta { font-size: 13.5px; margin: 0; }
.perm-meta .perm-id { opacity: .75; }
.perm-actions { margin-top: 4px; }
.perm-actions .primary, .perm-actions .ghost-btn { min-height: 48px; padding: 0 18px; font-size: 15px; }
.perm-note { min-height: 48px; font-size: 15px; }
/* Vacío: una frase grande + la explicación (antes era un párrafo fijo arriba) + «¿Cómo funciona?» */
.perm-empty { text-align: left; border: 0 !important; padding: 36px 4px !important; max-width: 560px; }
.perm-empty b { display: block; font-size: 20px; line-height: 1.3; color: var(--text); }
.perm-empty span { display: block; margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.perm-empty .link-btn { margin-top: 10px; min-height: 44px; font-size: 16px; padding: 0; }
@media (max-width: 760px) {
  .perm-head { align-items: center; }
  .perm-card .perm-actions { justify-content: stretch; }
  .perm-card .perm-actions > button { flex: 1 1 40%; }
  .perm-card .perm-note { flex: 1 1 100%; }
}

/* Formulario «Pedir traslado»: preguntas grandes, atajos de tiempo primero, fechas y extras plegados */
.permit-box .pm-step { gap: 8px; }
.permit-box .fld > .pm-q, .permit-box .fld > span.pm-q:first-child { display: block; margin: 0; font-size: 16.5px; font-weight: 650; color: var(--text); letter-spacing: 0; }
.permit-box .pm-count { font-size: 15px; }
.permit-box .pm-assets { max-height: 188px; }
.permit-box label.pm-row { min-height: 48px; }
.permit-box .pm-row input { width: 22px; height: 22px; min-height: 0; padding: 0; flex: none; }
.permit-box .pm-row b { font-size: 15.5px; }
.permit-box .pm-row small { font-size: 13px; }
.permit-box input, .permit-box .search-in { min-height: 48px; font-size: 16px; }
/* Atajos de tiempo: misma línea de pestañas de texto que el resto de la app (sin cápsulas), en una sola fila */
#pm-quick.pm-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
#pm-quick.pm-quick button { min-height: 52px; padding: 0 4px !important; white-space: nowrap; font-size: 16px; text-align: center; }
#pm-quick.pm-quick button.on { color: var(--text) !important; border-bottom-color: var(--accent) !important; }
.pm-until { margin: 2px 0 0; font-size: 15px; color: var(--text-2); }
.pm-until b { color: var(--text); font-weight: 600; }
.pm-more { border-top: 1px solid var(--border); }
.pm-more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; color: var(--accent); font-size: 15.5px; font-weight: 600; cursor: pointer; }
.pm-more > summary::-webkit-details-marker { display: none; }
.pm-more > summary::after { content: '›'; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s ease; }
.pm-more[open] > summary::after { transform: rotate(90deg); }
.pm-more > summary i { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; margin-right: auto; }
.pm-more > .two { padding: 2px 0 10px; }
@media (max-width: 760px) {
  #pm-quick.pm-quick button { font-size: 15px; }
  /* el formulario sube desde abajo a lo ancho, como hoja */
  #modal-permit { padding: 0; align-items: flex-end; }
  #modal-permit .permit-box { width: 100%; max-width: none; margin: 0; border-radius: 16px 16px 0 0; max-height: 94dvh; }
  .permit-box .modal-actions { flex-direction: row; }
  .permit-box .modal-actions > #pm-send { flex: 1; }
}

/* ============ 2. AYUDA ============ */
.man-head { display: flex; flex-direction: column; align-items: stretch; gap: 12px; max-width: 780px; }
.man-head .hint { font-size: 16px; margin: 0; }
.man-head .search-in { width: 100%; max-width: 780px; min-height: 52px; font-size: 17px; }
.man-list { max-width: 780px; border-top: 1px solid var(--border); }
.man-q > summary { font-size: 17px; line-height: 1.35; }
.man-q > summary:hover { color: var(--accent); }
.man-q > summary::after { flex: none; }
.man-q .man-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; padding: 4px 4px 20px; border: 0; background: none; border-radius: 0; }
.man-q .man-ill svg { width: 120px; height: auto; }
.man-q .man-body ol { margin: 0; padding-left: 22px; font-size: 16px; line-height: 1.6; color: var(--text); }
.man-q .man-body li + li { margin-top: 6px; }
.man-q .man-note { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.man-q[open] > summary { color: var(--text); }
.man-empty { padding: 28px 4px; font-size: 16px; color: var(--text-2); }
@media (max-width: 760px) {
  .man-q .man-card { grid-template-columns: 1fr; }
  .man-q .man-ill { display: none; }
  .man-q > summary { font-size: 17px; min-height: 60px; }
}

/* ============ 3. BUSCAR (Ctrl K) ============ */
.cmdk-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.cmdk-item .cmdk-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--field); color: var(--text-2); font-size: 0; }
.cmdk-item .cmdk-ico.st-on { color: var(--ok); }
.cmdk-item .cmdk-ico.st-warn { color: var(--warn); }
.cmdk-item .cmdk-ico.st-off, .cmdk-item .cmdk-ico.st-new, .cmdk-item .cmdk-ico.st-none { color: var(--muted); }
.cmdk-item .cmdk-ico.st-bad { color: var(--bad); }
.cmdk-item { gap: 12px; }
.cmdk-item > span:nth-child(2) { min-width: 0; flex: 1; }
.cmdk-item b, .cmdk-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .cmdk-item { min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
  .cmdk-item b { font-size: 17px !important; }
  .cmdk-item small { font-size: 14px !important; }
  .cmdk-item .go-hint { display: none; }
  .cmdk-input { gap: 10px; }
  .cmdk-input input { min-width: 0; flex: 1; }
}

/* ============ 4. CELULAR: ficha en dos alturas + «Sin rastreador todavía» plegado ============ */
.dd-grip { display: none; }
@media (max-width: 860px) {
  /* Media altura: nombre, dónde está y los botones redondos, con el pin a la vista arriba.
     Tocando la agarradera (o bajando) pasa a alta; la agarradera, el nombre y la ✕ van en la cabecera fija: no se pierden al bajar. */
  #panel-mapa .detail-card { top: auto; height: 54%; max-height: none; transition: height .25s ease; display: flex; flex-direction: column; }
  /* En media altura van primero el nombre, el lugar y los botones redondos; «Hoy» y lo demás, debajo */
  #panel-mapa .detail-card > * { flex-shrink: 0; order: 2; }
  #panel-mapa .detail-card > .dd-head, #panel-mapa .detail-card > .cf-where { order: 0; }
  #panel-mapa .detail-card > .cf-acts { order: 1; }
  #panel-mapa .detail-card.full { height: calc(100% - 8px); }
  #panel-mapa .detail-card::before { display: none; }
  #panel-mapa .detail-card .dd-head { padding-top: 22px; }
  .dd-grip { display: block; position: absolute; left: 50%; top: 0; width: 96px; height: 24px; margin-left: -48px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 1; }
  .dd-grip::after { content: ''; position: absolute; left: 26px; right: 26px; top: 9px; height: 5px; border-radius: 3px; background: var(--border-hi); }
  .dd-grip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) { #panel-mapa .detail-card { transition: none; } }
.home-nodev { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 4px; }
.home-nodev > summary { list-style: none; justify-content: space-between; font-size: 15px; }
.home-nodev > summary::-webkit-details-marker { display: none; }
.home-nodev > summary::after { content: '›'; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s ease; }
.home-nodev[open] > summary::after { transform: rotate(90deg); }
.home-nodev > summary .count-chip { margin-right: auto; }

/* Ajustes tras revisar capturas (14-11) */
.perm-sec ~ .perm-card .perm-st { display: none; } /* en «Ahora» el título de la sección ya dice el estado */
.permit-box #pm-who { font-size: 15px; line-height: 1.45; color: var(--text-2); }
#man-as { max-width: 780px; }
