/**
 * AI CineCatch — 작품별 제작 툴 chip UI (공유)
 * submit-work · admin-work-create · admin-review 공통
 */

.wtool-helper--intro {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.52);
}

.wtool-field {
  margin-bottom: 16px;
}

.wtool-field:last-child {
  margin-bottom: 0;
}

.wtool-label-optional {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
}

.wtool-tool-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.wtool-category {
  --wtool-accent: rgba(255, 255, 255, 0.72);
  --wtool-accent-rgb: 255, 255, 255;
  border-radius: 10px;
  border: 1px solid rgba(var(--wtool-accent-rgb), 0.18);
  background: linear-gradient(
    145deg,
    rgba(var(--wtool-accent-rgb), 0.07) 0%,
    rgba(255, 255, 255, 0.018) 55%,
    rgba(0, 0, 0, 0.08) 100%
  );
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wtool-category--video { --wtool-accent: #38bdf8; --wtool-accent-rgb: 56, 189, 248; }
.wtool-category--image { --wtool-accent: #f472b6; --wtool-accent-rgb: 244, 114, 182; }
.wtool-category--audio { --wtool-accent: #a78bfa; --wtool-accent-rgb: 167, 139, 250; }
.wtool-category--post { --wtool-accent: #fbbf24; --wtool-accent-rgb: 251, 191, 36; }
.wtool-category--assist { --wtool-accent: #818cf8; --wtool-accent-rgb: 129, 140, 248; }
.wtool-category--other { --wtool-accent: #94a3b8; --wtool-accent-rgb: 148, 163, 184; }

.wtool-category.is-open {
  border-color: rgba(var(--wtool-accent-rgb), 0.32);
  box-shadow: inset 3px 0 0 rgba(var(--wtool-accent-rgb), 0.55);
}

.wtool-category__icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--wtool-accent-rgb), 0.14);
  border: 1px solid rgba(var(--wtool-accent-rgb), 0.26);
  color: var(--wtool-accent);
}

.wtool-category__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wtool-category__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.wtool-category__head:hover {
  background: rgba(var(--wtool-accent-rgb), 0.07);
}

.wtool-category.is-open .wtool-category__head {
  background: rgba(var(--wtool-accent-rgb), 0.06);
}

.wtool-category__title {
  flex: 1 1 auto;
  min-width: 0;
}

.wtool-category__count {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--wtool-accent-rgb), 0.16);
  border: 1px solid rgba(var(--wtool-accent-rgb), 0.34);
  color: var(--wtool-accent);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.wtool-category__count:empty {
  display: none;
}

.wtool-category__chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(var(--wtool-accent-rgb), 0.55);
  border-bottom: 2px solid rgba(var(--wtool-accent-rgb), 0.55);
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-top: -3px;
}

.wtool-category.is-open .wtool-category__chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.wtool-category__body {
  display: none;
  padding: 0 10px 10px;
  border-top: 1px solid rgba(var(--wtool-accent-rgb), 0.1);
}

.wtool-category.is-open .wtool-category__body {
  display: block;
}

.wtool-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  padding: 10px 12px;
  background: rgba(var(--wtool-accent-rgb), 0.03);
  border-radius: 0 0 8px 8px;
}

.wtool-chip-select {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.wtool-chip-select:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.wtool-chip-select.is-active {
  border-color: rgba(242, 193, 78, 0.55);
  background: rgba(242, 193, 78, 0.14);
  color: #fff;
}

.wtool-field--tools-other.is-disabled input,
.wtool-field--tools-other.is-disabled textarea {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

.wtool-visibility {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.wtool-visibility label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.wtool-visibility input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f2c14e;
}

/* 관리자 검수 — admin-review-chip과 동일 톤 */
.admin-review-section--production .wtool-chip-select {
  font-size: 0.74rem;
  padding: 5px 10px;
}

.admin-review-section--production .admin-review-textarea {
  min-height: 72px;
}

/* submit-work / awc 패널 내 여백 */
.submit-work-panel--production,
.awc-panel--production {
  margin-top: 14px;
}

@media (max-width: 767px) {
  .wtool-chip-grid {
    gap: 7px;
  }

  .wtool-chip-select {
    font-size: 0.74rem;
  }
}
