/* Floating Actions CSS */

.floating-action-stack {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #2d2d2da1;
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.floating-btn:hover {
    transform: translateY(-2px);
    background: #111;
}

.floating-scroll-top-btn {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
}

.floating-scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* .floating-settings-btn {background: #3b3f47a6;} */

.floating-settings-btn:hover {
    background: #23262c;
}

.theme-icon {
    display: block;
}

.theme-icon-moon {
    display: none;
}

.floating-settings-btn.is-dark .theme-icon-sun {
    display: none;
}

.floating-settings-btn.is-dark .theme-icon-moon {
    display: block;
}

.floating-create-post-btn {
    position: fixed;
    left: 2rem;
    bottom: 2rem;
    z-index: 1000;
    background: #ff6a00;
}

.floating-create-post-btn:hover {
    background: #d95500;
}

.floating-note-panel {
    position: fixed;
    right: -420px;
    bottom: 2rem;
    width: 360px;
    max-height: min(72vh, 600px);
    z-index: 1001;
    background: #fff;
    border: 1px solid #e9e9e9;
    /* border-radius: 12px; */
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}

.floating-note-panel.active {
    right: 2rem;
}

.note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #ececec;
    background: #f8f9fb;
}

.note-header h3 {
    margin: 0;
    font-size: 1rem;
}

.note-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #555;
    font-size: 1.05rem;
}

.note-content {
    padding: 1rem;
    overflow-y: auto;
    line-height: 1.6;
    color: #222;
    white-space: pre-wrap;
}

.note-loading {
    color: #666;
    font-size: 0.95rem;
}

.note-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-top: 1px solid #ececec;
    padding: 0.7rem 1rem;
    background: #fbfbfb;
}

.note-nav-btn {
    border: 1px solid #dadada;
    background: #fff;
    color: #222;
    border-radius: 8px;
    padding: 0.3rem 0.65rem;
    font-size: 0.82rem;
    cursor: pointer;
}

.note-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.note-index {
    font-size: 0.8rem;
    color: #666;
}

@media (max-width: 768px) {
    .floating-action-stack {
        right: 1rem;
        bottom: 1rem;
    }

    .floating-create-post-btn {
        left: 1rem;
        bottom: 1rem;
    }

    .floating-note-panel {
        right: -105%;
        bottom: 1rem;
        width: calc(100vw - 2rem);
        max-width: 440px;
    }

    .floating-note-panel.active {
        right: 1rem;
    }
}
