/* ========================================
   collabs.css — creator collabs (Oct 31, 2026)
   Edit panel Collaborators section, the search / review / collection sheets,
   the Creator Studio banner and Collabs tab, "Collab requests" in
   Notifications, and "with @handle" on sticker detail.
   JS: web/js/collab-requests.js, web/js/studio/cs-collabs.js
   ======================================== */

/* ---- Collaborators section (inside the Edit panel, .em-f) ---- */
.cb-body { display: flex; flex-direction: column; gap: 8px; }
.cb-list { display: flex; flex-direction: column; border: 1px solid var(--th-line-e4e4e7, #e4e4e7); border-radius: 12px; overflow: hidden; }
.cb-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; width: 100%;
  border: 0; border-bottom: 1px solid var(--th-line-e4e4e7, #e4e4e7);
  background: var(--th-bg-ffffff, #fff); color: var(--th-fg-18181b, #18181b);
  font-family: 'Poppins', sans-serif; text-align: left; box-sizing: border-box;
}
.cb-row:last-child { border-bottom: 0; }
.cb-row--pick { cursor: pointer; }
.cb-row--pick:hover:not([disabled]) { background: var(--th-bg-f6f5f9, #f6f5f9); }
.cb-row--pick[disabled] { cursor: default; opacity: .55; }
.cb-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.cb-av--x {
  display: flex; align-items: center; justify-content: center;
  background: var(--th-bg-ede9fe, #ede9fe); color: var(--th-fg-6d28d9, #6d28d9);
  font-weight: 700; font-size: 14px;
}
.cb-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-hd { font-size: 12px; color: var(--th-fg-71717a, #71717a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-st {
  font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--th-bg-f4f4f5, #f4f4f5); color: var(--th-fg-52525b, #52525b);
}
.cb-st--wait { background: var(--th-bg-ede9fe, #ede9fe); color: var(--th-fg-6d28d9, #6d28d9); }
.cb-st--ok { background: var(--th-bg-ccfbf1, #ccfbf1); color: var(--th-fg-0f766e, #0f766e); }
.cb-st--no { color: var(--th-fg-71717a, #71717a); }
.cb-link {
  border: 0; background: none; padding: 4px 0 4px 4px; cursor: pointer; white-space: nowrap;
  font: 600 13px 'Poppins', sans-serif; color: var(--th-fg-6d28d9, #6d28d9);
}
.cb-add {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 11px;
  border: 1.5px dashed var(--th-line-d4d4d8, #d4d4d8); border-radius: 12px; background: none; cursor: pointer;
  font: 600 14px 'Poppins', sans-serif; color: var(--th-fg-18181b, #18181b);
}
.cb-add svg { width: 16px; height: 16px; }
.cb-add[disabled] { cursor: default; color: var(--th-fg-a1a1aa, #a1a1aa); }
.cb-lock {
  background: var(--th-bg-f6f5f9, #f6f5f9); border-radius: 12px; padding: 11px 14px;
  font-size: 13px; line-height: 1.5; color: var(--th-fg-3f3f46, #3f3f46);
}

/* ---- Sheets (search, review, collection, your collab) ---- */
.cb-scrim {
  position: fixed; inset: 0; z-index: 1500; background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.cb-scrim--top { z-index: 1600; }
.cb-sheet {
  width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; box-sizing: border-box;
  background: var(--th-bg-ffffff-up, #fff); color: var(--th-fg-18181b, #18181b);
  border-radius: 20px 20px 0 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  font-family: 'Poppins', sans-serif; box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
  animation: cb-up .28s cubic-bezier(.32, .72, 0, 1);
}
.cb-sheet--left { align-items: stretch; text-align: left; }
@keyframes cb-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .cb-sheet { animation: none; } }
@media (min-width: 769px) {
  .cb-scrim { align-items: center; }
  .cb-sheet { border-radius: 20px; padding-bottom: 24px; }
}
.cb-grab { width: 36px; height: 4px; border-radius: 2px; background: var(--th-bg-d4d4d8, #d4d4d8); align-self: center; flex-shrink: 0; }
.cb-sheet-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cb-sheet h3 { margin: 0; font-size: 17px; font-weight: 700; }
.cb-sheet p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--th-fg-3f3f46, #3f3f46); }
.cb-x {
  width: 32px; height: 32px; border-radius: 50%; border: 0; flex-shrink: 0; cursor: pointer;
  background: var(--th-bg-f4f4f5, #f4f4f5); color: var(--th-fg-18181b, #18181b);
  display: flex; align-items: center; justify-content: center;
}
.cb-x svg { width: 15px; height: 15px; }
.cb-art { width: 120px; height: 120px; object-fit: contain; }
.cb-prev {
  width: 100%; box-sizing: border-box; background: var(--th-bg-f6f5f9, #f6f5f9); border-radius: 12px;
  padding: 10px 12px; font-size: 13px; color: var(--th-fg-3f3f46, #3f3f46);
}
.cb-prev b { color: var(--th-fg-18181b, #18181b); }
.cb-ok, .cb-save {
  width: 100%; height: 46px; border-radius: 999px; border: 0; cursor: pointer; margin-top: 4px;
  background: linear-gradient(to top right, #6D28D9, #14B8A6); color: #fff; font: 700 15px 'Poppins', sans-serif;
}
.cb-save { background: #14B8A6; }
.cb-ok[disabled], .cb-save[disabled], .cb-no[disabled] { opacity: .6; cursor: default; }
.cb-no {
  width: 100%; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--th-bg-f1f1f4, #f1f1f4); color: var(--th-fg-18181b, #18181b); font: 700 14px 'Poppins', sans-serif;
}
.cb-no--bad { color: var(--th-fg-dc2626, #dc2626); }
.cb-plain { border: 0; background: none; cursor: pointer; padding: 6px; font: 600 14px 'Poppins', sans-serif; color: var(--th-fg-71717a, #71717a); }
.cb-sheet .cb-small { font-size: 12px; color: var(--th-fg-71717a, #71717a); }
.cb-srch {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--th-line-e4e4e7, #e4e4e7); color: var(--th-fg-71717a, #71717a);
}
.cb-srch svg { width: 17px; height: 17px; flex-shrink: 0; }
.cb-srch input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: 400 16px 'Poppins', sans-serif; color: var(--th-fg-18181b, #18181b);
}
.cb-srch:focus-within { border-color: #14B8A6; }
.cb-res { min-height: 120px; }
.cb-empty { padding: 16px 8px; text-align: center; font-size: 13px !important; color: var(--th-fg-71717a, #71717a) !important; }

/* ---- Creator Studio: banner ---- */
#cb-banners { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
#cb-banners[hidden] { display: none; }
.cb-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; cursor: pointer;
  background: var(--th-bg-ede9fe, #ede9fe); color: var(--th-fg-18181b, #18181b); font-family: 'Poppins', sans-serif;
}
.cb-banner:focus-visible { outline: 2px solid #6D28D9; outline-offset: 2px; }
.cb-banner img, .cb-banner-ph {
  width: 46px; height: 46px; border-radius: 8px; object-fit: contain; flex-shrink: 0;
  background: var(--th-bg-ffffff-up, #fff);
}
.cb-banner-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-banner-k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--th-fg-6d28d9, #6d28d9); }
.cb-banner-m { font-size: 13.5px; line-height: 1.4; }
.cb-banner-b {
  flex-shrink: 0; border-radius: 999px; padding: 7px 14px;
  background: #6D28D9; color: #fff; font-size: 13px; font-weight: 600;
}
.cb-banner-more { margin: 0; font-size: 12px; color: var(--th-fg-71717a, #71717a); }

/* ---- Creator Studio: Collabs tab ---- */
#panel-manage.cb-on #mv-toolbar,
#panel-manage.cb-on #mv-colls,
#panel-manage.cb-on #view-live-stickers,
#panel-manage.cb-on #view-sticker-sheets,
#panel-manage.cb-on #view-backgrounds,
#panel-manage.cb-on .mv-selbar,
#panel-manage.cb-on .mv-bar { display: none !important; }
#panel-manage:not(.cb-on) #view-collabs { display: none; }
.cb-tip { margin: 14px 0 10px; font-size: 13px; color: var(--th-fg-71717a, #71717a); }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding-bottom: 24px; }
@media (max-width: 768px) { .cb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cb-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  text-align: left; font-family: 'Poppins', sans-serif; color: var(--th-fg-18181b, #18181b); min-width: 0;
}
.cb-tile-pic {
  position: relative; aspect-ratio: 1; border-radius: 6px; border: .5px solid var(--th-line-e4e4e7, #e4e4e7);
  background: var(--th-bg-f4f4f5, #f4f4f5); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cb-tile-pic--tall { aspect-ratio: 9 / 13; }
.cb-tile-pic img { width: 82%; height: 82%; object-fit: contain; }
.cb-tile-pic--tall img { width: 100%; height: 100%; object-fit: cover; }
.cb-tile-nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-tile-by { font-size: 12px; color: var(--th-fg-71717a, #71717a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Notifications: Collab requests ---- */
.cb-notif { margin-bottom: 8px; }
.cb-notif-h {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-text-muted, #71717a); padding: 12px 16px 6px; font-family: 'Poppins', sans-serif;
}
.cb-notif-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  background: var(--th-bg-faf8fe, #faf8fe); border-bottom: .5px solid var(--th-line-efedf2, #efedf2);
  font-family: 'Poppins', sans-serif;
}
.cb-notif-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.cb-notif-av--x {
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
  background: var(--th-bg-ede9fe, #ede9fe); color: var(--th-fg-6d28d9, #6d28d9);
}
.cb-notif-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; color: var(--th-fg-111111, #111); }
.cb-notif-txt b { font-weight: 600; }
.cb-notif-btns { display: flex; gap: 8px; margin-top: 8px; }
.cb-notif-ok, .cb-notif-no {
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 600 13px 'Poppins', sans-serif;
}
.cb-notif-ok { border: 0; background: #6D28D9; color: #fff; }
.cb-notif-no { border: 1.5px solid var(--th-line-e5e7eb, #e5e7eb); background: var(--th-bg-ffffff, #fff); color: var(--th-fg-71717a, #71717a); }
.cb-notif-ok[disabled], .cb-notif-no[disabled] { opacity: .6; cursor: default; }
.cb-notif-done { font-size: 13px; color: var(--th-fg-71717a, #71717a); }
.cb-notif-thumb {
  width: 40px; height: 40px; border-radius: 6px; object-fit: contain; flex-shrink: 0; cursor: pointer;
  background: var(--th-bg-f4f4f5, #f4f4f5); border: .5px solid var(--th-line-e4e4e7, #e4e4e7);
}

/* ---- Sticker detail: "by @a with @b" ---- */
.sb-item-creator.is-link.has-collab { text-decoration: none; cursor: default; }
.sb-item-collab-owner, .sb-item-collab-h { cursor: pointer; text-decoration: underline; }
.sb-item-collab-h:hover { opacity: .8; }
