/* TotaalKoers App 1.0.0 — mobiele layoutcorrectie Mijn TotaalKoers.
   Scope: uitsluitend de app-weergave; geen invloed op de gewone website.
   De Engine 0.5.247 voegde een licht/donker-keuze toe in .tke-my-top-actions.
   De oude app-snippet forceert een 2-kolomsgrid met een te brede auto-kolom.
*/
@media screen and (max-width: 760px) {
  .totaalkoers-app-router,
  .totaalkoers-app-engine-page,
  .totaalkoers-app-my,
  .totaalkoers-app-my .tke-my {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* Titel krijgt altijd de volle regel; de bediening staat eronder. */
  .totaalkoers-app-my .tke-my .tke-my-top {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 14px !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-top > div:first-child {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-top h2 {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: clamp(1.35rem, 5vw, 1.65rem) !important;
    line-height: 1.16 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-top-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-theme-choice {
    box-sizing: border-box !important;
    display: inline-flex !important;
    flex: 0 1 auto !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 3px !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-theme-label {
    padding: 0 4px !important;
    font-size: .76rem !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-theme-option {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    padding: 7px 9px !important;
    font-size: .81rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-top-actions form {
    flex: 0 0 auto !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .totaalkoers-app-my .tke-my .tke-my-top-actions .tke-my-btn {
    min-width: 0 !important;
    padding: 8px 10px !important;
    font-size: .81rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .totaalkoers-app-my .tke-my .my-tabs {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Op de smalste iPhones blijft de weergavekeuze volledig zichtbaar. */
@media screen and (max-width: 370px) {
  .totaalkoers-app-my .tke-my .tke-my-theme-choice {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
  .totaalkoers-app-my .tke-my .tke-my-theme-label {
    grid-column: 1 / -1 !important;
  }
  .totaalkoers-app-my .tke-my .tke-my-theme-option {
    width: 100% !important;
  }
}
