/* BMC Small Business Reconcile - Phone Browser Responsive Layer */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

img, video, iframe {
  max-width: 100%;
}

@media (max-width: 1100px) {
  body {
    font-size: 16px;
    overflow-x: hidden;
  }

  #root,
  #root > div,
  .app,
  .layout {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    overflow-x: hidden !important;
  }

  aside,
  .sidebar {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    padding: 14px !important;
  }

  aside nav,
  .sidebar nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  aside button,
  .sidebar button,
  aside a,
  .sidebar a {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 14px !important;
    white-space: normal !important;
  }

  main,
  .main,
  .content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding: 14px !important;
    overflow-x: hidden !important;
  }

  header,
  .hero {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px !important;
    margin: 0 0 14px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  header h1,
  header h2,
  .hero h1,
  .hero h2 {
    font-size: 24px !important;
    line-height: 1.18 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  header p,
  .hero p {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }

  header select,
  header button,
  .hero select,
  .hero button {
    width: 100% !important;
    margin-top: 8px !important;
  }

  .grid,
  .cards,
  .row {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  .card,
  section.card,
  .panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
    padding: 16px !important;
    overflow-x: auto !important;
    border-radius: 16px !important;
  }

  .stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  input,
  select,
  textarea,
  button {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
    font-size: 16px !important;
  }

  .wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
  }

  .wrap .grid {
    display: block !important;
  }

  .wrap .card {
    display: block !important;
    width: 100% !important;
    margin-bottom: 14px !important;
  }

  .card div[style*="grid-template-columns"] {
    display: block !important;
  }

  .card ol,
  .card ul {
    padding-left: 20px !important;
  }

  .card li {
    margin-bottom: 7px !important;
  }

  .card a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 8px !important;
  }

  .safe,
  .readnow {
    display: block !important;
    width: 100% !important;
    margin-bottom: 14px !important;
  }

  .readnow-badge {
    margin-bottom: 10px !important;
  }

  table {
    min-width: 720px !important;
    width: 720px !important;
  }

  th,
  td {
    font-size: 13px !important;
    padding: 8px !important;
  }

  #bmc-bank-integrations-link,
  #bmc-banking-link {
    display: none !important;
  }

  #bmc-session-bar {
    position: static !important;
    width: auto !important;
    margin: 10px 14px !important;
    border-radius: 14px !important;
    justify-content: space-between !important;
  }
}

@media (max-width: 480px) {
  aside nav,
  .sidebar nav {
    grid-template-columns: 1fr !important;
  }

  header h1,
  header h2,
  .hero h1,
  .hero h2 {
    font-size: 22px !important;
  }

  .stats {
    grid-template-columns: 1fr !important;
  }

  .card,
  section.card {
    padding: 14px !important;
  }

  table {
    min-width: 660px !important;
    width: 660px !important;
  }
}

/* Login mobile repair - force phone/browser login to one column */
@media (max-width: 1200px) {
  body {
    min-width: 0 !important;
  }

  .wrap,
  .page {
    width: 100% !important;
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .wrap .grid,
  .page .grid,
  .grid {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  .wrap .card,
  .page .card,
  .card {
    width: 100% !important;
    max-width: 100% !important;
  }
}
