/* ══════════════════════════════════════════════════════════════════
   SMMHub Panel — Mobile overrides (compartilhado pelos 4 temas)
   Carregado por header.twig dos temas red/dark/purple/blue.
   Foco: 360px–767px. Não toca em desktop.
   ══════════════════════════════════════════════════════════════════ */

/* Reset de zoom em iOS quando font-size < 16px */
@media (max-width: 767px) {
  body { -webkit-text-size-adjust: 100%; }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Container — padding seguro e largura total */
@media (max-width: 767px) {
  .container,
  .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Imagens nunca estouram */
img, video, iframe, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* Sidebar do painel — drawer no mobile */
@media (max-width: 991px) {
  .sidebar,
  .left-sidebar,
  .component-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 80vw;
    max-width: 320px;
    z-index: 1040;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open,
  .left-sidebar.open,
  .component-sidebar.open { transform: translateX(0); }

  /* Backdrop quando sidebar aberto */
  .sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1039;
  }
}

/* Tabelas com scroll horizontal interno (não estoura a página) */
@media (max-width: 767px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 0;
  }
  table { font-size: 13px; }
  table th, table td { padding: 8px 6px !important; }
}

/* Cards de serviço / preço — empilham bem */
@media (max-width: 575px) {
  .price-card,
  .service-card,
  .feature-card,
  .col-sm-6 > .panel,
  .col-md-4 > .panel,
  .col-md-6 > .panel {
    margin-bottom: 12px;
  }
}

/* Modais — full-screen-ish em telas muito pequenas */
@media (max-width: 575px) {
  .modal-dialog {
    margin: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
  }
  .modal-content { border-radius: 6px; }
  .modal-body {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
  }
  .modal-footer {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    padding: 10px 14px;
  }
  .modal-footer .btn { width: 100%; margin: 0; }
}

/* Formulário /neworder, /addfunds — labels acima dos inputs no mobile */
@media (max-width: 575px) {
  .form-horizontal .control-label {
    text-align: left !important;
    padding-bottom: 4px;
  }
  .form-horizontal .col-sm-2,
  .form-horizontal .col-sm-3,
  .form-horizontal .col-sm-4,
  .form-horizontal .col-sm-8,
  .form-horizontal .col-sm-9,
  .form-horizontal .col-sm-10 {
    float: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Tap targets mínimos 44px */
@media (max-width: 767px) {
  .btn { min-height: 38px; }
  .btn-sm { min-height: 34px; }
  .btn-xs { min-height: 30px; }
  a.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; }
}

/* Hero, banner do landing → padding vertical reduzido */
@media (max-width: 575px) {
  .hero,
  .banner,
  .jumbotron {
    padding: 24px 16px;
  }
  .hero h1, .banner h1, .jumbotron h1 { font-size: 24px; }
  .hero p,  .banner p,  .jumbotron p  { font-size: 14px; }
}

/* Top bar mobile com brand + burger button + lang/currency dropdowns */
@media (max-width: 767px) {
  .navbar-mobile,
  .topbar-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
  }
  .navbar-mobile .brand,
  .topbar-mobile .brand { font-size: 18px; font-weight: 600; }
  .burger-btn {
    background: transparent; border: 0;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
  }
}

/* Footer — links que estouravam em coluna */
@media (max-width: 575px) {
  footer .col-md-3,
  footer .col-md-4 { width: 100%; margin-bottom: 16px; }
  footer ul { padding-left: 0; list-style: none; }
}

/* Nunca scroll horizontal de página (overflow-x escondido em html/body) */
html, body { overflow-x: hidden; max-width: 100vw; }
