/* ════════════════════════════════════════
   수정요청 (Feedback) 전역 스타일
   ════════════════════════════════════════ */

/* ── 플로팅 윈도우 ── */
#fbFloatWindow {
    position: fixed;
    z-index: 9500;
    width: 98vw;
    max-width: 1400px;
    height: 94vh;
    top: 3vh;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 12px;
    box-shadow: 0 8px 48px rgba(0,0,0,.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#fbDragHandle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 12px 12px 0 0;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

#fbDragHandle:active { cursor: grabbing; }

#fbDragHandle .fb-drag-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

#fbDragHandle .fb-drag-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(74,144,226,.15);
    color: #4a90e2;
    font-weight: 600;
}

#fbDragHandle .fb-drag-hint {
    font-size: 11px;
    color: #999;
}

#fbDragHandle .fb-drag-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    padding: 0 0 0 12px;
    line-height: 1;
}

#fbDragHandle .fb-drag-close:hover { color: #333; }

/* ── 툴바 ── */
.fb-win-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.fb-win-tool-btn {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    color: #555;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.fb-win-tool-btn:hover { background: #f0f0f0; }
.fb-win-tool-btn.active { background: #4a90e2; color: #fff; border-color: #4a90e2; }

.fb-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.fb-color-dot.active { border-color: #333; }

.anno-tool-btn {
    padding: 3px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.anno-tool-btn:hover { background: #f0f0f0; }

/* ── 캔버스 영역 ── */
#fbCanvasArea {
    flex: 1;
    overflow: auto;
    background: #1a1a2e;
    padding: 16px;
    min-height: 0;
    min-width: 0;
}

#fbCanvasPlaceholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 100%;
    color: #aaa;
}

/* ── 오른쪽 패널 ── */
#fbRightPanel {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #fff;
}

.fb-rp-section {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.fb-rp-label {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.fb-pri-btn {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    opacity: .6;
}

.fb-pri-btn.active { opacity: 1; }

.fb-screen-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f9f9f9;
    color: #333;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.fb-screen-input:focus { border-color: #4a90e2; background: #fff; }

.fb-desc-textarea {
    width: 100%;
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f9f9f9;
    color: #333;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    resize: none;
    min-height: 80px;
    box-sizing: border-box;
}

.fb-desc-textarea:focus { border-color: #4a90e2; background: #fff; }

.fb-desc-count {
    font-size: 10px;
    color: #999;
    text-align: right;
    margin-top: 4px;
}

.fb-save-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #4a90e2;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.fb-save-btn:hover { background: #357abd; }
.fb-save-btn:disabled { background: #aaa; cursor: not-allowed; }

.fb-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    font-size: 11px;
}

.fb-file-chip .remove {
    cursor: pointer;
    color: #9ca3af;
    font-size: 12px;
    margin-left: 2px;
}

.fb-file-chip .remove:hover { color: #ef4444; }

/* ── 토스트 알림 ── */
.fb-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    animation: fbToastIn .25s ease;
    pointer-events: none;
}

.fb-toast.success { background: #10b981; }
.fb-toast.error   { background: #ef4444; }
.fb-toast.info    { background: #6366f1; }

@keyframes fbToastIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 수정요청 목록 페이지 ── */
.fb-page-layout {
    display: flex;
    height: calc(100vh - 120px);
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.fb-list-panel {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.fb-list-top {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.fb-filter-bar {
    display: flex;
    gap: 4px;
    padding: 6px 10px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.fb-filter-btn {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-family: inherit;
}

.fb-filter-btn:hover { background: #f5f5f5; }
.fb-filter-btn.active { background: rgba(74,144,226,.15); border-color: #4a90e2; color: #4a90e2; font-weight: 600; }

.fb-search-bar {
    padding: 6px 10px;
    border-bottom: 1px solid #e0e0e0;
}

.fb-search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.fb-search-input:focus { border-color: #4a90e2; }

.fb-list-body {
    flex: 1;
    overflow-y: auto;
}

.fb-card {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .15s;
}

.fb-card:hover { background: #f8f9ff; }
.fb-card.active { background: #eff6ff; border-left: 3px solid #4a90e2; }

.fb-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.fb-card-desc {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.fb-card-meta {
    font-size: 10px;
    color: #999;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fb-pri-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.fb-status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ── 상세 패널 ── */
.fb-detail-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fb-empty-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.fb-detail-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.fb-detail-meta {
    padding: 8px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.fb-detail-body {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    color: #333;
    background: #fff;
}

.fb-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.fb-comments-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fb-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fb-comment-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    background: #f0f4ff;
    font-size: 12px;
    color: #333;
    max-width: 75%;
    word-break: break-word;
}

.fb-comment-bubble.mine {
    background: #4a90e2;
    color: #fff;
}

.fb-comment-input-area {
    padding: 10px 14px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.fb-comment-textarea {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    outline: none;
}

.fb-comment-textarea:focus { border-color: #4a90e2; }

.fb-comment-send-btn {
    padding: 8px 14px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    flex-shrink: 0;
}

.fb-comment-send-btn:hover { background: #357abd; }

.fb-thumb {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    cursor: zoom-in;
}

/* ── 상태변경 버튼 ── */
.fb-status-btn {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
}

/* ── topbar 수정요청 버튼 ── */
.func_box.feedback_btn {
    cursor: pointer;
}

/* ── 우하단 FAB (항상 최상위) ── */
#fbFab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 10100;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #4a90e2;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(74,144,226,.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: background .15s, transform .15s;
}
#fbFab:hover {
    background: #357abd;
    transform: scale(1.08);
}
#fbFab[data-open="true"] {
    background: #e53e3e;
}

/* ── 이미지 뷰어 ── */
#fbImgViewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.92);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
