.btcmd-root,
.btcmd-root *,
.btcmd-root *::before,
.btcmd-root *::after {
  box-sizing: border-box;
}

.btcmd-root {
  display: none;
  font-family: inherit;
  position: relative;
  z-index: 99998;
}

.btcmd-root.btcmd-is-mobile {
  display: block;
}

.btcmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  background: rgba(7, 16, 30, 0.48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.btcmd-bottom-bar {
  position: fixed;
  right: 5px;
  bottom: 0;
  left: 5px;
  z-index: 99999;
  border: 1px solid rgba(8, 37, 66, 0.1);
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 14px 40px rgba(2, 12, 27, 0.22);
  color: #0b1d2d;
  transform: translateY(0);
  transition: transform 240ms ease, opacity 240ms ease;
}

.btcmd-bottom-bar__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 12px 12px 12px 18px;
}

.btcmd-bottom-bar__text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.btcmd-bottom-bar__title {
  overflow: hidden;
  color: #0b1d2d;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btcmd-bottom-bar__subtitle {
  overflow: hidden;
  color: #6f7f8d;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btcmd-bottom-bar__button {
  flex: 0 0 auto;
  min-width: 126px;
  min-height: 46px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #082542;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btcmd-bottom-bar__button:focus-visible,
.btcmd-close:focus-visible,
.btcmd-backdrop:focus-visible {
  outline: 3px solid rgba(125, 213, 246, 0.95);
  outline-offset: 3px;
}

.btcmd-bottom-bar__button:active {
  transform: scale(0.98);
}

.btcmd-drawer {
  position: fixed;
  right: 12px;
  bottom: 0;
  left: 12px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  width: auto;
  max-height: min(88vh, 760px);
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -24px 64px rgba(3, 16, 32, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 105%, 0);
  transition: transform 320ms cubic-bezier(0.2, 0.85, 0.26, 1), opacity 240ms ease, visibility 240ms ease;
  will-change: transform;
}

.btcmd-open .btcmd-backdrop {
  opacity: 1;
  visibility: visible;
}

.btcmd-open .btcmd-drawer {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.btcmd-open .btcmd-bottom-bar {
  transform: translateY(calc(100% + 24px));
}

.btcmd-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(8, 37, 66, 0.1);
  border-radius: 999px;
  background: #f4f8fb;
  color: #082542;
  font: inherit;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.btcmd-handle {
  width: 46px;
  height: 5px;
  margin: 10px auto 8px;
  border-radius: 999px;
  background: rgba(8, 37, 66, 0.18);
}

.btcmd-drawer__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 8px 58px 16px 16px;
  border-bottom: 1px solid rgba(8, 37, 66, 0.08);
}

.btcmd-drawer__image {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 12px;
  object-fit: cover;
  background: #eef5fa;
}

.btcmd-drawer__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.btcmd-drawer__eyebrow {
  color: #73c7ee;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.btcmd-drawer__title {
  display: block;
  margin: 0;
  overflow: hidden;
  color: #0b1d2d;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btcmd-drawer__subtitle {
  margin: 0;
  overflow: hidden;
  color: #536271;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btcmd-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(88vh - 104px);
  padding: 14px 14px 18px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.btcmd-drawer__body > .btcmd-source--in-drawer {
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  opacity: 1 !important;
  transform: none !important;
}

.btcmd-drawer__body > .btcmd-source--in-drawer.brx-hide-mobile,
.btcmd-drawer__body > .btcmd-source--in-drawer.hide-mobile,
.btcmd-drawer__body > .btcmd-source--in-drawer.mobile-hidden {
  display: block !important;
}

html.btcmd-scroll-locked,
body.btcmd-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

body.admin-bar .btcmd-drawer {
  max-height: calc(88vh - 32px);
}

@media (prefers-reduced-motion: reduce) {
  .btcmd-backdrop,
  .btcmd-bottom-bar,
  .btcmd-bottom-bar__button,
  .btcmd-drawer {
    transition: none;
  }
}

@media (max-width: 390px) {
  .btcmd-bottom-bar__content {
    gap: 10px;
    padding-left: 14px;
  }

  .btcmd-bottom-bar__title {
    font-size: 18px;
  }

  .btcmd-bottom-bar__button {
    min-width: 112px;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 12px;
  }

  .btcmd-drawer__body {
    padding-right: 10px;
    padding-left: 10px;
  }
}
