/* =========================================================
   BLACK SIX — TABLET ADAPTATION
   Portrait tablets (<=1024px) already inherit the full mobile
   layout (see mobile.css / chat-mobile.css, breakpoint raised
   to 1024px). This file polishes LANDSCAPE iPads and large
   touch tablets (1025–1366px, coarse pointer / no hover) plus
   any device flagged html.bs-tablet by mobile.js.
   Loaded LAST so it can safely refine the desktop layer.
   ========================================================= */

/* --- Landscape iPads / large touch tablets (mobile layout is now active
       here via mobile.css; we just center it so it doesn't stretch full
       width on a 1366px screen) --- */
@media (min-width: 1025px) and (max-width: 1366px) and (pointer: coarse) and (hover: none) {
  html, body { -webkit-text-size-adjust: 100%; }

  /* Keep the mobile column comfortable and centered, not full 1366px */
  .container,
  .site-header .container.header-shell,
  .page-hero .container.hero-layout,
  .page-hero .container.split-layout,
  .section > .container,
  .footer-wrap,
  .footer-inner {
    width: min(880px, calc(100vw - 48px)) !important;
    max-width: min(880px, calc(100vw - 48px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Apple HIG: comfortable 44px touch targets */
  .button, button, .nav-links a,
  input, select, textarea,
  .price-badge, .chat-launcher, #chat-launcher {
    min-height: 44px;
  }

  .hero-stat-grid { gap: 14px !important; }

  /* Smooth momentum scrolling */
  #chat-thread, .modal-shell, .chat-thread { -webkit-overflow-scrolling: touch; }
}

/* --- Class fallback (iPadOS with trackpad reports pointer:fine) --- */
html.bs-tablet { -webkit-text-size-adjust: 100%; }

html.bs-tablet .container { width: 100%; }

html.bs-tablet .button,
html.bs-tablet button,
html.bs-tablet .nav-links a,
html.bs-tablet input,
html.bs-tablet select,
html.bs-tablet textarea,
html.bs-tablet .price-badge {
  min-height: 44px;
}

html.bs-tablet .chat-launcher,
html.bs-tablet #chat-launcher {
  touch-action: manipulation;
}

html.bs-tablet #chat-thread,
html.bs-tablet .chat-thread,
html.bs-tablet .modal-shell {
  -webkit-overflow-scrolling: touch;
}

/* Prevent iOS double-tap zoom jank on interactive controls */
html.bs-tablet button,
html.bs-tablet .button,
html.bs-tablet a,
html.bs-tablet [role="button"] {
  touch-action: manipulation;
}
