/* Bazı bileşenler DesignBookmark motion (MIT) uyarlamasıdır — https://designbookmark.com/motion */
/* WebTibo hareket bileşenleri — assets/js/motion.js ile birlikte. html.mo yalnız hareket açıkken eklenir. */
:root { --mo-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* 1) Mıknatıs */
html.mo .mo-mag { transition: transform .35s var(--mo-spring); will-change: transform; }

/* 6) Basma yayı */
@media (prefers-reduced-motion: no-preference) {
  .btn, .lp-b, .icon-btn, .app button:not([disabled]) { transition: transform .25s var(--mo-spring); }
  .btn:active, .lp-b:active, .icon-btn:active, .app button:not([disabled]):active { transform: scale(.96); }
}

/* 2) Sepet sayacı */
@keyframes mo-bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 65% { transform: scale(.88); } 100% { transform: scale(1); } }
.mo-bump { animation: mo-bump .5s var(--mo-spring); }

/* 3) Kayan sekme göstergesi */
.mo-tabs { position: relative; isolation: isolate; }
.mo-tabs > .mo-pill { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 8px; background: color-mix(in srgb, currentColor 9%, transparent); pointer-events: none; transition: transform .38s var(--mo-spring), width .38s var(--mo-spring), height .3s ease; }

/* 4) Kayan bağlantı yazısı */
.mo-roll { display: inline-flex; overflow: hidden; vertical-align: bottom; }
.mo-roll > span { position: relative; display: inline-block; transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.mo-roll > span::after { content: attr(data-t); position: absolute; left: 0; top: 100%; }
.mo-roll:hover > span, .mo-roll:focus-visible > span { transform: translateY(-100%); }

/* 5) Bildirim zili */
@keyframes mo-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
.mo-ring svg { transform-origin: 50% 10%; animation: mo-ring .9s ease-in-out; }

/* Admin: anahtar görünümlü onay kutuları (label.ck içindekiler) */
.app label.ck input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 34px !important; height: 20px !important; min-width: 34px; padding: 0 !important; border: 0 !important; margin: 0 8px 0 0; border-radius: 99px; background: color-mix(in srgb, currentColor 22%, transparent); position: relative; cursor: pointer; vertical-align: middle; transition: background .25s ease; }
.app label.ck input[type=checkbox]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .35s var(--mo-spring); }
.app label.ck input[type=checkbox]:checked { background: var(--acc, #16a34a); }
.app label.ck input[type=checkbox]:checked::before { transform: translateX(14px); }
.app label.ck input[type=checkbox]:focus-visible { outline: 2px solid var(--acc, #16a34a); outline-offset: 2px; }
.app label.ck input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }

/* 7) Basılı tutarak sil */
.mo-hold { position: relative; overflow: hidden; isolation: isolate; }
.mo-hold::after { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, #dc2626 28%, transparent); transform: scaleX(0); transform-origin: left; }
.mo-hold.is-holding::after { transform: scaleX(1); transition: transform .9s linear; }
@keyframes mo-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.mo-shake { animation: mo-shake .32s ease; }

/* Şifre gücü */
.mo-pw { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 4px; align-items: center; margin: 6px 0 2px; font-size: 12px; }
.mo-pw i { height: 4px; border-radius: 4px; background: color-mix(in srgb, currentColor 15%, transparent); transition: background .3s ease, transform .3s var(--mo-spring); }
.mo-pw span { margin-left: 6px; opacity: .75; min-width: 62px; }
.mo-pw[data-s="0"] i:nth-child(-n+1), .mo-pw[data-s="1"] i:nth-child(-n+1) { background: #dc2626; }
.mo-pw[data-s="2"] i:nth-child(-n+2) { background: #f59e0b; }
.mo-pw[data-s="3"] i:nth-child(-n+3) { background: #22c55e; }
.mo-pw[data-s="4"] i:nth-child(-n+4) { background: #16a34a; }


/* OTP kutuları */
.mo-otp { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 380px; }
.mo-otp > b { display: grid; place-items: center; height: 56px; border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 10px; font: 700 1.5rem/1 var(--mono, ui-monospace, monospace); transition: border-color .2s, transform .3s var(--mo-spring), box-shadow .2s; }
.mo-otp > b.on { border-color: var(--ac, var(--primary, currentColor)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac, currentColor) 18%, transparent); }
.mo-otp > b.f { transform: scale(1.04); }
.mo-otp.ok > b { border-color: var(--ok, #16a34a); }
.mo-otp > .mo-otp-in { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; padding: 0 !important; border: 0 !important; caret-color: transparent; font-size: 16px !important; letter-spacing: 0 !important; cursor: text; }
@media (prefers-reduced-motion: reduce) { .mo-otp > b { transition: none; } .mo-otp > b.f { transform: none; } }
@media (prefers-reduced-motion: no-preference) { .mo-otp.ok > b { animation: mo-bump .45s var(--mo-spring); } }

/* Karakter sınırı */
.mo-lim { display: block; width: 100%; justify-self: stretch; align-self: start; text-align: right; font-size: 12px; opacity: .6; margin-top: 4px; font-variant-numeric: tabular-nums; }
.mo-lim[data-w="1"] { color: #f59e0b; opacity: 1; }
.mo-lim[data-w="2"] { color: #dc2626; opacity: 1; }

/* Kopyala: tik + yay */
.mo-ok::before { content: "✓ "; color: var(--ok, #16a34a); }
.fx-copy.mo-ok::before, .mo-ok:has(svg)::before { content: none; }
@keyframes mo-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) { .mo-ok { animation: mo-pop .4s var(--mo-spring); } }

/* Etiket girişi */
.mo-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); border-radius: 8px; cursor: text; }
.mo-tags:focus-within { border-color: var(--ac, var(--primary, currentColor)); }
.mo-tags > input { flex: 1; min-width: 80px; border: 0 !important; padding: 4px !important; background: none !important; box-shadow: none !important; outline: 0; }
.mo-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 99px; font-size: 13px; background: color-mix(in srgb, currentColor 10%, transparent); }
.mo-tag > button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 5px; border-radius: 50%; font-size: 15px; line-height: 1.2; opacity: .6; }
.mo-tag > button:hover, .mo-tag > button:focus-visible { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .mo-tag { animation: mo-pop .35s var(--mo-spring); } }

/* Sipariş adım göstergesi (.sx-steps): tamamlanan bağlantı dolar, aktif adım yaylanır */
.sx-steps li.done + li::before { background: var(--ok, #16a34a); }
.sx-steps li.done i { border-color: var(--ok, #16a34a); color: var(--ok, #16a34a); }
@keyframes mo-step { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes mo-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .sx-steps li.on i { animation: mo-step .5s var(--mo-spring) .15s both; }
  .sx-steps li.done + li::before { transform-origin: left; animation: mo-line .5s ease both; }
}


/* Eğilen fiyat kartı + parlama */
.mo-tilt { transition: transform .4s var(--mo-spring); will-change: transform; }
.mo-tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, currentColor 9%, transparent), transparent 55%); }
.mo-tilt:hover::after { opacity: 1; }
.plans .plan.mo-tilt, .lp-pc.mo-tilt { position: relative; }

/* Sepete ekle patlaması */
.mo-burst { position: fixed; z-index: 9999; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--ac, #e5322d); pointer-events: none; animation: mo-burst .6s cubic-bezier(.2, .8, .2, 1) forwards; }
.mo-burst:nth-child(odd) { background: var(--ok, #16a34a); }
@keyframes mo-burst { to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }

/* Tema düğmesi */
@keyframes mo-spin { 0% { transform: rotate(0) scale(.85); } 100% { transform: rotate(360deg) scale(1); } }
.mo-spin svg { animation: mo-spin .6s var(--mo-spring); }

/* İçindekiler aktif başlık */
.pt-toc a { transition: color .2s, padding .3s var(--mo-spring); }
.pt-toc a.mo-cur { color: var(--ac, currentColor); font-weight: 600; padding-left: 4px; }
