/* DPBOSS RATAN USER APP - MOBILE FIX V2
   Scoped only to /user/ pages
*/

html,
body {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box !important;
}

body {
  position: relative !important;
}

img,
svg,
video,
canvas {
  max-width: 100% !important;
  height: auto;
}

/* Never allow desktop fixed widths inside user app */
body * {
  min-width: 0;
}

.container,
.dashboard-container,
.auth-container,
.main-container,
.content,
.wrapper,
.page-wrapper,
.app-wrapper,
.user-container,
section,
main {
  width: 100% !important;
  max-width: 100% !important;
}

/* ===========================
   LOGIN / REGISTER
   =========================== */

.auth-card {
  width: calc(100% - 24px) !important;
  max-width: 390px !important;
  min-width: 0 !important;
  margin: 24px auto !important;
  padding: 22px 16px !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  position: relative !important;
}

.auth-card form {
  width: 100% !important;
  max-width: 100% !important;
}

.auth-card input,
.auth-card select,
.auth-card textarea,
.form-control {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 48px;
  font-size: 16px !important;
}

.auth-card button,
.btn-auth {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.auth-title,
.auth-sub,
.auth-footer {
  max-width: 100% !important;
  overflow-wrap: anywhere;
}

/* ===========================
   APP HEADER
   =========================== */

header,
.header,
.top-header,
.app-header,
.navbar {
  width: 100% !important;
  max-width: 100vw !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

header .container,
.header .container,
.navbar .container {
  width: 100% !important;
  max-width: 100% !important;
}

/* ===========================
   DASHBOARD
   =========================== */

.dashboard-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 12px !important;
}

.dashboard-container > * {
  max-width: 100% !important;
}

.card,
.market-card,
.dashboard-card,
.panel,
.box {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

table {
  max-width: 100% !important;
}

.table-responsive,
.table-wrapper {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* ===========================
   USER NAV
   =========================== */

.nav-links,
.user-nav,
.dashboard-nav {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-link {
  flex: 0 0 auto;
}

/* ===========================
   BOTTOM APP NAV
   =========================== */

.dpr-bottom-nav,
.bottom-nav,
.mobile-bottom-nav {
  width: 100% !important;
  max-width: 100vw !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
}

/* ===========================
   SMALL MOBILE
   =========================== */

@media (max-width: 480px) {

  body {
    font-size: 14px !important;
  }

  .auth-card {
    width: calc(100% - 20px) !important;
    margin: 16px auto !important;
    padding: 20px 14px !important;
    border-radius: 18px !important;
  }

  .auth-title {
    font-size: 24px !important;
    line-height: 1.15 !important;
    text-align: center !important;
  }

  .auth-sub {
    text-align: center !important;
  }

  .dashboard-container {
    padding: 10px !important;
  }

  h1 {
    font-size: 24px !important;
  }

  h2 {
    font-size: 20px !important;
  }

  button,
  .btn,
  .btn-auth,
  input {
    font-size: 16px !important;
  }
}

/* ===========================
   VERY SMALL MOBILE
   =========================== */

@media (max-width: 360px) {

  .auth-card {
    width: calc(100% - 14px) !important;
    padding: 16px 12px !important;
  }

  .dashboard-container {
    padding: 7px !important;
  }

  .auth-title {
    font-size: 21px !important;
  }
}

/* ===========================
   TABLET / LARGE MOBILE
   =========================== */

@media (min-width: 481px) and (max-width: 900px) {

  .auth-card {
    max-width: 420px !important;
  }

  .dashboard-container {
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Kill accidental desktop positioning on user pages */
@media (max-width: 900px) {

  .auth-card,
  .dashboard-container,
  .main-container,
  .content,
  main {
    float: none !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
  }
}
