/* ── 意見回饋浮動按鈕 + 面板 ─────────────────────────── */

.fb-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
    z-index: 9000;
    transition: transform .15s, background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fb-fab:hover { background: #000; transform: scale(1.08); }
.fb-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ── 面板 ───────────────────────────────────────────── */

.fb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 9001;
}
.fb-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 420px;
    max-height: 70vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 9002;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.fb-panel.open { display: flex; }

.fb-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fb-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.fb-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px;
}

/* ── 新增表單 ─────────────────────────────────────── */

.fb-form {
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fb-form-row {
    display: flex;
    gap: 8px;
}
.fb-type-select {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    width: 90px;
}
.fb-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    resize: none;
    min-height: 36px;
    max-height: 80px;
    font-family: inherit;
}
.fb-input:focus { outline: none; border-color: #2563eb; }
.fb-submit {
    align-self: flex-end;
    padding: 6px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}
.fb-submit:hover { background: #1d4ed8; }
.fb-submit:disabled { opacity: .5; cursor: default; }

/* ── 列表 ────────────────────────────────────────── */

.fb-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.fb-empty {
    text-align: center;
    color: #9ca3af;
    padding: 32px 20px;
    font-size: 13px;
}
.fb-item {
    padding: 10px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: opacity .2s;
}
.fb-item.completed {
    opacity: .55;
}
.fb-item.completed .fb-content {
    text-decoration: line-through;
    color: #9ca3af;
}
.fb-item.completed .fb-delete {
    opacity: 1;
    color: #9ca3af;
}
.fb-check {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: #fff;
    transition: all .15s;
}
.fb-check:hover { border-color: #2563eb; }
.fb-item.completed .fb-check {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}
.fb-body {
    flex: 1;
    min-width: 0;
}
.fb-content {
    font-size: 13px;
    line-height: 1.5;
    color: #1f2937;
    word-break: break-word;
}
.fb-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.fb-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.fb-tag-bug { background: #fef2f2; color: #dc2626; }
.fb-tag-feature { background: #eff6ff; color: #2563eb; }
.fb-tag-other { background: #f3f4f6; color: #6b7280; }
.fb-delete {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    flex-shrink: 0;
    margin-top: 2px;
}
.fb-delete:hover { color: #ef4444; }

/* ── 篩選 ────────────────────────────────────────── */
.fb-filters {
    padding: 4px 20px 8px;
    display: flex;
    gap: 4px;
}
.fb-filter-btn {
    padding: 3px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 11px;
    background: #fff;
    cursor: pointer;
    color: #6b7280;
}
.fb-filter-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ── RWD ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .fb-panel {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: 72px;
        max-height: 80vh;
    }
}
