/* KTS Private Market V42 — true list renderer */
.deal-market-grid,
.collab-preview-grid,
.collab-my-grid{
  display:block!important;
  overflow:hidden;
  border:1px solid rgba(60,60,67,.10);
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 26px rgba(0,0,0,.045);
}

.opportunity-list-row{
  display:grid!important;
  grid-template-columns:minmax(260px,1.35fr) minmax(360px,1.65fr) minmax(115px,.45fr);
  align-items:center;
  gap:16px;
  min-height:94px;
  padding:13px 16px;
  border:0!important;
  border-bottom:1px solid rgba(60,60,67,.10)!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  cursor:pointer;
  transition:background .14s ease;
}
.opportunity-list-row:last-child{border-bottom:0!important}
.opportunity-list-row:hover{background:rgba(0,122,255,.028)!important;transform:none!important;box-shadow:none!important}

.opportunity-row-identity{min-width:0}
.opportunity-row-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}
.opportunity-row-top .card-badges{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.opportunity-row-code{font-size:9px;color:var(--ios-tertiary);white-space:nowrap}
.opportunity-row-name{min-width:0}
.opportunity-row-asset{display:block;margin-bottom:2px;color:var(--ios-blue);font-size:9px;font-weight:700;letter-spacing:.02em}
.opportunity-row-name h3{margin:0!important;font-family:var(--ios-font)!important;font-size:16px!important;line-height:1.15!important;font-weight:720!important;letter-spacing:-.018em!important;white-space:normal}
.opportunity-row-subtitle{display:block;margin-top:3px;color:var(--ios-secondary);font-size:10px;line-height:1.3}
.opportunity-row-source{display:block;margin-top:4px;color:var(--ios-secondary);font-size:9px;font-weight:600}

.opportunity-row-facts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  min-width:0;
}
.opportunity-row-fact{
  min-width:0;
  padding:5px 11px;
  border-left:1px solid var(--ios-line);
}
.opportunity-row-fact:nth-child(odd){border-left:0}
.opportunity-row-fact span{display:block;margin-bottom:2px;color:var(--ios-secondary);font-size:8px;font-weight:600}
.opportunity-row-fact strong{display:block;color:var(--ios-text);font-size:11px;font-weight:650;line-height:1.2;overflow-wrap:anywhere}
.opportunity-row-fact.value strong{font-size:14px;font-weight:740;letter-spacing:-.02em}

.opportunity-row-action{
  display:flex;
  min-width:0;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:7px;
  text-align:right;
}
.opportunity-row-action .card-badges{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.opportunity-row-status{font-size:9px;color:var(--ios-secondary);font-weight:600}
.opportunity-row-open{color:var(--ios-blue);font-size:11px;font-weight:700;white-space:nowrap}
.opportunity-list-row>.ux-favorite{
  grid-column:3;
  justify-self:end;
  position:static!important;
  width:auto!important;
  min-height:30px!important;
  margin:0!important;
  padding:5px 8px!important;
  border-radius:9px!important;
  box-shadow:none!important;
}

/* Collaborator home list */
.collab-preview-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:
    "top top"
    "title value"
    "meta value"
    "prompt prompt";
  gap:3px 12px;
  padding:12px 15px;
  border:0!important;
  border-bottom:1px solid var(--ios-line)!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  cursor:pointer;
}
.collab-preview-row:last-child{border-bottom:0!important}
.collab-preview-row:hover{background:rgba(0,122,255,.028)!important}
.collab-preview-row .collab-preview-top{grid-area:top}
.collab-preview-row .collab-preview-top>.collab-preview-value{display:none}
.collab-preview-row h3{grid-area:title;margin:2px 0 1px!important;font-size:15px!important;line-height:1.15}
.collab-preview-row .collab-preview-place{grid-area:meta;margin:0!important;color:var(--ios-secondary);font-size:10px}
.collab-preview-row .collab-preview-yield{grid-area:value;align-self:start;justify-self:end;margin:2px 0 0!important;font-size:10px;font-weight:650;color:var(--ios-text)}
.collab-preview-row .collab-network-prompt{grid-area:prompt;margin-top:6px!important;padding:8px 9px!important}

/* Collaborator own opportunities remain list rows, with tracking inside the row */
.collab-owned-row{
  padding:14px 15px;
  border:0!important;
  border-bottom:1px solid var(--ios-line)!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  cursor:pointer;
}
.collab-owned-row:last-child{border-bottom:0!important}
.collab-owned-row:hover{background:rgba(0,122,255,.028)!important}
.collab-owned-row .collab-owned-head{display:flex;justify-content:space-between;gap:12px}
.collab-owned-row .collab-owned-head h3{margin:4px 0 2px;font-size:15px;line-height:1.15}
.collab-owned-row .collab-track{margin:14px 0 10px}
.collab-owned-row .collab-owned-footer{padding-top:9px}

@media(max-width:980px){
  .opportunity-list-row{
    grid-template-columns:minmax(230px,1.15fr) minmax(300px,1.35fr) 100px;
    gap:11px;
  }
}

@media(max-width:800px){
  .deal-market-grid,.collab-preview-grid,.collab-my-grid{
    border-radius:0;
    border-left:0;
    border-right:0;
    box-shadow:none;
    margin-left:-14px;
    margin-right:-14px;
  }
  .opportunity-list-row{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "identity action"
      "facts facts"
      "favorite favorite"
      "prompt prompt";
    gap:7px 10px;
    min-height:0;
    padding:12px 14px;
  }
  .opportunity-row-identity{grid-area:identity}
  .opportunity-row-facts{grid-area:facts;grid-template-columns:repeat(2,minmax(0,1fr));padding-top:5px;border-top:1px solid rgba(60,60,67,.065)}
  .opportunity-row-action{grid-area:action;align-items:flex-end;justify-content:flex-start}
  .opportunity-list-row>.ux-favorite{grid-area:favorite;justify-self:start}
  .opportunity-list-row .collab-network-prompt{grid-area:prompt}
  .opportunity-row-name h3{font-size:15px!important}
  .opportunity-row-top .card-badges .publish-pill,
  .opportunity-row-top .card-badges .quality-pill{display:none!important}
  .opportunity-row-fact{padding:4px 8px}
  .opportunity-row-fact:first-child{padding-left:0}
  .opportunity-row-fact:nth-child(odd){border-left:0}
  .opportunity-row-fact:nth-child(even){border-left:1px solid var(--ios-line)}
  .opportunity-row-action .card-badges{max-width:110px}

  .collab-preview-row,
  .collab-owned-row{padding-left:14px;padding-right:14px}
}

@media(max-width:420px){
  .opportunity-row-facts{grid-template-columns:1fr 1fr}
  .opportunity-row-fact strong{font-size:10px}
  .opportunity-row-fact.value strong{font-size:13px}
  .opportunity-row-open{font-size:10px}
}


/* V43 — responsive normalization: no overlapping filters or list content */
#dealFilters.table-toolbar{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,max-content));
  align-items:start;
  justify-content:start;
  gap:8px 10px!important;
  width:100%;
  max-width:100%;
  overflow:visible!important;
}
#dealFilters.table-toolbar>*{min-width:0}
#dealFilters .collaborator-market-filters{
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}
#dealFilters .collaborator-market-filter{
  box-sizing:border-box;
  min-width:0;
  line-height:1.15;
  text-align:center;
}

/* Prevent long labels/statuses from colliding in list rows */
.opportunity-list-row,
.opportunity-list-row *{box-sizing:border-box}
.opportunity-row-identity,
.opportunity-row-name,
.opportunity-row-facts,
.opportunity-row-action{min-width:0}
.opportunity-row-name h3,
.opportunity-row-subtitle,
.opportunity-row-source,
.opportunity-row-fact strong,
.opportunity-row-status{
  overflow-wrap:anywhere;
  word-break:normal;
}
.opportunity-row-action .card-badges{max-width:100%}
.opportunity-row-action .card-badges>*{max-width:100%}

@media(max-width:800px){
  #dealFilters.table-toolbar{
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    margin:0 0 12px!important;
    padding:0!important;
    overflow:visible!important;
  }
  #dealFilters .collaborator-market-filters{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:3px!important;
    padding:3px!important;
    border-radius:12px!important;
    overflow:hidden;
  }
  #dealFilters .collaborator-market-filter{
    display:flex!important;
    align-items:center;
    justify-content:center;
    width:100%!important;
    min-width:0!important;
    min-height:38px!important;
    padding:7px 5px!important;
    margin:0!important;
    border-radius:9px!important;
    font-size:11px!important;
    line-height:1.12!important;
    white-space:normal!important;
    overflow:hidden;
    text-overflow:clip;
  }

  /* True single-column mobile row: no side-by-side title/action collisions */
  .opportunity-list-row{
    display:block!important;
    min-width:0!important;
    width:100%!important;
    padding:12px 14px!important;
  }
  .opportunity-row-top{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:6px!important;
    flex-wrap:wrap!important;
    margin-bottom:6px!important;
  }
  .opportunity-row-top .card-badges{
    min-width:0;
    max-width:100%;
    flex:1 1 auto;
  }
  .opportunity-row-code{display:none!important}
  .opportunity-row-name h3{
    font-size:15px!important;
    line-height:1.18!important;
  }
  .opportunity-row-subtitle,
  .opportunity-row-source{
    font-size:10px!important;
    line-height:1.3!important;
  }
  .opportunity-row-facts{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%;
    margin-top:9px;
    padding-top:7px!important;
    border-top:1px solid rgba(60,60,67,.07)!important;
  }
  .opportunity-row-fact{
    min-width:0!important;
    padding:5px 8px!important;
  }
  .opportunity-row-fact:nth-child(odd){padding-left:0!important}
  .opportunity-row-fact strong{
    font-size:10px!important;
    line-height:1.2!important;
  }
  .opportunity-row-fact.value strong{font-size:13px!important}
  .opportunity-row-action{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    width:100%;
    margin-top:8px;
    padding-top:8px;
    border-top:1px solid rgba(60,60,67,.07);
    text-align:left!important;
  }
  .opportunity-row-action .card-badges{
    display:flex!important;
    flex:1 1 auto;
    justify-content:flex-start!important;
    min-width:0;
    gap:4px!important;
  }
  .opportunity-row-action .card-badges>*{
    min-width:0;
    max-width:100%;
    font-size:8px!important;
    white-space:normal!important;
    line-height:1.15!important;
  }
  .opportunity-row-open{
    flex:0 0 auto;
    font-size:10px!important;
  }
  .opportunity-list-row>.ux-favorite{
    display:inline-flex!important;
    width:auto!important;
    max-width:100%;
    margin:8px 0 0!important;
    padding:5px 8px!important;
    font-size:10px!important;
  }
  .opportunity-list-row .collab-network-prompt{
    display:flex!important;
    width:100%!important;
    margin:8px 0 0!important;
  }

  .collab-preview-row{
    display:block!important;
    min-width:0!important;
  }
  .collab-preview-row .collab-preview-top{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
  }
  .collab-preview-row h3{
    margin-top:7px!important;
    overflow-wrap:anywhere;
  }
  .collab-preview-row .collab-preview-place,
  .collab-preview-row .collab-preview-yield{
    display:block!important;
    margin:4px 0 0!important;
    justify-self:auto!important;
  }
}

@media(max-width:360px){
  #dealFilters .collaborator-market-filter{
    font-size:10px!important;
    padding-left:3px!important;
    padding-right:3px!important;
  }
  .opportunity-row-facts{grid-template-columns:1fr!important}
  .opportunity-row-fact{
    padding-left:0!important;
    border-left:0!important;
  }
  .opportunity-row-fact+.opportunity-row-fact{
    border-top:1px solid rgba(60,60,67,.05);
  }
}


/* V43 tablet/compact desktop guard */
@media(max-width:1000px){
  #dealFilters.table-toolbar{
    grid-template-columns:minmax(0,1fr)!important;
    width:100%;
  }
  #dealFilters .collaborator-market-filters{
    width:max-content;
    max-width:100%;
  }
  .opportunity-list-row{
    grid-template-columns:minmax(0,1.1fr) minmax(0,1.35fr) minmax(82px,.38fr)!important;
    gap:10px!important;
  }
  .opportunity-row-fact{padding-left:8px!important;padding-right:8px!important}
}
