/* ── Itdasy 작업실 화면 ─────────────────────────────────────────
   §5.9 슬롯 편집 풀스크린 + 슬롯카드 + 패널 바텀시트
   의존: tokens.css (vars), components.css (btn-*), details.css (dt-*)
   ────────────────────────────────────────────────────────────── */

/* ══ Step3: 슬롯 카드 (가로 스크롤 트레이) ═════════════════════ */

.ws-slot-card {
  flex-shrink: 0;
  width: 140px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px;
  user-select: none;
  position: relative;
  transition: border-color 0.15s;
}

.ws-slot-card--done {
  border-color: rgba(22, 181, 94, 0.5);
}

.ws-slot-card__del {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--text-subtle);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ws-slot-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
}

.ws-slot-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ws-slot-card__thumb-count {
  position: absolute;
  bottom: 4px; right: 4px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 9px;
  color: #fff;
  font-weight: 700;
}

.ws-slot-card__empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  border: 2px dashed rgba(241, 128, 145, 0.35);
  background: rgba(241, 128, 145, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-subtle);
}

.ws-slot-card__meta {
  margin-top: 6px;
  text-align: center;
}

.ws-slot-card__name {
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.ws-slot-card__count {
  font-size: 10px;
  color: var(--text-subtle);
  margin-top: 2px;
}

/* ══ Step3: 슬롯 편집 툴바 ════════════════════════════════════ */

.ws-toolbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 10px;
  padding-bottom: max(8px, calc(env(safe-area-inset-bottom) + 8px));
  display: flex;
  gap: 6px;
  z-index: 2;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ws-toolbar__btn {
  flex: 1;
  min-width: 60px;
  padding: 10px 6px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1;
}

.ws-toolbar__btn:active {
  background: var(--surface-2);
}

.ws-toolbar__btn--active {
  border-color: var(--brand);
  background: var(--brand-bg);
  color: var(--brand-strong);
}

/* ══ Step4: 패널 바텀시트 껍데기 ════════════════════════════════ */

.ws-panel {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0, 0, 0, 0.5);
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

.ws-panel--open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .ws-panel,
  .ws-panel--open {
    transition: none;
  }
}

.ws-panel__sheet {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.ws-panel__sheet--sm  { max-height: 55vh; }
.ws-panel__sheet--md  { max-height: 75vh; }
.ws-panel__sheet--lg  { max-height: 85vh; }

.ws-panel__hdr {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ws-panel__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.ws-panel__close {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  color: var(--text-subtle);
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

/* reviewEditor / elementEditor — 풀스크린 다크 편집기 */
.ws-editor {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: #000;
  flex-direction: column;
}

.ws-editor--open {
  display: flex;
}
