/* 동의서 공유 (다층 대행사 배정 Step 1) — 공유 관리 모달 / 공유 대상 선택 모달 */

.cshare-body { padding: 18px 20px; }

.cshare-section { margin-bottom: 22px; }
.cshare-section:last-child { margin-bottom: 0; }

.cshare-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cshare-section-hint {
  margin: 0 0 10px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
}

.cshare-list { display: flex; flex-direction: column; gap: 8px; }

.cshare-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.cshare-row-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cshare-row-name { font-size: 13px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cshare-badge {
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: #eef2ff;
  color: #4338ca;
  white-space: nowrap;
}
.cshare-badge.is-zero { background: #f1f5f9; color: #94a3b8; }

.cshare-btn {
  padding: 6px 13px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.cshare-btn:hover { background: #e0e7ff; }

.cshare-empty {
  text-align: center;
  padding: 28px 20px;
  color: #94a3b8;
  font-size: 12px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
  line-height: 1.6;
}

/* 받은 공유 — 광고주(B) 아코디언 */
.cshare-adv { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.cshare-adv + .cshare-adv { margin-top: 8px; }
.cshare-adv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
}
.cshare-adv-head:hover { background: #f1f5f9; }
.cshare-adv-chevron { transition: transform .18s ease; color: #94a3b8; flex-shrink: 0; }
.cshare-adv.is-open .cshare-adv-chevron { transform: rotate(90deg); }

.cshare-adv-templates { display: none; padding: 6px 10px 10px; flex-direction: column; gap: 6px; }
.cshare-adv.is-open .cshare-adv-templates { display: flex; }

.cshare-tpl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.cshare-tpl-row:hover { background: #eff6ff; border-color: #bfdbfe; }
.cshare-tpl-name { font-size: 12px; font-weight: 600; color: #1e293b; }
.cshare-tpl-view { font-size: 11px; color: #2563eb; font-weight: 600; white-space: nowrap; flex-shrink: 0; }

.cshare-status {
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
}
.cshare-status.st-draft    { background: #eef2ff; color: #6366f1; }
.cshare-status.st-active   { background: #d1fae5; color: #065f46; }
.cshare-status.st-archived { background: #f3f4f6; color: #6b7280; }

/* 내보낸 공유 — 공유 동의서 아래 연동 캠페인(유입경로·상태) */
.cshare-sub-empty {
  font-size: 11px;
  color: #94a3b8;
  padding: 6px 4px;
}
.cshare-shared-tpl {
  padding: 8px 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fff;
}
.cshare-shared-tpl + .cshare-shared-tpl { margin-top: 6px; }
.cshare-shared-tpl-head {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cshare-camp-list { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.cshare-camp-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 12px;
}
.cshare-camp-name { color: #334155; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cshare-inflow-badge {
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 공유 대상 선택(picker) 모달 */
.cshare-picker { padding: 16px 20px; }
.cshare-picker-agency {
  font-size: 12px;
  color: #475569;
  margin: 0 0 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.cshare-picker-agency strong { color: #0f172a; }
.cshare-picker-list { display: flex; flex-direction: column; gap: 9px; }
.cshare-picker-item {
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}
.cshare-picker-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cshare-picker-item .cshare-camp-list { margin-top: 8px; }
.cshare-picker-item .cshare-sub-empty { margin-top: 6px; padding: 4px; }
.cshare-picker-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.cshare-picker-empty {
  text-align: center;
  padding: 30px 20px;
  color: #94a3b8;
  font-size: 12px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
}
