/* ==========================================================================
   사용자 오류·개선 제보 위젯 (PM 결정 2026-04-30 시안 D)
   - 헤더 ❓ 아이콘 → 모달
   - fetch 실패 / window.error 자동 캐치 → 토스트에 [제보] 버튼
   ========================================================================== */

/* 모달 */
.fb-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 99998; display: none; opacity: 0;
    transition: opacity 0.25s ease;
}
.fb-overlay.show { display: flex; align-items: flex-end; justify-content: center; opacity: 1; }
.fb-modal {
    width: 100%; max-width: 500px; background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 18px 22px 28px;
    transform: translateY(100%); transition: transform 0.3s ease;
    max-height: 80vh; overflow-y: auto;
    -ms-overflow-style: none; scrollbar-width: none;
}
.fb-modal::-webkit-scrollbar { display: none; }
.fb-overlay.show .fb-modal { transform: translateY(0); }
.fb-handle {
    width: 36px; height: 4px; background: #e0e0e0;
    border-radius: 2px; margin: 0 auto 14px;
}
.fb-title {
    font-size: 17px; font-weight: 800; color: #1a1a1a;
    letter-spacing: -0.4px; margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
}
.fb-title .material-symbols-rounded { font-size: 22px; color: #002C5F; }
.fb-desc {
    font-size: 12.5px; color: #888; line-height: 1.55;
    margin-bottom: 16px; letter-spacing: -0.2px; word-break: keep-all;
}

/* 카테고리 (세그먼트) */
.fb-types {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
    margin-bottom: 14px;
}
.fb-type-btn {
    background: #f5f5f7; border: 1px solid transparent;
    padding: 10px 12px; border-radius: 10px;
    font-size: 13px; font-weight: 600; color: #555;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: all 0.15s ease; letter-spacing: -0.2px;
    text-align: left; display: flex; align-items: center; gap: 6px;
    font-family: inherit;
}
.fb-type-btn .material-symbols-rounded { font-size: 16px; }
.fb-type-btn.active {
    background: #002C5F; color: #fff; border-color: #002C5F;
}
.fb-type-btn:active { transform: scale(0.97); }

/* 본문 */
.fb-textarea {
    width: 100%; min-height: 120px; max-height: 280px;
    border: 1px solid #e5e5ea; border-radius: 10px;
    padding: 12px 14px; font-size: 14px;
    font-family: 'Pretendard', system-ui, sans-serif; color: #1a1a1a;
    letter-spacing: -0.3px; line-height: 1.55;
    resize: vertical; outline: none;
    box-sizing: border-box;
}
.fb-textarea:focus { border-color: #002C5F; }

.fb-counter {
    text-align: right; font-size: 11px; color: #999;
    margin-top: 4px; font-weight: 600;
}
.fb-counter.over { color: #d11; }

/* 자동 첨부 정보 안내 */
.fb-context {
    margin-top: 14px; padding: 10px 12px;
    background: #f8f9fb; border-radius: 8px;
    font-size: 11.5px; color: #6b7280; line-height: 1.55;
    word-break: break-all; letter-spacing: -0.2px;
}
.fb-context strong { color: #1a1a1a; font-weight: 700; }
.fb-context-item { display: block; margin: 2px 0; }

/* 액션 버튼 */
.fb-actions {
    display: flex; gap: 8px; margin-top: 16px;
}
.fb-btn {
    flex: 1; padding: 13px;
    border-radius: 11px; font-size: 14px; font-weight: 700;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    border: none; letter-spacing: -0.3px;
    font-family: inherit; transition: all 0.15s ease;
}
.fb-btn--cancel { background: #f0f0f4; color: #666; }
.fb-btn--cancel:active { background: #e5e5ea; }
.fb-btn--submit { background: #002C5F; color: #fff; }
.fb-btn--submit:active { background: #001a3d; }
.fb-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 자동 에러 토스트 (fetch 실패 + JS 에러) */
.fb-error-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: #1a1a1a; color: #fff;
    padding: 12px 16px; border-radius: 12px;
    font-size: 13px; line-height: 1.5;
    z-index: 99997; max-width: 92vw; min-width: 260px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0; pointer-events: none;
    display: flex; align-items: center; gap: 10px;
    letter-spacing: -0.3px;
}
.fb-error-toast.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.fb-error-toast__icon { font-size: 20px; color: #ffb84a; flex-shrink: 0; }
.fb-error-toast__msg { flex: 1; }
.fb-error-toast__report-btn {
    background: rgba(255,255,255,0.15); color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 10px; border-radius: 8px;
    font-size: 11.5px; font-weight: 700;
    cursor: pointer; flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit; letter-spacing: -0.2px;
}
.fb-error-toast__report-btn:active { background: rgba(255,255,255,0.25); }

/* ==========================================================================
   헤더 햄버거 메뉴 드롭다운 — 메인/커뮤니티 공통 (오류·개선 제보 진입)
   ========================================================================== */
.header-menu-wrap {
    position: relative;
}
.header-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 6px;
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
    z-index: 9999;
}
.header-menu-dropdown.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.header-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s ease;
}
.header-menu-item:active,
.header-menu-item:hover {
    background: #f5f5f7;
}
.header-menu-item__icon {
    font-size: 22px !important;
    color: #002C5F;
    flex-shrink: 0;
}
.header-menu-item__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.header-menu-item__title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    word-break: keep-all;
}
.header-menu-item__desc {
    font-size: 11.5px;
    color: #888;
    letter-spacing: -0.2px;
    word-break: keep-all;
}
