/* The catalogue shares the self-hosted Manrope font and palette of the inbox. */
.workspace:has(.media-catalog) { --text:#101828; --muted:#667085; --line:#e4e7ec; --blue:#0a6fb0; --blue-soft:#eef6fc; font-family:"Inbox Manrope",system-ui,sans-serif; background:#f4f5f7; color:#101828; }
.workspace:has(.media-catalog) :is(button,input,select,textarea) { font-family:inherit; }
.main:has(.media-catalog) > .topbar { height:68px; padding-inline:24px; background:#fff; border-color:#e4e7ec; }
.main:has(.media-catalog) > .wrap { max-width:1800px; padding:22px 24px 28px; }
.media-catalog { display:flex; flex-direction:column; gap:18px; min-width:0; container-type:inline-size; }
.media-catalog .btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px; padding:7px 12px; border:1px solid #d0d5dd; border-radius:8px; color:#344054; background:#fff; font-size:12px; font-weight:700; line-height:1.4; box-shadow:none; cursor:pointer; }
.media-catalog .btn:hover:not(:disabled) { border-color:#98a2b3; background:#f9fafb; }
.media-catalog .btn:disabled { opacity:.5; cursor:not-allowed; }
.media-catalog .btn.primary { color:#fff; background:#0a6fb0; border-color:#0a6fb0; }
.media-catalog .btn.primary:hover:not(:disabled) { background:#075689; border-color:#075689; }
.media-catalog :is(button,a,input,select,summary):focus-visible { outline:2px solid #0a6fb0; outline-offset:-2px; }
.media-catalog button svg,.media-catalog a svg { width:16px; height:16px; flex-shrink:0; }
.media-catalog .f { min-width:0; gap:6px; font-size:11px; font-weight:800; letter-spacing:.04em; color:#667085; }
.media-catalog input,.media-catalog select,.media-catalog .select-trigger { width:100%; height:40px; min-height:40px; padding-inline:12px; border:1px solid #d0d5dd; border-radius:10px; background:#fff; color:#101828; font-size:13px; font-weight:500; box-shadow:none; letter-spacing:0; }
.media-catalog .select-trigger { padding-right:34px; }
.media-catalog .select-control { min-width:0; max-width:100%; }
.catalog-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; }
.catalog-title { display:flex; align-items:center; gap:14px; }
.catalog-title-icon { display:grid; place-items:center; flex-shrink:0; width:44px; height:44px; border-radius:12px; color:#0a6fb0; background:#eef6fc; }
.catalog-title-icon svg { width:24px; height:24px; }
.catalog-title h1 { margin:0; font-size:26px; line-height:1.3; font-weight:800; letter-spacing:-.6px; }
.catalog-title p { margin:4px 0 0; color:#475467; font-size:13px; line-height:1.5; }
.catalog-title strong { color:#101828; font-weight:600; }
.catalog-toolbar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; }
.catalog-toolbar .btn { height:40px; border-radius:10px; }
.catalog-upload-account { width:170px; }
.catalog-toolbar input[hidden] { display:none; }
#media-upload-status { margin:0; font-size:13px; }
#media-upload-status:empty { display:none; }
.catalog-tip { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:10px 14px; border:1px solid #b9daf0; border-radius:12px; background:#eef6fc; color:#0a4f7e; font-size:13px; line-height:1.6; }
.catalog-tip > span { display:flex; align-items:center; gap:10px; flex:1 1 360px; min-width:0; }
.catalog-tip > span > svg { width:18px; height:18px; flex-shrink:0; }
.catalog-tip .btn { flex-shrink:0; min-height:32px; border-color:#b9daf0; color:#0a5f96; font-size:11px; }
.catalog-filters { display:flex; flex-direction:column; gap:16px; padding:16px 20px; background:#fff; border:1px solid #e4e7ec; border-radius:16px; }
.catalog-filter-groups { display:flex; align-items:center; flex-wrap:wrap; gap:16px 24px; }
.catalog-filter-group { display:flex; align-items:center; flex-wrap:wrap; gap:10px; min-width:0; }
.catalog-filter-group > b { color:#667085; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.catalog-segment { display:flex; align-items:center; flex-wrap:wrap; gap:2px; padding:3px; border-radius:20px; background:#f2f4f7; }
.media-catalog .catalog-segment .chip { min-height:32px; padding:6px 12px; margin:0; border:0; border-radius:18px; color:#475467; background:transparent; font-size:12px; font-weight:600; line-height:1.4; }
.media-catalog .catalog-segment .chip.on { color:#101828; background:#fff; box-shadow:0 1px 2px #1018281f; font-weight:800; }
.catalog-search { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) auto; align-items:end; gap:12px; }
.media-catalog .catalog-search-button { height:40px; color:#fff; background:#101828; border-color:#101828; border-radius:10px; }
.media-catalog .catalog-search-button:hover { background:#344054; border-color:#344054; }
.catalog-results { min-width:0; background:#fff; border:1px solid #e4e7ec; border-radius:16px; overflow:hidden; }
.catalog-results-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:14px 20px; }
.catalog-results-heading h2 { display:flex; align-items:center; gap:8px; margin:0; font-size:15px; font-weight:800; }
.catalog-results-heading h2 span { padding:2px 8px; border-radius:20px; background:#f2f4f7; color:#475467; font-size:12px; }
.catalog-pagination { display:flex; align-items:center; flex-wrap:wrap; gap:10px; color:#475467; font-size:12px; }
.catalog-pagination b { color:#101828; }
.catalog-table-wrap { overflow-x:auto; }
.media-catalog .catalog-table { width:100%; border-collapse:collapse; table-layout:fixed; margin:0; background:#fff; }
.catalog-table th { padding:10px 12px; text-align:left; background:#f9fafb; color:#667085; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; border-block:1px solid #eaecf0; }
.catalog-table th:nth-child(1) { width:8%; }
.catalog-table th:nth-child(2) { width:17%; }
.catalog-table th:nth-child(3) { width:9%; }
.catalog-table th:nth-child(4) { width:10%; }
.catalog-table th:nth-child(5) { width:20%; }
.catalog-table th:nth-child(6) { width:9%; }
.catalog-table th:nth-child(7) { width:16%; }
.catalog-table th:nth-child(8) { width:11%; }
.catalog-table td { padding:16px 12px; border:0; border-top:1px solid #eaecf0; vertical-align:top; font-size:12px; color:#344054; overflow-wrap:anywhere; }
.catalog-table tbody tr:hover { background:#fcfcfd; }
.catalog-thumb { display:block; width:96px; height:auto; aspect-ratio:1; max-width:100%; padding:0; overflow:hidden; border:0; border-radius:12px; background:#f2f4f7; cursor:pointer; }
.catalog-thumb .media-prev { display:grid; place-items:center; width:100%; height:100%; border-radius:inherit; object-fit:cover; font-size:30px; }
.catalog-file { display:flex; align-items:center; flex-wrap:wrap; gap:7px; min-width:0; }
.catalog-file b { color:#101828; font-size:13px; font-weight:800; line-height:1.5; overflow-wrap:anywhere; }
.catalog-type { padding:2px 6px; border-radius:6px; color:#0a5f96; background:#eef6fc; font-size:10px; font-weight:800; text-transform:uppercase; line-height:1.5; }
.catalog-date { color:#667085; font-size:11px; line-height:1.6; margin:8px 0; }
.catalog-tags { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.catalog-tag { background:#f2f4f7; color:#344054; border-radius:6px; padding:3px 7px; font-size:11px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.media-catalog .media-edit-tags { min-height:27px; padding:4px 7px; border:1px dashed #d0d5dd; border-radius:6px; color:#0a5f96; background:#fff; font-size:10px; gap:4px; }
.media-catalog .media-price { min-width:0; max-width:100%; padding:8px 9px; border-radius:8px; font-size:12px; white-space:normal; color:#0a5f96; background:#fff; }
.media-catalog .media-price.is-unset { border-style:dashed; }
.catalog-account > span { display:flex; align-items:center; gap:8px; }
.catalog-account i { display:grid; place-items:center; flex-shrink:0; width:28px; height:28px; border-radius:50%; font-size:12px; font-style:normal; font-weight:800; background:#ece9fb; color:#4b3ba8; }
.catalog-account b { color:#344054; font-size:12px; font-weight:700; }
.catalog-category-list { display:flex; flex-wrap:wrap; gap:6px; }
.catalog-category { --category-color:#98a2b3; display:inline-flex; align-items:center; gap:6px; max-width:100%; min-height:30px; padding:5px 9px 5px 8px; border:1px solid #e4e7ec; border-radius:18px; color:#344054; background:#fff; font-size:11px; font-weight:600; line-height:1.3; text-align:left; overflow-wrap:anywhere; cursor:pointer; }
.catalog-category > span { width:8px; height:8px; flex-shrink:0; border-radius:50%; background:var(--category-color); }
.catalog-category[aria-pressed="true"] { color:#fff; background:#101828; border-color:#101828; }
.catalog-category:hover { border-color:#98a2b3; }
.catalog-category.is-current { color:#fff; background:#101828; cursor:default; }
.catalog-category-add { border-style:dashed; color:#0a5f96; }
.catalog-category-add > span { width:auto; height:auto; border-radius:0; background:none; font-size:15px; }
.category-manager { font-family:"Inbox Manrope",system-ui,sans-serif; color:#101828; }
.category-manager h2 { font-size:22px; margin:0 0 8px; }
.category-manager > p { color:#475467; font-size:13px; line-height:1.6; margin:0 0 20px; }
.category-form { display:flex; flex-direction:column; gap:14px; }
.category-form .f { margin:0; color:#475467; font-size:12px; font-weight:700; }
.category-form :is(input,select,.select-trigger,button) { font-family:inherit; }
.category-form input,.category-form .select-trigger { border-radius:9px; min-height:40px; font-size:13px; }
.category-form .select-trigger { padding-right:34px; }
.category-form .btn { align-self:flex-start; min-height:40px; border-radius:9px; font-size:13px; }
.category-fields { display:grid; grid-template-columns:minmax(0,1fr) 78px; gap:12px; align-items:end; }
.category-fields .f { min-width:0; }
.category-color input { width:100%; height:42px; padding:4px; cursor:pointer; }
.category-scope-note { margin:0; color:#475467; font-size:12px; line-height:1.6; }
.category-manager-list { display:flex; flex-direction:column; max-height:220px; overflow-y:auto; border:1px solid #e4e7ec; border-radius:10px; }
.category-manager-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border-bottom:1px solid #e4e7ec; }
.category-manager-item:last-child { border:0; }
.category-manager-item > span { display:flex; align-items:center; gap:8px; min-width:0; font-size:13px; overflow-wrap:anywhere; }
.category-manager-item i { width:10px; height:10px; flex:0 0 10px; border-radius:50%; }
.category-empty { margin:0; padding:18px 14px; color:#667085; font-size:13px; line-height:1.6; background:#f9fafb; }
.category-error { margin:0; color:#b42318; font-size:13px; }
.category-manager :is(button,input,select):focus-visible { outline:2px solid #0a6fb0; outline-offset:-2px; }
.category-manager :is(input,select):focus,.category-manager .select-trigger:is(:focus-visible,[aria-expanded="true"]) { outline:2px solid #0a6fb0; outline-offset:-2px; border-color:#0a6fb0; box-shadow:none; }
.catalog-ai-control { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding-top:3px; font-size:11px; font-weight:700; }
.catalog-switch { position:relative; width:44px; height:24px; padding:0; flex-shrink:0; border:0; border-radius:20px; background:#d0d5dd; cursor:pointer; }
.catalog-switch::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 2px #10182833; }
.catalog-switch[aria-checked="true"] { background:#0a6fb0; }
.catalog-switch[aria-checked="true"]::after { left:23px; }
.catalog-switch:disabled { cursor:wait; opacity:.5; }
.catalog-analysis { display:block; color:#667085; font-size:11px; line-height:1.5; margin-bottom:8px; }
.catalog-analysis.is-confirmed { color:#067647; }
.catalog-analysis.is-failed { color:#b42318; }
.catalog-classification-choices { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:3px; max-width:250px; border-radius:10px; background:#f2f4f7; }
.catalog-classification-choices button { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:38px; padding:5px; border:0; border-radius:8px; color:#475467; background:transparent; font-size:11px; font-weight:600; line-height:1.35; overflow-wrap:anywhere; cursor:pointer; }
.catalog-classification-choices button[aria-pressed="true"] { color:#101828; background:#fff; box-shadow:0 1px 2px #1018281f; font-weight:800; }
.catalog-classification-choices button span { font-size:10px; color:#667085; }
.catalog-classification-choices button[aria-pressed="true"] span { color:#0a5f96; }
.catalog-description { margin:8px 0 0; color:#667085; font-size:11px; line-height:1.6; }
.catalog-description:empty { display:none; }
.catalog-row-actions { display:flex; flex-wrap:wrap; gap:6px; }
.media-catalog .catalog-icon { width:32px; min-height:34px; height:34px; padding:7px; flex-shrink:0; }
.media-catalog .catalog-delete { color:#b42318; border-color:#fecdca; }
.media-catalog .catalog-delete:hover { background:#fef3f2; border-color:#fda29b; }
.catalog-empty td { padding:48px 20px; text-align:center; color:#667085; }
.catalog-creator .catalog-table th:nth-child(1) { width:12%; }
.catalog-creator .catalog-table th:nth-child(2) { width:26%; }
.catalog-creator .catalog-table th:nth-child(3) { width:14%; }
.catalog-creator .catalog-table th:nth-child(4) { width:18%; }
.catalog-creator .catalog-table th:nth-child(5) { width:18%; }
.catalog-creator .catalog-table th:nth-child(6) { width:12%; }
/* Use the same row contents as compact cards when all eight columns cannot fit. */
@container (max-width:1280px) {
  .catalog-toolbar { width:100%; }
  .catalog-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .media-catalog .catalog-table,.catalog-table tbody { display:block; }
  .catalog-table tbody { padding:0 16px 16px; }
  .catalog-table .catalog-row { display:grid; grid-template-columns:80px minmax(0,1fr) minmax(130px,.8fr) minmax(160px,.8fr); align-items:start; gap:14px 18px; padding:18px; margin-top:12px; border:1px solid #e4e7ec; border-radius:12px; }
  .catalog-table .catalog-row:first-child { margin-top:0; }
  .catalog-table .catalog-row td { min-width:0; padding:0; border:0; }
  .catalog-row td[data-label]::before { content:attr(data-label); display:block; margin-bottom:7px; color:#667085; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
  .catalog-preview { grid-column:1; grid-row:1; }
  .catalog-thumb { width:80px; height:80px; }
  .catalog-details { grid-column:2 / 4; grid-row:1; }
  .catalog-action-cell { grid-column:4; grid-row:1; justify-self:end; }
  .catalog-price-cell { grid-column:1 / 3; grid-row:2; }
  .catalog-account { grid-column:3; grid-row:2; }
  .catalog-ai { grid-column:4; grid-row:2; }
  .catalog-categories { grid-column:1 / 3; grid-row:3; }
  .catalog-classification { grid-column:3 / 5; grid-row:3; }
  .catalog-empty { display:block; }
  .catalog-empty td { display:block; }
  .catalog-creator .catalog-account { grid-column:3 / 5; }
  .catalog-creator .catalog-categories { grid-column:1 / -1; }
}
@container (max-width:700px) {
  .catalog-title h1 { font-size:23px; }
  .catalog-toolbar .btn { flex:1 1 auto; }
  .catalog-upload-account { width:100%; }
  .catalog-filters { padding:14px; }
  .catalog-filter-group { width:100%; }
  .catalog-search { grid-template-columns:1fr auto; }
  .catalog-search > .f:first-child { grid-column:1 / -1; }
  .catalog-results-heading { padding:14px; }
  .catalog-pagination { justify-content:space-between; width:100%; gap:6px; }
  .catalog-table tbody { padding:0 10px 10px; }
  .catalog-table .catalog-row { grid-template-columns:72px minmax(0,1fr); gap:16px 12px; padding:14px; }
  .catalog-thumb { width:72px; height:72px; }
  .catalog-details { grid-column:2; grid-row:1; }
  .catalog-price-cell { grid-column:1 / -1; grid-row:2; }
  .catalog-account,.catalog-creator .catalog-account { grid-column:1 / -1; grid-row:3; }
  .catalog-categories { grid-column:1 / -1; grid-row:4; }
  .catalog-ai { grid-column:1 / -1; grid-row:5; }
  .catalog-classification { grid-column:1 / -1; grid-row:6; }
  .catalog-action-cell { grid-column:1 / -1; grid-row:7; justify-self:start; }
  .catalog-creator .catalog-action-cell { grid-row:5; }
  .catalog-row-actions .catalog-icon { width:38px; height:38px; }
}
@media (max-width:760px) {
  .main:has(.media-catalog) > .wrap { padding:16px 12px; }
  .main:has(.media-catalog) > .topbar { padding-inline:16px; }
}
