/* inbox/portal_overrides.css — standalone 레이아웃 + 색상 미세조정 */

/* ── 색상: 구조 요소(탑바·레일)는 레퍼런스 네이비 유지 ──────────────
   tokens.css가 --navy-*를 brand-orange로 재매핑했으나,
   탑바 배경(--navy-900)과 깊은 강조색(--navy-800)은 진네이비 복원.
   --navy-700(#1a3a78 → 레일 compose 버튼)도 네이비로 복원.
   브랜드 오렌지(--brand-primary)는 명부확정 등 primary CTA에서만 사용. */
body.inbox-app {
  --navy-900: #0a1f44;
  --navy-800: #102a5c;
  --navy-700: #1a3a78;
  --navy-600: #24509c;
  --navy-500: #2d64c1;
  --navy-400: #6b8fd6;
  --navy-100: #dce8f8;
  --navy-50:  #eef5fd;
}

/* ── 레일 compose 버튼 SVG 크기 고정 (미설정 시 flex 에서 300×150 기본값) */
.rail__compose svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── 좁은 뷰포트에서도 detail 패널 최소 300px 확보 ──────────────────
   handoff 패키지 breakpoint(@media max-width:1280px) 에서 rail/list 값이
   200+340=540px 로 줄어도 1fr 이 최소 300px 를 보장한다. */
main.inbox.app {
  grid-template-columns: var(--w-rail) var(--w-list) minmax(300px, 1fr);
  min-width: calc(var(--w-rail) + var(--w-list) + 300px);
}

/* 앱 전체 스크롤 허용 (min-width 초과 시 가로 스크롤) */
body.inbox-app {
  overflow: auto;
}

/* ── Phase 7 — 메일 상세 헤더 분류 칩 (eyebrow) ─────────────────── */
.mail-head__classification {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.mail-head__class-edit {
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 4px;
  background: transparent;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all 0.12s;
}
.mail-head__class-edit:hover {
  background: var(--gray-150, var(--gray-100));
  color: var(--gray-700);
}
.mail-head__class-edit svg {
  width: 11px;
  height: 11px;
  stroke-width: 2;
}

/* ── v0.3.2 — 수동 전환 Popover / Menu / Dropdown 공통 스타일 ─── */
.mo-popover, .mo-menu, .mo-dropdown {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10, 31, 68, 0.18);
  z-index: 9999;
  padding: 6px;
  font-size: 12.5px;
  min-width: 220px;
  max-width: 360px;
}
.mo-popover {
  width: 320px;
  padding: 10px;
}
.mo-popover__head {
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 8px;
  font-size: 13px;
}
.mo-popover__search, .mo-dropdown__search {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 6px;
}
.mo-popover__section {
  font-size: 10.5px;
  color: var(--gray-600);
  margin: 6px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mo-popover__list {
  display: flex; flex-direction: column;
  gap: 2px;
}
.mo-popover__item {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
}
.mo-popover__item:hover {
  background: var(--navy-50);
  border-color: var(--navy-100);
}
.mo-menu__item, .mo-dropdown__item {
  display: block;
  width: 100%;
  padding: 7px 12px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 12.5px;
  cursor: pointer;
}
.mo-menu__item:hover, .mo-dropdown__item:hover {
  background: var(--navy-50);
}
.mo-menu__item.is-danger {
  color: var(--st-error, #c4282c);
}
.mo-menu__item.is-danger:hover {
  background: #fde6e7;
}
.mo-menu__item.is-disabled, .mo-menu__item:disabled {
  color: var(--gray-400);
  cursor: not-allowed;
  background: transparent !important;
}
.mo-menu__divider, .mo-dropdown__divider {
  height: 1px;
  background: var(--gray-200);
  margin: 4px 0;
}
.mo-dropdown {
  width: 240px;
  padding: 8px;
}
.mo-dropdown__list {
  max-height: 200px;
  overflow-y: auto;
}
.mo-dropdown__scope {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--gray-700);
  cursor: pointer;
}

/* 분류 칩에 ✕ 버튼 (다중일 때만 노출) */
.mail__class-chip.mo-chip {
  cursor: pointer;
  position: relative;
}
.mo-chip__x {
  display: none;
  margin-left: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  color: var(--gray-700);
  border: none;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}
.mail__class-chip.mo-chip:hover .mo-chip__x {
  display: inline-flex;
  align-items: center; justify-content: center;
}
.mail-head__class-add {
  background: transparent;
  border: 1px dashed var(--gray-300);
  color: var(--gray-600);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  cursor: pointer;
}
.mail-head__class-add:hover {
  background: var(--navy-50);
  border-color: var(--navy-400);
  color: var(--navy-700);
}

/* Phase 동그라미 hover 시 ⋯ 표시 */
.phase {
  position: relative;
}
.phase__more {
  display: none;
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gray-700);
  color: white;
  border: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}
.phase:hover .phase__more {
  display: inline-flex;
  align-items: center; justify-content: center;
}

/* 담당자 셀 클릭 가능 표시 */
.status-fact--clickable {
  cursor: pointer;
}
.status-fact--clickable:hover {
  background: var(--navy-50);
  border-radius: 4px;
}
.status-fact__hint {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 400;
  margin-left: 4px;
}

/* Action bar — 다른 처리로 전환 링크 */
.action-bar__alternate {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--navy-700);
  font-size: 11.5px;
  text-decoration: underline;
  cursor: pointer;
}
.action-bar__alternate:hover {
  color: var(--brand-primary, #c25a00);
}

/* MANUAL_OVERRIDE 타임라인 항목 */
.timeline__item.is-override .timeline__card {
  border-left: 3px solid #c25a00;
}

/* ── Phase 7 — 필수값 대조 패널 errorMessage ──────────────────── */
.compare__field-error {
  grid-column: 1 / -1;            /* row 전체 폭 */
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--st-error, #b91c1c);
  background: var(--st-error-bg, #fef2f2);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 2px solid var(--st-error, #b91c1c);
}
