/* Transit Chaser mobile-only cleanup */

.mobile-bottom-info,
.mobile-photo-actions,
.mobile-bottom-utility {
  display: none;
}

@media (max-width: 720px) {
  .site-credit {
    display: none;
  }

  /* ---------------------------------
     Header
     Keep only the title on mobile.
     Original utility buttons are hidden;
     mobile proxy buttons live in the photo card.
  --------------------------------- */

  header {
    display: block !important;
    margin: 0.28rem 0 0.2rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    position: static !important;
  }

  header h1 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.08;
  }

  #trackerTitle {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-nav-actions {
    display: none !important;
  }

  /* ---------------------------------
     Community Photo of the Week
  --------------------------------- */

  .weekly-photo-banner {
    margin: 0.34rem 0 0.52rem;
    border-radius: 12px;
    overflow: hidden;
  }

  .weekly-photo-bg {
    display: none;
  }

  .weekly-photo-inner {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 34px;
    gap: 0.5rem;
    align-items: start;
    padding: 0.56rem 0.56rem 0.54rem;
    min-height: 0;
  }

  #weeklyPhotoImg {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin-top: 0.04rem;
  }

  .weekly-photo-content {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    min-width: 0;
  }

  .weekly-photo-right {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
  }

  .weekly-photo-left {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    margin-top: 0.06rem;
    min-width: 0;
  }

  #weeklyPhotoTitle {
    font-size: 0.9rem;
    line-height: 1.08;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  .weekly-photo-credit,
  .weekly-photo-social {
    font-size: 0.68rem;
    line-height: 1.1;
    opacity: 0.78;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  .weekly-photo-label {
    font-size: 0.62rem;
    line-height: 1;
    letter-spacing: 0.11em;
    opacity: 0.76;
    margin: 0.02rem 0 0;
  }

  .weekly-gallery-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.04rem 0 0;
    padding: 0.16rem 0.34rem;
    border-radius: 999px;
    font-size: 0.62rem;
    line-height: 1;
  }

  .weekly-photo-upload-note {
    display: inline-block;
    margin: 0.02rem 0 0;
    font-size: 0.62rem;
    line-height: 1.08;
    opacity: 0.76;
  }

  .weekly-photo-upload-note a {
    font-weight: 700;
  }

  .mobile-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    align-items: center;
    justify-content: flex-start;
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: stretch;
    padding-top: 0.02rem;
  }

  .mobile-photo-actions button {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(88, 124, 156, 0.9);
    color: #fff;
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
  }

  /* ---------------------------------
     Subtitle row
     Top Reset hidden on mobile
  --------------------------------- */

  .tracker-subtitle-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.18rem 0 0.4rem;
    padding: 0.42rem 0.46rem;
    border-radius: 10px;
  }

  #trackerSubtitleText {
    flex: 1;
    min-width: 0;
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .reset-settings-btn {
    display: none !important;
  }

  /* ---------------------------------
     Status box
  --------------------------------- */

  #transitStatus {
    margin: 0.4rem 0 !important;
    padding: 0.56rem 0.6rem !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
  }

  .data {
    margin: 0.4rem 0;
    padding: 0.6rem;
    border-radius: 12px;
  }

  details summary {
    cursor: pointer;
  }

  /* ---------------------------------
     Location row
  --------------------------------- */

  #locationModeToggle .data {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.36rem;
    align-items: center;
  }

  #locationModeToggle label {
    font-size: 0.72rem;
    white-space: nowrap;
    margin: 0;
  }

  #locationMode {
    width: 100%;
    min-height: 32px;
    border-radius: 9px;
    font-size: 0.76rem;
    padding: 0.2rem 0.34rem;
  }

  #refreshBtn {
    margin-left: 0 !important;
    min-height: 32px;
    padding: 0.18rem 0.48rem;
    border-radius: 9px;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  #manualLocationFields {
    grid-column: 1 / -1;
  }

  /* ---------------------------------
     Transit controls card
     3 compact controls in one row
     Hide "Tracking:" label
     Pause sits on the right
     Timer smaller and left-aligned
  --------------------------------- */

      .data:has(> .transit-control-row) {
    position: relative;
    padding-bottom: 0.6rem;
  }

  .transit-control-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.24rem 0.38rem;
    align-items: end;
  }

  .transit-control-row > label {
    margin: 0;
    font-size: 0.63rem;
    line-height: 1.05;
    color: rgba(233,238,252,0.78);
  }

  .transit-control-row > label strong {
    font-weight: 700;
  }

  .transit-control-row > label:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
  }

  #bodyToggle {
    grid-column: 1;
    grid-row: 2;
  }

  .transit-control-row > label:nth-of-type(2) {
    grid-column: 2;
    grid-row: 1;
  }

  #radiusSelect {
    grid-column: 2;
    grid-row: 2;
  }

  .transit-control-row > label:nth-of-type(3) {
    grid-column: 3;
    grid-row: 1;
  }

  #predictToggle {
    grid-column: 3;
    grid-row: 2;
  }

  .transit-control-row > label:nth-of-type(4) {
    display: none !important;
  }

  .transit-control-row select {
    width: 100%;
    min-height: 32px;
    border-radius: 9px;
    font-size: 0.74rem;
    padding: 0.2rem 0.34rem;
  }

      #autoRefreshToggle {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    min-height: 44px;
    padding: 0.16rem 0.42rem;
    border-radius: 10px;
    font-size: 0.74rem;
  }

      .timer-row {
    width: calc(100% - 108px);
    margin-top: 0.42rem;
    padding: 0.32rem 0.42rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.055);
    text-align: left;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  #countdownTimer {
    display: block;
    font-size: 0.72rem;
    line-height: 1.16;
    opacity: 0.92;
  }

  /* ---------------------------------
     Detection margin
  --------------------------------- */

  .detection-margin-card {
    padding: 0.6rem;
  }

  .detection-margin-header {
    gap: 0.36rem;
  }

  .detection-margin-title {
    font-size: 0.8rem;
  }

  .detection-visuals-link {
    font-size: 0.7rem;
  }

  .boosted-visual-toggle-ui {
    font-size: 0.66rem;
    padding: 0.22rem 0.36rem;
  }

  /* ---------------------------------
     Bottom mobile links + reset
  --------------------------------- */

  .mobile-bottom-info {
    display: block;
    margin: 0.7rem 0 0.52rem;
    padding: 0.54rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.1);
  }

  .mobile-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.24rem;
    justify-content: center;
  }

  .mobile-bottom-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0.15rem 0.34rem;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    font-size: 0.6rem;
    font-weight: 700;
    background: rgba(255,255,255,0.075);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e9eefc;
  }

  .mobile-bottom-actions a.mobile-donate-link {
    background: rgba(26,136,55,0.9);
    color: #fff;
  }

  .mobile-bottom-utility {
    margin-top: 0.44rem;
    display: flex;
    justify-content: center;
  }

  .mobile-reset-link {
    min-height: 24px;
    padding: 0.17rem 0.46rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #e9eefc;
    font-size: 0.62rem;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-bottom-disclaimer {
    margin-top: 0.42rem;
    padding-top: 0.42rem;
    border-top: 1px solid rgba(255,255,255,0.09);
    font-size: 0.6rem;
    line-height: 1.28;
    color: rgba(233,238,252,0.68);
    text-align: center;
  }

  footer {
    font-size: 0.64rem;
    line-height: 1.3;
  }
}

@media (max-width: 360px) {
  .weekly-photo-inner {
    grid-template-columns: 54px minmax(0, 1fr) 32px;
    gap: 0.44rem;
  }

  #weeklyPhotoImg {
    width: 54px;
    height: 54px;
  }

  .mobile-photo-actions button {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.74rem;
  }

  header h1 {
    font-size: 0.92rem;
  }

  .transit-control-row > label {
    font-size: 0.59rem;
  }

  .transit-control-row select {
    font-size: 0.7rem;
  }

  #autoRefreshToggle {
    min-width: 84px;
    font-size: 0.7rem;
  }
.mobile-bottom-tool-buttons {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.mobile-bottom-tool-buttons .mobile-reset-link {
  min-width: 86px;
}

}
