/**
 * inbox.css — /message/inbox
 */

#body footer,
#body #ch-plugin {
  display: none !important;
}

div#content {
  padding: 0 !important;
  overflow-y: visible !important;
  /* 페이지 자체가 스크롤, sticky가 뷰포트 기준으로 동작 */
}

/* ── Material Symbols ── */
.ib-ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  white-space: nowrap;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  line-height: 1;
  vertical-align: middle;
}

/* ── 헤더 검색 버튼 ── */
.ib-header-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wh-label);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.ib-header-btn:active {}

/* ── 탭 — 칩 스타일 (travel/wishlist와 동일) ── */
.ib-tabs-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wh-bg);

  position: sticky;
  top: 76px;
  z-index: 90;
  /* wh-page-nav 높이 76px 바로 아래 */
}

.ib-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wh-label-3);
  border: 1px solid var(--wh-sep-opaque);
  border-radius: 999px;

  cursor: pointer;
  font-family: 'Pretendard', -apple-system, sans-serif;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.ib-tab.active {
  background: var(--wh-brand, #671175);
  color: #fff;
  border-color: var(--wh-brand, #671175);
  font-weight: 600;
}

/* ── 검색 패널 — nav 바로 아래 고정 표시 ── */
#ib-search-panel {
  display: none;
}

#ib-search-panel.open {
  display: block;
  position: fixed;
  background: var(--wh-bg);
  top: 76px;
  /* wh-page-nav 높이 */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;

  border-bottom: 1px solid var(--wh-bg);
  z-index: 95;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.ib-search-wrap {
  padding: 10px 16px 12px;
}

.ib-search-box {
  display: flex;
  align-items: center;
  gap: 8px;

  border-radius: 12px;
  height: 40px;
  padding: 0 14px;
}

.ib-search-box input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--wh-label);
  outline: none;
  font-family: 'Pretendard', -apple-system, sans-serif;
}

.ib-search-box input::placeholder {
  color: var(--wh-label-4);
}

/* ── 목록 ── */
.ib-list {
  margin-bottom: 60px;
  margin-top: 80px;
}

/* ── 메시지 아이템 래퍼 ── */
.ib-item-wrap {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--wh-bg);
  position: relative;
}

.ib-item-wrap:last-child {
  border-bottom: none;
}

/* 미읽음 점 — 래퍼 기준 */
.ib-item-wrap[data-unread="1"]::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--wh-brand, #671175);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

/* ── 메시지 아이템 링크 ── */
.ib-item {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 14px;
  padding: 14px 8px 14px 16px;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
}

.ib-item:active {}

/* ── 점 세개 버튼 ── */
.ib-menu-btn {
  flex-shrink: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #c4c4ce;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.ib-menu-btn:active {
  color: #888;
}

/* ── 아바타 ── */
.ib-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.ib-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--wh-sep-opaque);
  display: block;
}

/* ── 내용 ── */
.ib-content {
  flex: 1;
  min-width: 0;
}

.ib-row1 {
  margin-bottom: 3px;
}

.ib-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--wh-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.ib-item.unread .ib-name {
  font-weight: 700;
}

.ib-time-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
}

.ib-time {
  font-size: 12px;
  color: var(--wh-label-4);
  line-height: 1;
  white-space: nowrap;
}

.ib-item.unread .ib-time {
  color: var(--wh-label-3);
  font-weight: 500;
}

/* 미읽음 배지 — 작고 단색 */
.ib-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--wh-brand, #671175);
  color: #fff;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}

/* 미리보기 */
.ib-preview {
  font-size: 13px;
  color: var(--wh-label-3);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.ib-item.unread .ib-preview {
  color: var(--wh-label);
  font-weight: 500;
}

/* 숙소명 */
.ib-prop {
  font-size: 11px;
  color: var(--wh-label-4);
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* 검색 결과 없음 */
#ib-no-result {
  display: none;
  text-align: center;
  padding: 60px 24px;

}

/* ── 바텀시트 ── */
.ib-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, .4);
  align-items: flex-end;
  justify-content: center;
}

.ib-modal-overlay.open {
  display: flex;
}

.ib-sheet {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  animation: ib-slide-up .25s ease;
}

@keyframes ib-slide-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.ib-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--wh-sep-opaque);
  border-radius: 2px;
  margin: 12px auto 4px;
}

.ib-sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  text-decoration: none;
  color: var(--wh-label);
  font-size: 15px;
  font-weight: 500;
  font-family: 'Pretendard', -apple-system, sans-serif;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.ib-sheet-item:active {}

.ib-sheet-item--danger {
  color: #ef4444;
}

.ib-sheet-item--danger .ib-sheet-icon {
  color: #ef4444;
}

.ib-sheet-icon {
  font-size: 22px;
  color: var(--wh-label-2);
}