/* Dusty Rose — футерный UI: тема, «наверх», cookies */

/* ── Кнопка «наверх» ── */
.scroll-top {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50;
    width: 40px; height: 40px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--wp--preset--color--accent-primary);
    background: var(--wp--preset--color--bg-secondary);
    color: var(--wp--preset--color--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-family: var(--wp--preset--font-family--literata);
    font-size: .8rem; line-height: 1; cursor: pointer;
    opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .2s, bottom .25s;
}
.scroll-top.visible { opacity: .55; pointer-events: auto; }
.scroll-top:hover { opacity: 1; transform: scale(1.08); }

/* ── Переключатель темы ── */
.theme-toggle {
    position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 50;
    width: 40px; height: 40px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--wp--preset--color--accent-primary);
    background: var(--wp--preset--color--bg-secondary);
    color: var(--wp--preset--color--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-family: var(--wp--preset--font-family--literata);
    font-size: 1rem; line-height: 1; cursor: pointer;
    opacity: .55;
    transition: opacity .25s, transform .2s, bottom .25s;
}
.theme-toggle:hover { opacity: 1; transform: scale(1.08); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { display: none; line-height: 1; }
body.dark-mode  .theme-toggle .icon-sun  { display: inline; }
body.light-mode .theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: dark)  { body:not(.light-mode):not(.dark-mode) .theme-toggle .icon-sun  { display: inline; } }
@media (prefers-color-scheme: light) { body:not(.light-mode):not(.dark-mode) .theme-toggle .icon-moon { display: inline; } }

/* Когда показана cookie-полоса — поднимаем угловые кнопки над ней */
body.has-cookie-bar .scroll-top,
body.has-cookie-bar .theme-toggle { bottom: calc(1.5rem + var(--cookie-bar-h, 56px)); }

/* ── Cookie-полоса (низ, во всю ширину) ── */
.cookie-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: .6rem 1.25rem; padding: .85rem 1.25rem;
    background: var(--wp--preset--color--bg-secondary);
    background: color-mix(in srgb, var(--wp--preset--color--bg-secondary) 88%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--wp--preset--color--accent-primary);
    transform: translateY(100%); transition: transform .35s ease;
}
.cookie-bar.visible { transform: translateY(0); }
.cookie-bar p {
    margin: 0; font-size: .875rem; line-height: 1.45; text-align: center;
    color: var(--wp--preset--color--text-secondary);
}
.cookie-bar a { color: var(--wp--preset--color--accent-primary); text-decoration: underline; }
.cookie-bar a:hover { text-decoration: none; }
.cookie-accept {
    padding: .45rem 1.4rem; border: 1px solid var(--wp--preset--color--accent-primary);
    border-radius: 10rem; cursor: pointer; white-space: nowrap;
    background: var(--wp--preset--color--accent-primary);
    color: var(--wp--preset--color--bg-primary);
    font-family: inherit; font-size: .875rem; transition: opacity .2s;
}
.cookie-accept:hover { opacity: .85; }
