/*
 * SCR /halls — M1 홀 배정·자동 견적 전용 스타일.
 * design.md §1 토큰만 참조. shared.css 프리미티브(kx-page·kx-card·kx-select·kx-table) 위에 얹는다.
 * 클래스는 kx-hall__* 네임스페이스.
 */
@import '../shared.css';

.kx-hall__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.kx-hall__top h1 {
  font-size: var(--fs-h2);
  color: var(--color-neutral-900);
}
.kx-hall__filter {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.kx-hall__filter label,
.kx-hall__form label,
.kx-hall__quoteinputs label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}

/* 배정 보드 */
.kx-hall__board {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kx-hall__rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kx-hall__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: var(--border-card);
}
.kx-hall__rowhead {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kx-hall__hallname {
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-900);
  font-size: var(--fs-body);
}
.kx-hall__area {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-hall__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.kx-hall__idle {
  font-size: var(--fs-caption);
  color: var(--color-neutral-400);
}
.kx-hall__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-200);
  font-size: var(--fs-caption);
  color: var(--color-neutral-700);
}
.kx-hall__chip.is-primary {
  border-color: var(--color-brand-500, #1f29fc);
}
.kx-hall__chip.is-conflict {
  background: #fef3f2;
  border-color: var(--color-error);
  color: var(--color-error);
}
.kx-hall__chipbody {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.kx-hall__chipbody:hover .kx-hall__chiptext {
  text-decoration: underline;
}
.kx-hall__chipbody:focus-visible {
  outline: 2px solid var(--color-brand-500, #1f29fc);
  outline-offset: 2px;
}
.kx-hall__chiptext {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.kx-hall__chiptext em {
  font-style: normal;
  font-size: var(--fs-micro);
  color: var(--color-neutral-500);
}
.kx-hall__chip.is-conflict .kx-hall__chiptext em {
  color: var(--color-error);
}
.kx-hall__chipx {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: var(--fs-h3);
  line-height: 1;
  color: var(--color-neutral-400);
  padding: 0 2px;
}
.kx-hall__chipx:hover {
  color: var(--color-error);
}

/* 자동 견적 */
.kx-hall__quoteform {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.kx-hall__hallpick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.kx-hall__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: var(--border-card);
  font-size: var(--fs-caption);
  color: var(--color-neutral-600);
  cursor: pointer;
}
.kx-hall__pill.is-on {
  border-color: var(--color-ai-accent);
  background: #eef8ff;
  color: var(--color-neutral-900);
}
.kx-hall__pill input {
  margin: 0;
}
.kx-hall__quoteinputs {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.kx-hall__quoteresult {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kx-hall__num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kx-hall__basis {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-hall__discount td {
  color: var(--color-success);
}
.kx-hall__total td {
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  border-top: 2px solid var(--color-neutral-200);
}
.kx-hall__note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  color: var(--color-warning);
}

/* 모달 */
.kx-hall__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: var(--space-4);
}
.kx-hall__modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.18));
}
.kx-hall__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.kx-hall__form2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.kx-hall__check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  color: var(--color-neutral-700) !important;
  font-size: var(--fs-body) !important;
}
.kx-hall__modalfoot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.kx-hall__err {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: #fef3f2;
  color: var(--color-error);
  font-size: var(--fs-caption);
}
.kx-hall__conflicts {
  margin: 4px 0 0;
  padding-left: 18px;
}

/* 배정 상세 offcanvas 본문 */
.kx-hall__detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.kx-hall__detailgrid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
}
.kx-hall__detailgrid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kx-hall__detailgrid dt {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-hall__detailgrid dd {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--color-neutral-900);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.kx-hall__statusbadge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-200);
  font-size: var(--fs-caption);
  color: var(--color-neutral-700);
}
.kx-hall__statusbadge.is-primary {
  border-color: var(--color-brand-500, #1f29fc);
  color: var(--color-brand-500, #1f29fc);
}
.kx-hall__primarytag {
  font-size: var(--fs-caption);
  color: var(--color-brand-500, #1f29fc);
}
.kx-hall__detailsec {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: var(--border-card);
}
.kx-hall__detailsec h3 {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-900);
  margin: 0;
}
.kx-hall__ok {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  color: var(--color-success);
}
.kx-hall__detailconflicts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kx-hall__detailconflicts li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  color: var(--color-error);
}
.kx-hall__detailquote {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kx-hall__detailquoterow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-body);
  color: var(--color-neutral-700);
}
.kx-hall__detailquoterow strong {
  color: var(--color-neutral-900);
}

/* 토스트 */
.kx-hall__toast {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-neutral-900);
  color: var(--color-on-accent);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  z-index: 50;
  cursor: pointer;
}

/* ── 반응형 (공백없는 반응형 스윕 #39) — 배정 행/모달 폼 좁은 폭 단일 컬럼 ── */
@media (max-width: 640px) {
  .kx-hall__row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .kx-hall__form2 {
    grid-template-columns: 1fr;
  }
}
