/*! Satın alma modalı — style.css'ten ayrıldı.
    Modal ilk boyamada hiçbir sayfada görünmüyor (yalnızca tıklayınca açılıyor),
    bu yüzden render'ı engellemeden yükleniyor: includes/buy_modal.php.
    Karma seçiciler (.bm-check + .ui-check gibi) style.css'te KALDI. */
/* ============ SATIN ALMA MODALI ============ */
.bm-overlay {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 36px 16px; overflow-y: auto;
  background: rgba(12, 16, 28, 0);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s ease, visibility .28s, background .28s;
}
.bm-overlay.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  background: rgba(12, 16, 28, .55);
  backdrop-filter: blur(6px);
}
.bm-box {
  width: 100%; max-width: 720px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
  overflow: hidden;
  transform: translateY(18px) scale(.975);
  opacity: 0;
  transition: transform .34s cubic-bezier(.22,1,.36,1), opacity .28s ease;
  margin: auto;
}
.bm-overlay.open .bm-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.bm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}
.bm-head h3 {
  font-size: 14px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text);
}
.bm-close {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--text-muted); display: grid; place-items: center;
  transition: .2s;
}
.bm-close:hover { color: #fff; background: var(--primary); border-color: var(--primary); transform: rotate(90deg); }
.bm-loading { display: grid; place-items: center; min-height: 240px; }
.bm-loading[hidden] { display: none !important; }
.bm-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: bmSpin .65s linear infinite;
}
.bm-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bm-body[hidden] { display: none !important; }
.bm-summary {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.bm-pay-col { min-width: 0; }
.bm-id-block { margin: 0; }
.bm-id-head { margin-bottom: 8px; }
.bm-id-head label { font-weight: 800; font-size: 13px; color: var(--text); }
.bm-sublabel { display: block; font-weight: 700; font-size: 13px; margin: 12px 0 8px; color: var(--text); }
.bm-input {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--input-bg); color: var(--text); font-size: 14px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.bm-input:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.bm-check-terms { margin: 0; font-size: 12.5px; cursor: default; }
.bm-check-hit {
  display: flex; align-items: flex-start; cursor: pointer; flex: none;
  position: relative;
}
.bm-err { color: var(--red); font-size: 12.5px; min-height: 0; margin-top: 6px; font-weight: 600; }
.bm-pay-note {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(148, 163, 184, .10);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px; padding: 9px 11px;
  font-size: 12.5px; line-height: 1.45; color: var(--muted);
}
.bm-pay-note i { margin-top: 2px; opacity: .8; }
.bm-pay-title {
  font-size: 11px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.bm-pay-list { display: flex; flex-direction: column; gap: 8px; }
.bm-pay {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 12px 13px;
  border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--text);
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.bm-pay:hover { border-color: rgba(var(--primary-rgb),.4); transform: translateY(-1px); }
.bm-pay.locked {
  opacity: .55;
  cursor: pointer;
}
.bm-pay.locked:hover { border-color: var(--border); transform: none; }
.bm-pay.locked .bm-pay-txt small { color: var(--primary); font-weight: 700; }
.bm-pay.locked .bm-pay-check { opacity: .35; }
.bm-pay.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 6px 18px rgba(var(--primary-rgb),.12);
}
.bm-pay-ico {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-soft); color: var(--primary); font-size: 14px; flex-shrink: 0;
  transition: .18s;
}
.bm-pay.active .bm-pay-ico { background: var(--primary); color: #fff; }
.bm-pay-txt { flex: 1; min-width: 0; }
.bm-pay-txt b { display: block; font-size: 14px; font-weight: 800; }
.bm-pay-txt small { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.bm-pay-brands {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px;
}
.bm-brand {
  display: block; width: auto; height: auto;
  background: none; border: none; box-shadow: none; padding: 0;
  object-fit: contain;
}
.bm-brand-visa { height: 22px; width: auto; }
.bm-brand-mc { height: 18px; width: auto; }
.bm-brand-troy { height: 18px; width: auto; }
.bm-pay-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid; place-items: center; color: transparent; font-size: 10px;
  transition: .18s; flex-shrink: 0; background: var(--card);
}
.bm-pay.active .bm-pay-check {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.bm-prod {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.bm-checkout-foot {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 0;
}
.bm-social{
  display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;
  padding:8px 10px;
  border-radius:11px;
  background:rgba(22,163,74,.08);
  border:1px solid rgba(22,163,74,.2);
  color:var(--text);
  text-align:center;
}
.bm-social > i{color:#4ade80;font-size:13px;line-height:1;}
.bm-social b{font-size:12.5px;font-weight:800;letter-spacing:-.015em;color:var(--text);}
html[data-theme="light"] .bm-social{background:rgba(22,163,74,.07);border-color:rgba(22,163,74,.18);}
html[data-theme="light"] .bm-social > i{color:#16a34a;}
@media (max-width:420px){
.bm-social{gap:6px;padding:7px 9px;}

  .bm-social b{font-size:12px;}
}
.bm-thumb {
  width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0;
  overflow: hidden; display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 11px; text-align: center;
  background: var(--primary);
}
.bm-thumb span { padding: 4px; line-height: 1.05; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.bm-pname { font-weight: 800; font-size: 14px; line-height: 1.3; color: var(--text); }
.bm-pinfo { flex: 1; min-width: 0; }
.bm-pmeta {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 5px; margin-top: 6px; font-size: 12px; color: var(--text-muted); font-weight: 600;
}
.bm-server-title {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 100%;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb),.1);
  border: 1px solid rgba(var(--primary-rgb),.22);
  line-height: 1.25;
}
.bm-server-flag {
  flex-shrink: 0; width: 16px; height: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1);
  line-height: 1;
}
.bm-server-flag svg { display: block; width: 16px; height: 12px; }
.bm-server-flag i { font-size: 11px; color: var(--primary); }
.bm-flag-global {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(var(--primary-rgb),.15); box-shadow: none;
}
.bm-server-txt {
  font-size: 12px; font-weight: 700; letter-spacing: .005em;
  color: var(--text);
}
.bm-server-ok {
  display: inline-flex; align-items: center; gap: 5px; margin: 0;
  font-size: 12.5px; font-weight: 600; color: #34d399; line-height: 1.2;
}
.bm-server-ok i { font-size: 12px; color: #22c55e; }
.bm-prices { display: flex; flex-direction: column; gap: 6px; }
.bm-prow {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--text-muted); font-weight: 600;
}
.bm-prow b { color: var(--text); font-weight: 800; }
.bm-accent { color: var(--primary) !important; font-size: 15px; }
.bm-strike { text-decoration: line-through; font-weight: 700 !important; color: var(--text-muted) !important; }
.bm-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0; font-size: 13px; font-weight: 700; color: var(--text-muted);
}
.bm-total strong {
  font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -.02em;
}
.bm-actions { display: flex; flex-direction: column; gap: 8px; }
.bm-terms-foot { padding: 0; border: none; }
@media (max-width: 760px){
.bm-overlay {
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    align-items: center;
    overflow: hidden;
  }

  .bm-box {
    max-width: 100%; width: 100%;
    border-radius: 20px;
    max-height: min(92dvh, calc(100dvh - 32px - env(safe-area-inset-bottom, 0px)));
    display: flex; flex-direction: column;
    min-height: 0;
    margin: 0;
  }

  .bm-head { padding: 14px 16px; flex-shrink: 0; }

  .bm-head h3 { font-size: 13px; letter-spacing: .05em; }

  .bm-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 16px 0;
    gap: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .bm-summary { padding: 12px; border-radius: 12px; }

  .bm-prod { margin-bottom: 10px; padding-bottom: 10px; gap: 10px; }

  .bm-thumb { width: 48px; height: 48px; border-radius: 10px; }

  .bm-pname { font-size: 13.5px; }

  .bm-pmeta { font-size: 11.5px; }

  .bm-prices { gap: 5px; }

  .bm-prow { font-size: 12.5px; }

  .bm-total strong { font-size: 18px; }

  .bm-pay { padding: 12px; border-radius: 12px; }

  .bm-pay-ico { width: 36px; height: 36px; }

  .bm-pay-title { margin-bottom: 8px; }

  .bm-actions { gap: 8px; }

  /* Ödemeye Git: üstteyken modalın altında durur, kendi yerine gelince akışta kalır. */
  .bm-body > *,
  .bm-checkout-foot > *,
  .bm-actions > * { flex-shrink: 0; }
  .bm-checkout-foot,
  .bm-actions { display: contents; }
  .bm-buy {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    z-index: 5;
    flex-shrink: 0;
    box-shadow: 0 -10px 0 0 var(--card);
  }
  .bm-cart { margin-bottom: 14px; }

  .bm-check-terms { font-size: 12px; gap: 8px; }

  .bm-id-btn { padding: 12px; border-radius: 12px; }

  .bm-id-btn-ico { width: 36px; height: 36px; border-radius: 10px; }

  .bm-overlay.open .bm-box {
    animation: none;
  }
}
.gm-head .bm-close {
  position: absolute; top: 14px; right: 12px;
}
.gm-field .bm-input {
  height: 46px; padding: 0 14px;
  border-radius: 11px; font-size: 14px;
}
/* ID bulma rehberi modalı */
.bm-guide-link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 12px; padding: 0; background: none; border: none;
  color: var(--primary); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.bm-guide-link:hover { opacity: .8; text-decoration: underline; }
.bm-guide-link[hidden] { display: none !important; }
.bm-id-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 13px 14px;
  border-radius: 13px; border: 1.5px dashed rgba(var(--primary-rgb),.45);
  background: var(--primary-soft); color: var(--text);
  transition: border-color .18s, background .18s, transform .18s;
  margin-bottom: 4px;
}
.bm-id-btn:hover { border-style: solid; border-color: var(--primary); transform: translateY(-1px); }
.bm-id-btn.filled {
  border-style: solid; border-color: var(--primary);
  background: var(--card);
}
.bm-id-btn-ico {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 15px;
}
.bm-id-btn-txt { flex: 1; min-width: 0; }
.bm-id-btn-txt b { display: block; font-size: 14px; font-weight: 800; }
.bm-id-btn-txt small {
  display: block; margin-top: 2px;
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Ödeme modalı */
.bm-trust{
  display:flex;align-items:stretch;gap:8px;
  margin:0 0 12px;padding:0;
}
.bm-trust-item{
  flex:1;min-width:0;
  display:flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:10px 12px;
  border:1px solid var(--border);
  border-radius:11px;
  background:var(--card-2);
  color:var(--text);
}
.bm-trust-item i{
  width:26px;height:26px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:8px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:12px;line-height:1;flex:0 0 auto;
}
.bm-trust-item b{
  font-size:12.5px;font-weight:800;
  letter-spacing:-.01em;line-height:1.25;text-align:left;
}
.bm-trust-item.gt-speed{background:rgba(var(--primary-rgb),.07);border-color:rgba(var(--primary-rgb),.22);}
.bm-trust-item.gt-pay{background:rgba(59,130,246,.07);border-color:rgba(59,130,246,.22);}
.bm-trust-item.gt-support{background:rgba(124,58,237,.07);border-color:rgba(124,58,237,.22);}
.bm-trust-item.gt-ok{background:rgba(22,163,74,.07);border-color:rgba(22,163,74,.22);}
@media (max-width:820px){
.bm-trust-item b{font-size:12px;}
}
@media (max-width:420px){
.bm-trust{flex-direction:column;gap:7px;}

  .bm-trust-item{justify-content:flex-start;min-height:42px;}

  .bm-trust-item b{font-size:13px;}
}

/* Paket icerigi — bilerek sessiz: dugme gibi durmaz, imlec degismez. */
.bm-pack { margin: 8px 0 0; line-height: 1; }
.bm-pack + .bm-pack { margin-top: 4px; }
.bm-pack-t {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0;
  display: flex; align-items: center; gap: 5px;
  font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .2px; line-height: 1.15;
  color: var(--text-muted); cursor: default; text-align: left;
}
/* Tiklanabilirlik yalnizca uzerine gelince belli olsun. */
.bm-pack-t:hover { cursor: pointer; color: var(--text); }
.bm-pack-ar { font-size: 8px; transition: transform .18s ease; }
.bm-pack-t[aria-expanded="true"] .bm-pack-ar { transform: rotate(90deg); }
.bm-pack-t:focus { outline: none; }
.bm-pack-t:focus-visible { outline: 1px dotted var(--text-muted); outline-offset: 2px; }
.bm-pack-body { margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: var(--text-muted); }
.bm-pack-body[hidden], .bm-pack[hidden] { display: none !important; }
