/**
 * Mobile navigation drawer – premium compact redesign
 */

body.mobile-drawer-open {
  overflow: hidden;
  touch-action: none;
}

.body-overlay.apply {
  z-index: 999999;
  background: rgba(4, 10, 24, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tpoffcanvas-area {
  position: relative;
  z-index: 1000000;
}

.tpoffcanvas {
  width: min(86vw, 380px) !important;
  max-width: 380px !important;
  padding: 18px 16px 20px !important;
  right: -100%;
  background: linear-gradient(180deg, #0c224f 0%, #071a42 52%, #061530 100%) !important;
  background-image: none !important;
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.42), inset 1px 0 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scrollbar-width: none;
}

.tpoffcanvas::-webkit-scrollbar {
  display: none;
}

.tpoffcanvas.opened {
  right: 0;
  opacity: 1;
  visibility: visible;
}

/* Header */
.tpoffcanvas__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.tpoffcanvas .tpoffcanvas__logo {
  margin-bottom: 0;
  padding-top: 2px;
  flex: 1;
  min-width: 0;
}

.tpoffcanvas .tpoffcanvas__logo img {
  width: 132px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.tpoffcanvas .tpoffcanvas__close-btn {
  flex-shrink: 0;
}

.tpoffcanvas .tpoffcanvas__close-btn button {
  position: static;
  width: 34px;
  height: 34px;
  padding: 0;
  line-height: 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tpoffcanvas .tpoffcanvas__close-btn button i {
  font-size: 15px;
}

.tpoffcanvas .tpoffcanvas__close-btn button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Scrollable body – only when needed */
.mobile-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.mobile-drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer-nav li {
  margin: 0;
}

.mobile-drawer-nav__link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mobile-drawer-nav__link i {
  width: 22px;
  flex-shrink: 0;
  text-align: center;
  font-size: 16px;
  color: rgba(186, 215, 255, 0.88);
  transition: color 0.2s ease;
}

.mobile-drawer-nav__link span {
  flex: 1;
  min-width: 0;
}

.mobile-drawer-nav__link:hover,
.mobile-drawer-nav__link:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mobile-drawer-nav__link.nav-active {
  background: rgba(255, 179, 2, 0.12);
  border-color: rgba(255, 179, 2, 0.28);
  color: #ffd055;
  box-shadow: inset 3px 0 0 #ffb302;
}

.mobile-drawer-nav__link.nav-active i {
  color: #ffb302;
}

/* Footer */
.mobile-drawer__footer {
  flex-shrink: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #25d366 0%, #128c7e 55%, #0d7a6f 100%);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.mobile-drawer-cta i {
  font-size: 18px;
  flex-shrink: 0;
}

.mobile-drawer-cta:hover,
.mobile-drawer-cta:focus-visible {
  color: #fff !important;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.mobile-drawer__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.mobile-drawer__trust li {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(186, 215, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.mobile-drawer__trust li:last-child:nth-child(odd) {
  flex-basis: 100%;
}

.mobile-drawer__note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

@media (max-width: 767px) {
  .tpoffcanvas {
    padding: 16px 14px 18px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpoffcanvas,
  .body-overlay.apply,
  .mobile-drawer-nav__link,
  .mobile-drawer-cta,
  .tpoffcanvas .tpoffcanvas__close-btn button {
    transition: none;
  }

  .mobile-drawer-cta:hover,
  .mobile-drawer-cta:focus-visible {
    transform: none;
  }
}
