/* The floating "add" button and the category sheet it opens: a bottom sheet
   on phones, a side card from 768px up. */

/* ---------- Floating add button ---------- */

.fab {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: var(--orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-2);
    cursor: pointer;
    transition: background .15s ease, transform .12s ease;
}

.fab:hover {
    background: var(--orange-ink);
    transform: translateY(-1px);
}

.fab svg {
    width: 1.5rem;
    height: 1.5rem;
}

.fab-mobile {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 4;
}

.fab-desktop {
    position: absolute;
    right: 22px;
    bottom: 26px;
    z-index: 4;
}

/* ---------- Category sheet ---------- */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: #0f14126b;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 10;
}

.sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    box-shadow: var(--shadow-2);
    z-index: 11;
    padding: 8px 20px 24px;
    transform: translateY(100%);
    transition: transform .2s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.sheet.is-open {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    margin: 6px auto 14px;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sheet-head h2,
.sheet-head .h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.sheet-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sheet-cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.sheet-cat-item:active {
    background: var(--surface-2);
}

@media (min-width: 768px) {
    .sheet {
        inset: 50% 32px auto auto;
        transform: translateY(-50%) translate(16px);
        width: min(380px, 100vw - 48px);
        max-height: calc(100vh - 64px);
        border-radius: var(--radius-lg);
        transition: opacity .18s ease, transform .18s ease;
        opacity: 0;
        pointer-events: none;
    }

    .sheet.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-50%) translate(0);
    }
}
