/* Lactasoft — mobiel only (geladen via media="max-width: 1023px" in shell head) */

.ls-body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.ls-topbar {
  padding-top: max(0px, env(safe-area-inset-top));
}

.ls-main {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.ls-footer {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.ls-btn-primary,
.ls-btn-secondary,
.ls-run-preset-btn,
.ls-top-nav-link,
.ls-mobile-nav-link,
.ls-icon-btn {
  min-height: 44px;
  min-width: 44px;
}

.ls-btn-primary:hover,
.ls-btn-secondary:hover {
  transform: none;
}

.ls-page-head-row {
  align-items: stretch;
}

.ls-page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.ls-page-head-actions .ls-btn-primary,
.ls-page-head-actions .ls-btn-secondary {
  flex: 1 1 calc(50% - 0.25rem);
  justify-content: center;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.ls-page-head-actions a.ls-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ls-kpi-grid[style*="repeat(4"],
.ls-kpi-grid[style*="repeat(3"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.ls-kpi-grid-5 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.ls-table-scroll:not(:has(.ls-mob-responsive-table)),
.dataTables_wrapper:not(:has(.ls-mob-responsive-table)) {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper:not(:has(.ls-mob-responsive-table)) .dataTables_scrollBody,
.dataTables_wrapper:not(:has(.ls-mob-responsive-table)) .dataTables_scrollHead {
  overflow-x: auto !important;
  max-height: none !important;
  height: auto !important;
}

/* Kaartweergave tabellen (evolutie, testen, atleten) */
.ls-mob-table-wrap,
div:has(> .ls-mob-table-wrap),
div:has(> .ls-mob-responsive-table),
.dataTables_wrapper:has(.ls-mob-responsive-table) {
  overflow-x: visible !important;
  max-width: 100%;
}

.ls-mob-responsive-table,
.ls-mob-responsive-table tbody {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
}

.ls-mob-responsive-table thead {
  display: none;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  background: #fff;
  border: 1px solid #e8eeec;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

/* DataTables (testen, atleten): volledige rij zoals desktop, geen losse cel-blokjes */
.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card {
  gap: 0.5rem 1rem;
  padding: 14px 16px;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card.odd {
  background: #f8fafc;
}

.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card.even {
  background: #fff;
}

.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card:hover {
  background: #f1f5f9;
}

.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card td {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: none !important;
}

.ls-mob-responsive-table.ls-mob-table-striping thead th {
  border: none !important;
  padding: 0 !important;
}

.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card:last-child {
  border-bottom: none;
}

.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card td.ls-mob-detail-cell {
  border-top: none !important;
  margin-top: 0;
  padding-top: 0;
}

.ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card.is-expanded td.ls-mob-detail-cell {
  border-top: 1px solid #f1f5f9 !important;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card td {
  border: none;
  background: transparent;
  padding: 0;
  vertical-align: middle;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-summary-cell {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-summary-cell.ls-evolutie-test-cell,
.ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-summary-cell.ls-test-id-cell {
  flex: 1 1 6rem;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-detail-cell {
  display: none;
  flex: 1 1 100%;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.45rem 0 0;
  margin-top: 0.35rem;
  border-top: 1px solid #f1f5f9;
  cursor: default;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card.is-expanded td.ls-mob-detail-cell {
  display: flex;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-detail-cell::before {
  content: attr(data-label);
  flex: 0 0 38%;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-detail-cell > * {
  flex: 1 1 auto;
  text-align: right;
  min-width: 0;
}

.ls-mob-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  margin-left: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a6b58;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.ls-mob-responsive-table .ls-evolutie-row.is-focus {
  border-color: #86efac;
  background: #f0fdf4;
}

.ls-mob-responsive-table tbody tr td[colspan] {
  display: block;
  padding: 1.25rem 1rem;
  text-align: center;
}

.ls-dashboard .ls-chart-grid .ls-card--chart:nth-child(n+3) {
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

.ls-mob-charts-compact .ls-card--chart:nth-child(n+4) {
  display: none;
}

.ls-mob-charts-compact.is-expanded .ls-card--chart:nth-child(n+4) {
  display: block;
}

.ls-mob-actions-overflow {
  position: relative;
  flex-wrap: nowrap;
  align-items: flex-start;
}

.ls-mob-action-stash {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ls-mob-actions-menu {
  position: relative;
  flex: 0 0 auto;
}

.ls-mob-actions-panel {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  z-index: 1300;
  min-width: 0;
  max-width: none;
  width: auto;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  box-sizing: border-box;
}

.ls-mob-actions-panel-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.ls-mob-actions-panel-item:active {
  background: #f1f5f9;
}

.ls-page-vlamax .ls-table-card > div[style*="overflow"],
.ls-page-vlamax .ls-table-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ls-run-fields {
  grid-template-columns: 1fr !important;
}

.ls-run-fields .ls-run-col[style*="grid-column"] {
  grid-column: span 1 !important;
}

.ls-run-presets {
  width: 100%;
}

.ls-run-preset-btn {
  flex: 1 1 calc(50% - 0.2rem);
  text-align: center;
}

.ls-run-toolbar {
  flex-direction: column;
  align-items: stretch;
}

.ls-looptest-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.ls-chart-box {
  height: 220px !important;
}

.ls-chart-box--lg {
  height: 280px !important;
}

.ls-trend-charts .ls-chart-box {
  height: 240px !important;
}

.ls-evolutie-charts {
  grid-template-columns: 1fr !important;
}

.ls-threshold-grid {
  grid-template-columns: 1fr !important;
}

.ls-metric-grid {
  grid-template-columns: 1fr !important;
}

.ls-form-grid--2,
.ls-form-grid--3 {
  grid-template-columns: 1fr !important;
}

.ls-recent-grid {
  grid-template-columns: 1fr !important;
}

.ls-search-wrap {
  min-width: 0 !important;
  width: 100%;
}

.ls-table-toolbar {
  flex-direction: column;
  align-items: stretch;
}

.ls-table-toolbar .ls-search-wrap {
  max-width: none;
}

.ls-bike-grid {
  grid-template-columns: 1fr !important;
}

.ls-bike-step-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.ls-vla-protocol-nav {
  flex-wrap: wrap;
}

.ls-vla-protocol-toggle {
  flex: 1 1 calc(50% - 0.25rem);
  text-align: center;
  justify-content: center;
}

.ls-auth-wrap {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Uniforme sport-tabs (mobiel) — panel-wissel + link/segment-styling */
.ls-sport-panels-shell .ls-sport-panel {
  display: none;
}

.ls-sport-panels-shell .ls-sport-panel.is-active {
  display: block;
}

.ls-sport-kpi-hidden {
  display: none !important;
}

.ls-sport-tabs,
.ls-evolutie-discipline-nav,
.ls-tests-filters .ls-trend-filter-group:first-child .ls-trend-segment {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  background: #f1f5f9;
  border-radius: 12px;
}

.ls-sport-tab,
.ls-evolutie-discipline-nav .ls-evolutie-disc-btn,
.ls-tests-filters .ls-trend-segment-btn {
  flex: 1 1 0;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 48px;
  padding: 0.45rem 0.35rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  cursor: pointer;
  line-height: 1.15;
  text-decoration: none;
  text-align: center;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  box-sizing: border-box;
}

.ls-sport-tab.is-active,
.ls-evolutie-discipline-nav .ls-evolutie-disc-btn.is-active,
.ls-tests-filters .ls-trend-segment-btn.is-active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ls-sport-tab.ls-sport-tab--run.is-active,
.ls-evolutie-discipline-nav .ls-evolutie-disc-btn--run.is-active { color: var(--ls-run, #1a6b58); }
.ls-sport-tab.ls-sport-tab--bike.is-active,
.ls-evolutie-discipline-nav .ls-evolutie-disc-btn--bike.is-active { color: var(--ls-bike, #c47a24); }
.ls-sport-tab.ls-sport-tab--swim.is-active,
.ls-evolutie-discipline-nav .ls-evolutie-disc-btn--swim.is-active { color: var(--ls-swim, #2b7cb8); }
.ls-sport-tab.ls-sport-tab--all.is-active,
.ls-tests-filters .ls-trend-segment-btn.is-active { color: #0f172a; }

.ls-sport-tab-count {
  display: block;
  width: 100%;
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.1;
}

.ls-mob-trend-row-hidden {
  display: none !important;
}

.ls-mob-trend-table-toggle,
.ls-mob-charts-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0.75rem 0 0;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a6b58;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  cursor: pointer;
}

.ls-mob-charts-toggle {
  margin: 0 0 1.25rem;
}

.ls-tests-filters .ls-trend-filters > .ls-trend-filter-group:first-child .ls-trend-filter-label {
  display: none;
}

.ls-tests-filters .ls-trend-filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.ls-tests-filters .ls-trend-filter-row > .ls-trend-filter-group {
  flex: 1 1 0;
  min-width: 0;
}

.ls-tests-filters .ls-trend-filter-row > .ls-trend-filter-group--actions {
  flex: 0 0 auto;
  margin-left: 0;
}

.ls-tests-filters .ls-trend-filter-row .ls-form-input.ls-trend-select {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.ls-tests-filters .ls-trend-filter-row .ls-trend-filter-label {
  font-size: 0.6875rem;
  margin-bottom: 0.25rem;
}

.ls-tests-filters .ls-trend-filter-row .ls-trend-btn-sm {
  white-space: nowrap;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  font-size: 0.75rem;
}

.ls-tests-filters .ls-trend-segment-btn[data-type="lopen"] { order: 1; }
.ls-tests-filters .ls-trend-segment-btn[data-type="fietsen"] { order: 2; }
.ls-tests-filters .ls-trend-segment-btn[data-type="zwemmen"] { order: 3; }
.ls-tests-filters .ls-trend-segment-btn[data-type="all"] { order: 4; }

.ls-page:has(#tabel-testen-overzicht) .ls-kpi-grid {
  display: none !important;
}

.ls-evolutie-discipline-nav {
  flex-wrap: nowrap;
  margin-top: 0.75rem;
}

/* Legacy aliassen (testen-atleet) */
.ls-testen-tabs-shell .ls-testen-sport-panel,
.ls-sport-panels-shell .ls-testen-sport-panel { display: none; }
.ls-testen-tabs-shell .ls-testen-sport-panel.is-active,
.ls-sport-panels-shell .ls-testen-sport-panel.is-active { display: block; }
.ls-testen-kpi-hidden { display: none !important; }
.ls-testen-sport-tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; padding: 0.3rem; background: #f1f5f9; border-radius: 12px; }
.ls-testen-sport-tab { flex: 1 1 0; min-height: 48px; padding: 0.45rem 0.35rem; border: none; border-radius: 10px; background: transparent; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; cursor: pointer; }
.ls-testen-sport-tab.is-active { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.ls-testen-tab-count { display: block; font-size: 1.125rem; font-weight: 700; margin-top: 0.1rem; }

@media (max-width: 480px) {
  .ls-page-head-actions .ls-btn-primary,
  .ls-page-head-actions .ls-btn-secondary {
    flex: 1 1 100%;
  }

  .ls-kpi-grid[style*="repeat(4"],
  .ls-kpi-grid[style*="repeat(3"],
  .ls-kpi-grid-5 {
    grid-template-columns: 1fr !important;
  }

  .ls-run-preset-btn {
    flex: 1 1 100%;
  }

  .ls-bike-step-fields {
    grid-template-columns: 1fr !important;
  }
}

/* PWA installatie-banner (alleen mobiel — dit bestand laadt max-width 1023px) */
.ls-pwa-install {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 1200;
}

.ls-pwa-install-inner {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.14);
}

.ls-pwa-install-text {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #334155;
}

.ls-pwa-install-text strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #0f172a;
}

.ls-pwa-ios-share {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #f1f5f9;
  font-weight: 600;
}

.ls-pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ls-pwa-install-actions .ls-btn-primary,
.ls-pwa-install-actions .ls-btn-secondary {
  flex: 1 1 auto;
  min-height: 44px;
  justify-content: center;
}

