 /**
 * TICKETMAX Mobile Override — loaded LAST to win cascade.
 * SOLO contiene reglas que NO son header/navbar.
 * Todo lo relativo a header/nav está en standalone-globals.css (NAVBAR REDESIGN).
 */

@media (max-width: 768px) {

  /* ── SEARCH ── */
  html body .tm-search-section { margin-top: -20px !important; padding: 0 12px !important; margin-bottom: 8px !important; }
  html body .tm-search-bar {
    height: 44px !important;
    border-radius: 12px !important;
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    padding: 0 8px 0 14px !important;
  }
  html body .tm-search-input { font-size: 14px !important; }
  html body .tm-search-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: none !important;
    color: #7C3AED !important;
    box-shadow: none !important;
  }

  /* ── BANNER ── */
  html body .tm-banners { margin: 0 !important; padding: 0 12px !important; max-width: 100% !important; box-sizing: border-box !important; }
  html body .tm-banners .tm-container { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
  html body .tm-carousel { margin: 0 !important; padding: 0 !important; border-radius: 0 !important; }
  html body .tm-carousel-track { margin: 0 !important; padding: 0 !important; }
  html body .tm-slide-movil { margin: 0 !important; padding: 0 !important; }
  html body .tm-slide-movil img { width: 100% !important; margin: 0 !important; border-radius: 0 !important; }
  html body .tm-carousel-prev,
  html body .tm-carousel-next,
  html body [class*='carousel-arrow'],
  html body [class*='carousel-btn'],
  html body .tm-carousel button { display: none !important; }

  /* ── EVENT GRID ── */
  html body .tm-events-section { padding: 0 8px !important; margin-top: 6px !important; }
  html body .tm-events-section .tm-container { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
  html body .tm-events-grid { gap: 0 !important; margin: 0 !important; max-width: 100% !important; overflow: hidden !important; }
  html body .tm-event-card { max-width: 50% !important; flex: 0 0 50% !important; padding: 4px !important; }

  /* ── CARDS ── */
  html body .tm-card-link {
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    padding: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
  html body .tm-card-image { border-radius: 12px 12px 0 0 !important; overflow: hidden !important; }
  html body .tm-card-image img { border-radius: 0 !important; width: 100% !important; }
  html body .tm-card-body { padding: 8px 8px 2px 8px !important; flex: 1 !important; display: flex !important; flex-direction: column !important; }
  html body .tm-card-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #1E293B !important;
    -webkit-line-clamp: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    margin-bottom: 0 !important;
  }
  html body .tm-card-details { margin: 0 !important; padding: 0 !important; gap: 0 !important; margin-bottom: 4px !important; }
  html body .tm-card-details li {
    font-size: 10px !important;
    line-height: 1.25 !important;
    color: #64748B !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body .tm-card-details li span { font-size: 10px !important; line-height: 1.25 !important; }
  html body .tm-icon { width: 10px !important; height: 10px !important; font-size: 10px !important; min-width: 10px !important; }
  html body .tm-icon svg { width: 10px !important; height: 10px !important; }
  html body .tm-card-footer { padding: 0 !important; margin: 0 !important; }
  html body .tm-card-actions { margin-top: auto !important; display: flex !important; gap: 0 !important; }
  html body .tm-card-info-btn { display: none !important; }
  html body .tm-card-buy-btn {
    flex: 1 !important;
    height: 26px !important;
    min-height: 0 !important;
    line-height: 26px !important;
    border-radius: 0 !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #F97316 !important;
    color: #fff !important;
    border: none !important;
  }

  /* ── FOOTER ── */
  html body .tm-footer { padding-bottom: 20px !important; }
  html body .tm-footer .tm-container { padding: 0 20px !important; }
}

/* Extra small */
@media (max-width: 340px) {
  html body .tm-event-card { max-width: 100% !important; flex: 0 0 100% !important; }
}

/* ── Prevenir auto-zoom de iOS Safari al focus en inputs ──
   iOS hace zoom-in cuando font-size del input es <16px. Forzar 16px
   en mobile para que el usuario no tenga que pellizcar para volver
   al tamaño normal después de tocar un input.
   Aplica solo en mobile (≤767px), excluye checkbox/radio/range/file. */
@media (max-width: 767px) {
  html body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html body select,
  html body textarea {
    font-size: 16px !important;
  }
}
