/* Equipo (rediseño 23 nov) */
.device-search { width: 100%; margin: 0 0 8px; }
/* Equipo › bici: datos en una fila compacta (rediseño 23 nov) */
#app .bike-detail .bike-summary-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-auto-rows: auto; gap: 8px; }
#app .bike-detail .bike-summary-tiles > .summary-tile { min-height: 0; height: auto; grid-column: auto; grid-row: auto; align-self: start; padding: 8px 10px; }
#app .bike-detail .bike-summary-tiles > .summary-tile b { font-size: 18px; }
#app .bike-detail .size-line, #app .bike-detail .bike-summary-tiles ~ .summary-actions { margin-top: 8px; }
#app .bike-detail .summary-tile.wide-tile { min-height: 0; padding: 8px 10px; }
#app .bike-detail .summary-tile.wide-tile b { font-size: 18px; }

/* 2.ª vuelta (23 nov) */
/* Bici: every tile of a row the same height, values on the same line (Baterías and Kilómetros were misaligned). */
#app .bike-detail .bike-summary-tiles { align-items: stretch; }
#app .bike-detail .bike-summary-tiles > .summary-tile { align-self: stretch; }
@media (max-width: 640px) {
  #app .bike-detail .bike-summary-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #app .bike-detail .bike-summary-tiles > .summary-tile { padding: 8px; }
}

/* Dispositivos: compact rows of about 52 px, so a long list still fits. */
#app .devices .withparts { gap: 4px; }
#app .devices .withparts .device { min-height: 52px; padding-block: 6px; }
#app .devices .withparts .deviceinfo { line-height: 1.3; }
#app .devices .withparts + .withparts { margin-top: 6px; }
#app .devices .withparts .deviceinfo { min-width: 0; flex: 1 1 auto; }
#app .devices .withparts .deviceinfo > b, #app .devices .withparts .deviceinfo > .small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  #app .devices .withparts .device { gap: 10px; padding-inline: 10px; }
  #app .devices .withparts .device .thumb { width: 32px; height: 32px; flex: none; }
  #app .devices .withparts .device .thumb svg { width: 32px; height: 32px; }
  #app .devices .withparts .device .batt > i { display: none; }
}

/* Rutas: one column list with its tools above; nothing left empty beside an opened route. */
#app .routes-content > .route-list-box { grid-column: 1 / -1; display: grid; gap: 10px; min-width: 0; }
.route-list { display: grid; gap: 10px; min-width: 0; }
.route-list > [hidden] { display: none !important; }
.route-list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.route-list-tools input[type=search] { flex: 1 1 220px; min-width: 0; width: auto; margin: 0; }
.route-list-tools select { flex: 0 0 auto; width: auto; margin: 0; }
.route-list-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.route-list-chips .chip { flex: none; min-height: 36px; }
.route-list-count:empty { display: none; }
#app .route-card { padding: 12px 16px; min-width: 0; }
#app .route-card > h3 { margin: 0; font-size: 17px; }
#app .route-card > h3 + p { margin: 2px 0 6px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
/* «Planificar ruta» as one row like «Tiempo en la ruta» and the others below it, not a box of its own. */
#app .route-card .route-schedule > .summary-tile { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; height: auto;
  padding: 0; margin: 0; background: none; border: 0; box-shadow: none; text-align: left; }
#app .route-card .route-schedule > .summary-tile b { font-size: 15px; font-weight: 600; text-align: right; }
#app .route-card .route-schedule > .summary-tile .summary-title { margin: 0; font-weight: 600; }

/* Tiempo en la ruta: wind on its own line, rain and temperature side by side, a map of the right size (240 px on a phone, 300 px on a computer);
   with room, figures and avisos beside the map instead of above it. */
.rwm { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); column-gap: 16px; align-items: start; }
.rwm-side, .rwm-mapcol { display: grid; gap: 10px; min-width: 0; align-content: start; }
.rwm-how > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.rwm-how > p { margin: 0 0 6px; }
#app .rwm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#app .rwm-summary > .rwm-tile:first-child { grid-column: 1 / -1; }
#app .rwm-tile { padding: 8px; gap: 2px; }
#app .rwm-tile b { font-size: 14px; }
#app .rwm-alert { padding: 6px 10px; }
#app .rwm-map, #app .rw-map { height: 300px; min-height: 0; }
/* Route editor on a phone: Guardar first and always in view, the other tools on one line that scrolls sideways,
   so the map keeps the height that two rows of buttons took. */
@media (max-width: 640px) {
  .route-editor-dialog .actions.route-editor-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .route-editor-dialog .route-editor-tools > button { flex: 0 0 auto; white-space: nowrap; min-height: 44px; padding: 6px 12px; }
  .route-editor-dialog .route-editor-tools > button.primary { order: -1; flex: 0 0 auto; position: sticky; left: 0; z-index: 1; margin: 0; padding-inline: 20px; }
}
/* Comida en marcha: its map shows the same route again, so it is smaller; the rows of intakes are tighter. */
#app .rf-map { height: 260px; min-height: 0; }
#app .rf-summary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 6px; }
#app .rf-tile { padding: 8px; gap: 2px; }
#app .rf-list li { padding: 6px 10px; }
@media (max-width: 640px) { #app .rwm-map, #app .rw-map { height: 240px; } #app .rf-map { height: 200px; } }

/* Revisiones: parts and revisions as rows of about 52 px; the detail and the actions open inside each row. */
#app .bike-parts details.more { padding: 4px 12px; margin-top: 2px; }
#app .bike-parts details.more[open] { padding-bottom: 12px; }
#app .bike-parts details.more > summary { min-height: 44px; }
#app .bike-parts .part-summary small { font-size: 13px; line-height: 1.3; }
.revision-list { display: grid; gap: 2px; padding: 8px 12px; }
.revision-row + .revision-row { border-top: 1px solid var(--sep); }
.revision-row > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 4px; cursor: pointer; }
.revision-row-main { display: grid; min-width: 0; line-height: 1.3; }
.revision-row-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revision-row-count { flex: 0 1 auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.revision-row.is-void .revision-row-main b { color: var(--muted); }
.revision-row-body { padding: 0 4px 10px; }
.revision-row-body ul { margin: 4px 0 8px; padding-left: 20px; }
.revision-row-body .actions { margin-top: 4px; }
.revision-list > [hidden] { display: none; }
/* Otro material de Garmin (zapatillas, neoprenos, ruedas): rows with km and the share of useful life. */
.gear-list { display: grid; min-width: 0; }
.gear-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 2px; min-width: 0; }
.gear-row + .gear-row { border-top: 1px solid var(--sep); }
.gear-row[hidden] { display: none; }
.gear-row-main { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.gear-row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-row-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-row-figures { display: grid; justify-items: end; gap: 2px; flex: none; font-variant-numeric: tabular-nums; text-align: right; }
.gear-life { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.gear-life > i { display: inline-block; width: 44px; height: 6px; border-radius: 3px; background: var(--sep); overflow: hidden; }
.gear-life > i > i { display: block; height: 100%; background: var(--green); }
.gear-life.near > i > i { background: var(--orange); }
.gear-life.over > i > i { background: var(--red); }
.gear-row.is-retired .gear-row-main b { color: var(--muted); }
#app .my-workshop .titlebar { margin-bottom: 6px; }
#app .my-workshop .titlebar h2 { margin: 0; }
