/* Meta (app/views/app/meta): each business with its Page, Instagram and ad account; Connect Meta's matching screen */
.mt-row { flex-wrap: wrap; gap: 8px 16px; }
.mt-row .list-main { flex: 0 0 200px; color: inherit; text-decoration: none; }
.mt-cells { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.mt-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--soft); color: var(--n700); font-size: 13px; }
.mt-cell span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-cell .i { flex: none; }
.mt-cell.on { background: var(--p100); color: var(--p700); font-weight: 600; }
.mt-cell.bad { background: #FDEBDD; color: #C2410C; font-weight: 600; }

.mt-match { padding: 0; }
.mt-head, .mt-line { display: grid; grid-template-columns: minmax(140px, 1fr) repeat(3, minmax(0, 1.4fr)); gap: 10px 14px; align-items: center; padding: 10px 16px; }
.mt-head { border-bottom: 1px solid var(--line); color: var(--n700); font-size: 12.5px; font-weight: 600; }
.mt-head span { display: inline-flex; align-items: center; gap: 6px; }
.mt-line + .mt-line { border-top: 1px solid var(--line); }
.mt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-line label { display: block; min-width: 0; margin: 0; }
.mt-line label .sub { display: none; }
.mt-line select { width: 100%; height: 36px; }
.mt-go { justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .mt-head { display: none; }
  .mt-line { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mt-line label .sub { display: block; font-size: 12px; margin-bottom: 2px; }
  .mt-row .list-main { flex-basis: 100%; }
}
.mt-ports { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.mt-sub { margin: 24px 0 10px; font-size: 15px; }

/* the portfolios: each opens Check again and Remove; staff paste a token */
.mt-port { position: relative; }
.mt-port > summary { list-style: none; cursor: pointer; }
.mt-port > summary::-webkit-details-marker { display: none; }
.mt-pop { position: absolute; z-index: 5; top: 34px; left: 0; display: flex; gap: 6px; padding: 8px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 8px 20px rgba(0, 0, 0, .12); white-space: nowrap; }
.mt-pop form { margin: 0; }
.mt-token input { width: 260px; height: 36px; }
/* a business's pencil: its Page, Instagram and ad account in dropdowns, a row of their own under it */
.mt-row:has(.mt-edit) { position: relative; padding-right: 56px; }
.mt-edit[open] { flex: 0 0 100%; }
.mt-edit > summary { position: absolute; top: 9px; right: 12px; list-style: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--n700); cursor: pointer; }
.mt-edit > summary::-webkit-details-marker { display: none; }
.mt-edit > summary:hover, .mt-edit[open] > summary { background: var(--soft); color: var(--ink); }
.mt-set { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px 12px; align-items: end; width: 100%; padding: 8px 0 4px; }
.mt-set label { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.mt-set label .sub { font-size: 12px; }
.mt-set select { width: 100%; height: 36px; }
.mt-assign { display: flex; gap: 8px; margin-left: auto; }
.mt-assign select { height: 34px; width: auto; max-width: 200px; }
@media (max-width: 860px) {
  .mt-set { grid-template-columns: minmax(0, 1fr); }
  .mt-set .btn { justify-self: start; }
  .mt-assign { margin-left: 0; width: 100%; }
  .mt-assign select { flex: 1; max-width: none; }
  .mt-pop { flex-direction: column; }
  .mt-token input { width: 200px; }
}
