/* =========================================================
   BUY ENGINE MODAL (qtbe2)
   - Legal / refund modal only
   ========================================================= */

.qtbe2-modal,
.qtbe2-modal *{
  box-sizing: border-box;
}

.qtbe2-modal input,
.qtbe2-modal button{
  font: inherit;
}

.qtbe2-modal{
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
  isolation: isolate;
}

.qtbe2-modal.is-open{
  display: block;
}

.qtbe2-modal__backdrop{
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(2,6,23,.58);
  backdrop-filter: blur(7px);
}

.qtbe2-modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;

  width: min(980px, calc(100% - 22px));
  height: min(720px, calc(100svh - 22px));
  max-height: calc(100svh - 22px);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  background: rgba(255,255,255,.94);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;
  box-shadow: 0 34px 110px rgba(2,6,23,.38);
}

.qtbe2-modal__head{
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15,23,42,.10);
  background:
    radial-gradient(900px 220px at 20% 0%, rgba(255,255,255,.70), transparent 55%),
    radial-gradient(900px 220px at 85% 0%, var(--be-accent-soft2), transparent 55%),
    rgba(255,255,255,.78);
}

.qtbe2-modal__title{
  font-weight: 950;
  letter-spacing: -0.01em;
  color: var(--be-ink);
}

.qtbe2-modal__x{
  appearance: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.90);
  color: var(--be-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.qtbe2-modal__x:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(2,6,23,.12);
}

.qtbe2-modal__x:focus-visible{
  outline: none;
  box-shadow: var(--be-focus), 0 12px 26px rgba(2,6,23,.12);
}

.qtbe2-modal__body{
  flex: 1;
  overflow: hidden;
  padding: 14px 16px 18px;
  background: rgba(255,255,255,.86);
}

.qtbe2-split{
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

.qtbe2-pane{
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  border: 1px solid rgba(148,163,184,.22);
  border-radius: 16px;

  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.74));
  box-shadow: var(--be-shadow-soft);
  backdrop-filter: blur(10px) saturate(155%);
}

.qtbe2-paneHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.72));
}

.qtbe2-paneTitle{
  max-width: calc(100% - 120px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  font-weight: 950;
  font-size: 13.6px;
  line-height: 1.2;
  letter-spacing: -.2px;
  color: var(--be-ink);
}

.qtbe2-paneHint{
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15,23,42,.55);
}

.qtbe2-paneBody{
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;

  padding: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13.7px;
  line-height: 1.66;
}

.qtbe2-paneBody h1,
.qtbe2-paneBody h2,
.qtbe2-paneBody h3{
  margin: 14px 0 8px;
  font-weight: 950;
  letter-spacing: -.2px;
  line-height: 1.25;
}

.qtbe2-paneBody h2{
  font-size: 14.6px;
}

.qtbe2-paneBody h3{
  font-size: 13.9px;
}

.qtbe2-paneBody p{
  margin: 0 0 10px;
}

.qtbe2-paneBody p:last-child{
  margin-bottom: 0;
}

.qtbe2-paneBody ul,
.qtbe2-paneBody ol{
  margin: 10px 0 10px 18px;
  padding: 0;
}

.qtbe2-paneBody li{
  margin: 6px 0;
  color: rgba(15,23,42,.92);
}

.qtbe2-paneBody hr{
  border: 0;
  height: 1px;
  margin: 14px 0;
  background: linear-gradient(to right, transparent, rgba(15,23,42,.14), transparent);
}

.qtbe2-modal__foot{
  z-index: 3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 16px;
  border-top: 1px solid rgba(15,23,42,.10);

  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.96));
  backdrop-filter: blur(8px);
}

.qtbe2-modal__ok{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;

  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--be-muted);
}

.qtbe2-modal__ok input{
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--be-accent);
}

.qtbe2-modal__btn{
  appearance: none;
  min-width: 130px;
  padding: 11px 14px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;

  color: #fff;
  font-weight: 950;

  background-color: var(--be-accent);
  background-image:
    radial-gradient(180px 80px at 30% 20%, rgba(255,255,255,.18), rgba(255,255,255,0) 58%),
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0));
  box-shadow: 0 18px 44px rgba(2,6,23,.20);

  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.qtbe2-modal__btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 24px 60px rgba(2,6,23,.24);
  filter: saturate(1.06);
}

.qtbe2-modal__btn:active{
  transform: translateY(0);
  box-shadow: 0 16px 42px rgba(2,6,23,.20);
}

.qtbe2-modal__btn:focus-visible{
  outline: none;
  box-shadow: var(--be-focus), 0 24px 60px rgba(2,6,23,.24);
}

@media (min-width:992px){
  .qtbe2-split{
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

@media (max-width:560px){
  .qtbe2-modal__panel{
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: 10px;
    width: auto;
    height: auto;
    max-height: calc(100svh - 20px);
    transform: none;
    border-radius: 18px;
  }

  .qtbe2-modal__head{
    padding: 12px;
  }

  .qtbe2-modal__body{
    padding: 12px;
  }

  .qtbe2-modal__foot{
    padding: 10px 12px;
  }

  .qtbe2-modal__btn{
    min-width: 110px;
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion:reduce){
  .qtbe2-modal__btn,
  .qtbe2-modal__x{
    transition: none !important;
  }
}