/* ============================================================
   초대 관리 (Invitations)
   - 공용 클래스(page_body / dtable_* / modal_* / field_* / btn_*)는
     components.css·layouts.css를 그대로 재사용하고,
     이 파일에는 초대 고유 래퍼(필터 바·테이블)만 정의한다.
   ============================================================ */

/* ── 필터 바 (유형 + 등급 셀렉트 + 버튼) ─────────────── */
.inv_filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.inv_filter .cselect {
  width: auto;
  min-width: 8rem;
}

.inv_filter .cselect_trigger {
  height: 2.375rem;
}

.inv_filter_right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── 테이블: 자동 레이아웃 (창 축소 시 컬럼 자동 축소) ── */
.inv_dtable {
  table-layout: auto;
  width: 100%;
}

.inv_dtable .dtable_td,
.inv_dtable .dtable_th {
  white-space: nowrap;
}

/* 컬럼별 너비 힌트 (nth-child 순서: 유형·등급·사용현황·생성일·만료일·초대코드·상태·관리) */
.inv_dtable .dtable_th:nth-child(1),
.inv_dtable .dtable_td:nth-child(1) { width: 10%; }  /* 유형 */

.inv_dtable .dtable_th:nth-child(2),
.inv_dtable .dtable_td:nth-child(2) { width: 10%; }  /* 등급 */

.inv_dtable .dtable_th:nth-child(3),
.inv_dtable .dtable_td:nth-child(3) { width: 14%; }  /* 사용현황 */

.inv_dtable .dtable_th:nth-child(4),
.inv_dtable .dtable_td:nth-child(4) { width: 13%; }  /* 생성일 */

.inv_dtable .dtable_th:nth-child(5),
.inv_dtable .dtable_td:nth-child(5) { width: 13%; }  /* 만료일 */

.inv_dtable .dtable_th:nth-child(6),
.inv_dtable .dtable_td:nth-child(6) { width: 16%; }  /* 초대코드 */

.inv_dtable .dtable_th:nth-child(7),
.inv_dtable .dtable_td:nth-child(7) { width: 10%; }  /* 상태 */

.inv_dtable .dtable_th:nth-child(8),
.inv_dtable .dtable_td:nth-child(8) { width: 10%; }  /* 관리 */

/* ── 초대코드 셀 (코드 + 복사 버튼) ── */
.inv_code_cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.inv_code_text {
  font-family: var(--font-mono, monospace);
  font-size: 0.8125rem;
  color: var(--c-text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 복사 버튼은 공용 dtable_action_btn 사용 */

/* ── 생성 모달 ── */
.inv_create_modal {
  max-width: 34rem;
}

.inv_created_link_row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inv_created_link_row .form_input {
  flex: 1;
}

/* 2열 레이아웃 */
.inv_form_row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* 초대 유형 토글 버튼 크기 자동 */
.inv_create_modal .toggle_btn_group {
  align-self: flex-start;
}

/* 만료일 = 날짜 + 시간 가로 배치 (notice_datetime과 동일) */
.inv_datetime {
  display: flex;
  gap: 1rem;
}

.inv_datetime .daterange_wrap {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

.inv_create_modal .inv_datetime .cselect {
  flex: 1 1 0;
  min-width: 0;
}
