/* ============================================================
   hekoro — mobile.css
   Loaded after style.css. All CSS variables from style.css
   are available here. There should be no colour definitions, only layout
   and structure overrides for small screens.
   ============================================================ */

/* ── Visibility helpers ──────────────────────────────────── */
@media (max-width: 700px) {
  .desktop-only { display: none !important; }
}
@media (min-width: 701px) {
  .mobile-only { display: none !important; }
}

/* ── Booking cards (mobile) ──────────────────────────────── */
@media (max-width: 700px) {

  /* Card shell */
  .booking-card {
    background: var(--surface-2);
    border: 6px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Header row: street + badge */
  .booking-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .booking-card__street {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
  }

  .booking-card__city {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 2px;
  }

  /* Date blocks */
  .booking-card__dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .booking-card__date-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 10px;
  }

  .booking-card__date-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 2px;
  }

  .booking-card__date-value {
    font-size: 0.9rem;
    font-weight: 600;
  }

  .booking-card__date-time {
    font-size: 0.8rem;
    color: var(--muted);
  }

  /* Footer row: price + actions */
  .booking-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .booking-card__price {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .booking-card__actions {
    display: flex;
    gap: 8px;
  }

  .booking-card__actions .action-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* Filter toggle button */
  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    margin-bottom: 8px;
    text-align: left;
  }

  .mobile-filter-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }

  .mobile-filter-toggle__chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
  }

  .mobile-filter-toggle.is-open .mobile-filter-toggle__chevron {
    transform: rotate(180deg);
  }

  /* Collapsible filter panel */
  .mobile-filter-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
  }

  .mobile-filter-panel.is-open {
    max-height: 300px;
    margin-bottom: 12px;
  }

  .mobile-filter-panel .filter-select {
    width: 100%;
  }

  /* Past bookings: show-last control on mobile */
  .past-limit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--muted);
  }

  .past-limit-row input {
    width: 60px;
  }

  /* Earnings estimator: prevent toggle cutoff at high zoom */
  .earnings-estimator__label-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .earnings-estimator__seg {
    flex-shrink: 0;
  }

  /* Payment success page */
  .payment-success .spot-details-list {
    grid-template-columns: 1fr !important;
  }
}


/* ── Spot cards (mobile) ─────────────────────────────────── */
@media (max-width: 700px) {

  .spots-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .spot-card__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  .spot-card__meta-item {
    font-size: 0.8rem;
    color: var(--muted);
  }

  .spot-card__image {
    width: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
    max-height: 160px;
  }
}


/* ── Admin cards (mobile) ────────────────────────────────── */
@media (max-width: 700px) {

  .admin-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }

  .admin-user-card .booking-card__actions {
    flex-wrap: wrap;
  }

  .admin-user-card .booking-card__actions .action-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .admin-activity-card__details {
    border-top: 1px solid var(--border);
    padding-top: 8px;
  }

  .admin-activity-card__toggle {
    padding-top: 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
}


/* ── Admin stat circles (mobile) ─────────────────────────── */
@media (max-width: 700px) {

  .admin-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 2rem;
  }

  .stat-card {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 0;
  }

  .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
  }

  .stat-label {
    font-size: 0.6rem;
    text-align: center;
    margin-top: 4px;
    line-height: 1.2;
    padding: 0 6px;
  }

  .stat-card--total .stat-value { color: #008000; }
  .stat-card--total { border-color: color-mix(in srgb, #008000 55%, var(--border)); }

  .stat-card--admins .stat-value { color: #ffc000; }
  .stat-card--admins { border-color: color-mix(in srgb, #ffc000 55%, var(--border)); }

  .stat-card--banned .stat-value { color: #a80a0a; }
  .stat-card--banned { border-color: color-mix(in srgb, #a80a0a 55%, var(--border)); }

  .admin-activity-limit-mobile {
    margin-top: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--muted);
  }

  .admin-activity-limit-mobile input {
    width: 60px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
  }
}

/* ── Vehicle cards (mobile) ──────────────────────────────── */
@media (max-width: 700px) {

  .vehicles-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .vehicle-card__plate {
    display: inline-block;
    margin-bottom: 4px;
  }

  .vehicle-card__meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 4px;
  }
}

@media all and (display-mode: standalone) {
    .topbar { padding-top: env(safe-area-inset-top); }
}