/* Sabit iletişim çubuğu + yukarı çık butonu (core/functions/features/sb_float_bar.php). */

/* ── İletişim çubuğu: altta ortada tema renginde kapsül ── */
.sb-fab { --fab-theme: var(--sb-general-color, #1e40af); position: fixed; left: 50%; bottom: 20px; z-index: 990; transform: translate(-50%, 0); transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.sb-fab-spacer { height: 84px; } /* sayfa sonu (telif satırı) çubuğun altında kalmasın */
.sb-fab.is-reveal:not(.is-visible) { transform: translate(-50%, calc(100% + 32px)); opacity: 0; pointer-events: none; }
.sb-fab-bar { display: flex; gap: 8px; padding: 9px; border-radius: 999px; background: linear-gradient(135deg, var(--fab-theme), color-mix(in srgb, var(--fab-theme) 62%, #000)); box-shadow: 0 22px 44px -16px color-mix(in srgb, var(--fab-theme) 70%, #000), inset 0 0 0 1px #ffffff1f; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.sb-fab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px; border-radius: 999px; color: #fff !important; font: 600 13.5px/1 var(--sb-font-body-family, inherit); white-space: nowrap; text-decoration: none; transition: transform .2s, filter .2s, background .2s, box-shadow .2s; }
.sb-fab-btn i { font-size: 15px; }
.sb-fab-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.sb-fab-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sb-fab-btn.is-call { box-shadow: inset 0 0 0 1px #ffffff47; }
.sb-fab-btn.is-call:hover { background: #ffffff1a; }
.sb-fab-btn.is-wa { background: #25d366; box-shadow: 0 8px 18px -10px #25d366; }
/* İletişim butonu: renk seçilmediyse beyaz zemin + tema rengi yazı; seçildiyse o renkte geçiş */
.sb-fab-btn.is-cta { background: #fff; color: var(--fab-theme) !important; box-shadow: 0 8px 18px -10px #0006; }
.sb-fab[style*="--fab-cta"] .sb-fab-btn.is-cta { background: linear-gradient(135deg, var(--fab-cta), color-mix(in srgb, var(--fab-cta) 80%, #fff)); color: #fff !important; box-shadow: 0 8px 18px -10px var(--fab-cta); }

/* ── Yukarı çık: kaydırma ilerlemesi halkada ── */
.sb-totop { --p: 0; position: fixed; right: 20px; bottom: 20px; z-index: 990; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--sb-general-color, #1e40af), color-mix(in srgb, var(--sb-general-color, #1e40af) 62%, #000)); color: #fff; box-shadow: 0 16px 32px -14px color-mix(in srgb, var(--sb-general-color, #1e40af) 70%, #000); cursor: pointer; opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .3s, transform .3s, background .2s; }
.sb-totop.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.sb-totop:hover { filter: brightness(1.12); }
.sb-totop:focus-visible { outline: 2px solid var(--sb-general-color, #fff); outline-offset: 3px; }
.sb-totop svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sb-totop circle { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); transition: stroke-dashoffset .15s linear; }
.sb-totop i { position: relative; font-size: 20px; }
body:has(.sb-totop) .sb-theme-toggle--floating { bottom: 84px; }

@media (prefers-reduced-motion: reduce) { .sb-fab, .sb-totop, .sb-totop circle { transition: none; } }

/* Mobil: tam genişlik çubuk, eşit sütunlu butonlar (ikon üstte, yazı altta); detay sayfasının kendi mobil çubuğu varsa çubuk gizlenir */
@media (max-width: 991px) {
    body:has(.fp-mbar) .sb-fab-spacer { display: none; }
    body:has(.fp-mbar) .sb-fab { display: none; }
    body:has(.fp-mbar) .sb-totop { bottom: 88px; }
}
@media (max-width: 600px) {
    .sb-fab { left: 10px; right: 10px; bottom: 10px; transform: none; }
    .sb-fab.is-reveal:not(.is-visible) { transform: translateY(calc(100% + 24px)); }
    .sb-fab-bar { gap: 6px; padding: 6px; border-radius: 16px; }
    .sb-fab-btn { flex: 1 1 0; flex-direction: column; min-width: 0; gap: 5px; height: 54px; padding: 0 6px; border-radius: 11px; font-size: 11.5px; }
    .sb-fab-btn i { font-size: 17px; line-height: 1; }
    .sb-fab-btn span { overflow: hidden; text-overflow: ellipsis; }
    .sb-totop { right: 14px; bottom: 74px; width: 46px; height: 46px; }
    body:not(:has(.sb-fab)) .sb-totop { bottom: 14px; }
    body:has(.fp-mbar) .sb-totop { bottom: 88px; }
}
