/* ==========================================================
   A&I Luxury Hair — scroll to top button
   Для публичного сайта и админ-панели.
   ========================================================== */

.ai-scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;

    width: 56px;
    height: 56px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    border: 1px solid rgba(214, 180, 106, .34);

    background:
        radial-gradient(circle at 30% 18%, rgba(255,255,255,.22), transparent 32%),
        linear-gradient(135deg, rgba(214,180,106,.96), rgba(241,218,137,.86));

    color: #041b13;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.28),
        0 18px 42px rgba(0,0,0,.26),
        0 0 0 0 rgba(214,180,106,.18);

    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.92);

    transition:
        opacity .22s ease,
        visibility .22s ease,
        transform .22s ease,
        box-shadow .22s ease,
        filter .22s ease;
}

.ai-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ai-scroll-top:hover {
    transform: translateY(-3px) scale(1.035);
    filter: brightness(1.04);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.32),
        0 22px 52px rgba(0,0,0,.30),
        0 0 0 7px rgba(214,180,106,.10);
}

.ai-scroll-top:active {
    transform: translateY(0) scale(.98);
}

.ai-scroll-top svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* В админке делаем чуть более спокойный вариант, чтобы не спорил с интерфейсом */
.admin-page .ai-scroll-top {
    background:
        radial-gradient(circle at 30% 18%, rgba(255,255,255,.16), transparent 32%),
        linear-gradient(135deg, rgba(12, 72, 52, .96), rgba(6, 50, 37, .96));
    color: #F1DA89;
    border-color: rgba(214,180,106,.30);
}

/* На телефоне кнопка ниже и компактнее */
@media (max-width: 760px) {
    .ai-scroll-top {
        right: 16px;
        bottom: 18px;
        width: 50px;
        height: 50px;
    }

    .ai-scroll-top svg {
        width: 22px;
        height: 22px;
    }
}

/* Если есть нижняя панель/системные элементы, чуть поднимаем */
@media (max-width: 480px) {
    .ai-scroll-top {
        right: 14px;
        bottom: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-scroll-top {
        transition: none !important;
    }
}
