/* Four Color Comic v40.31.43 — collection alignment, tooltip portal, larger controls, editor cleanup */

/* The tooltip is rendered in a body-level portal so table/panel overflow can never cover it. */
.v403142-help:hover::after,
.v403142-help:focus::after{display:none!important;content:none!important}
.v403143-tooltip{
  position:fixed!important;
  z-index:2147483000!important;
  width:min(340px,calc(100vw - 24px))!important;
  padding:11px 12px!important;
  border:1px solid #445466!important;
  border-radius:8px!important;
  background:#071017!important;
  box-shadow:0 16px 44px rgba(0,0,0,.62)!important;
  color:#f1f5f7!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.45!important;
  letter-spacing:0!important;
  text-align:left!important;
  text-transform:none!important;
  pointer-events:none!important;
}
.v403143-tooltip::after{
  content:"";
  position:absolute;
  left:var(--fcc-tip-arrow,50%);
  top:100%;
  transform:translateX(-50%);
  border:7px solid transparent;
  border-top-color:#445466;
}

/* Cover frames use the same dark collection palette instead of a gray surround. */
#collection .v43-cover-cell{background:#071017!important}
#collection .v43-cover-button.table,
#collection .v43-cover-button.card,
#collection .v43-cover-missing.table,
#collection .v43-cover-missing.card{
  background:#050b0f!important;
  border-color:#26343a!important;
  box-shadow:0 8px 20px rgba(0,0,0,.34)!important;
}
#collection .v43-cover-image{
  background:#050b0f!important;
}

/* TABLE VIEW — lock every header to the same column geometry as its content. */
#collection .v403142-tablewrap{overflow-x:auto!important}
#collection .v403142-collection-table{
  width:100%!important;
  min-width:1280px!important;
  table-layout:fixed!important;
}
#collection .v403142-collection-table col.select{width:56px!important}
#collection .v403142-collection-table col.cover{width:150px!important}
#collection .v403142-collection-table col.book{width:300px!important}
#collection .v403142-collection-table col.grade{width:100px!important}
#collection .v403142-collection-table col.purchase{width:150px!important}
#collection .v403142-collection-table col.market{width:150px!important}
#collection .v403142-collection-table col.pl{width:130px!important}
#collection .v403142-collection-table col.actions{width:244px!important}

#collection .v403142-collection-table th,
#collection .v403142-collection-table td{
  padding:16px 14px!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
}
#collection .v403142-collection-table th{
  font-size:11px!important;
  line-height:1.15!important;
  letter-spacing:.055em!important;
}
#collection .v403142-collection-table tbody tr{height:166px!important}
#collection .v403142-collection-table td{font-size:13px!important}
#collection .v403142-collection-table .titlecell strong{
  font-size:15px!important;
  line-height:1.28!important;
}
#collection .v403142-collection-table .titlecell>.tiny{
  margin-top:5px!important;
  font-size:11px!important;
  line-height:1.35!important;
}

/* Center the financial/action columns under their exact headings. */
#collection .v403142-collection-table th:nth-child(5),
#collection .v403142-collection-table th:nth-child(6),
#collection .v403142-collection-table th:nth-child(7),
#collection .v403142-collection-table th:nth-child(8),
#collection .v403142-collection-table td:nth-child(5),
#collection .v403142-collection-table td:nth-child(6),
#collection .v403142-collection-table td:nth-child(7),
#collection .v403142-collection-table td:nth-child(8){text-align:center!important}
#collection .v403142-collection-table th:nth-child(4),
#collection .v403142-collection-table td:nth-child(4){text-align:left!important}

#collection .v403142-collection-table .v403142-money-shell{
  width:126px!important;
  max-width:126px!important;
  height:40px!important;
  margin:0 auto!important;
  padding:0 10px!important;
}
#collection .v403142-collection-table .v403142-money-shell>i,
#collection .v403142-collection-table .v403142-money-shell>input{
  font-size:14px!important;
}
#collection .v403142-collection-table .v423-market-cell .v43-market-state{
  width:126px!important;
  margin:5px auto 0!important;
  text-align:center!important;
  font-size:8px!important;
}
#collection .v403142-collection-table td:nth-child(7)>b{
  display:block!important;
  font-size:15px!important;
  line-height:1.15!important;
  font-variant-numeric:tabular-nums!important;
}
#collection .v403142-collection-table td:nth-child(7)>small{
  margin-top:5px!important;
  text-align:center!important;
  font-size:9px!important;
}
#collection .v403142-collection-table td:nth-child(8) .v412-actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:center!important;
  align-items:center!important;
  gap:7px!important;
  width:100%!important;
}
#collection .v403142-collection-table td:nth-child(8) .btn{
  min-height:36px!important;
  padding:8px 11px!important;
  font-size:11px!important;
  line-height:1!important;
}

/* Explicit P/L colors in both views. */
#collection .v403142-collection-table td:nth-child(7).good> b,
#collectionCards .v403120-card-pl b.good{color:#56d59a!important}
#collection .v403142-collection-table td:nth-child(7).bad> b,
#collectionCards .v403120-card-pl b.bad{color:#ff676f!important}

/* CARD VIEW — larger typography and buttons while keeping a fixed alignment grid. */
#collectionCards.cards{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,500px),1fr))!important;
  gap:14px!important;
}
#collectionCards .v403142-card{
  grid-template-columns:24px 136px minmax(0,1fr)!important;
  column-gap:12px!important;
  row-gap:9px!important;
  padding:14px!important;
}
#collectionCards .v403142-card .v403120-card-left .v43-cover-button.card,
#collectionCards .v403142-card .v403120-card-left .v43-cover-missing.card{
  width:136px!important;
  height:auto!important;
  aspect-ratio:136/195!important;
}
#collectionCards .v403142-card .v403142-card-header h3{
  font-size:17px!important;
  line-height:1.22!important;
}
#collectionCards .v403142-card .v403142-card-header .bookmeta{
  font-size:11px!important;
  line-height:1.4!important;
}
#collectionCards .v403142-card .badge{font-size:10px!important}
#collectionCards .v403142-card .v403120-card-values{
  gap:10px!important;
  margin-bottom:10px!important;
}
#collectionCards .v403142-card .v403120-value-box{
  min-height:92px!important;
  padding:11px!important;
}
#collectionCards .v403142-card .v403120-value-box>span{
  min-height:22px!important;
  font-size:9px!important;
  line-height:1.25!important;
}
#collectionCards .v403142-card .v403142-money-shell{
  height:42px!important;
  margin-top:6px!important;
  padding:0 10px!important;
}
#collectionCards .v403142-card .v403142-money-shell>i,
#collectionCards .v403142-card .v403142-money-shell>input{
  font-size:14px!important;
}
#collectionCards .v403142-card .v403120-card-pl{
  margin-bottom:10px!important;
}
#collectionCards .v403142-card .v403120-card-pl span{
  min-height:38px!important;
  padding:9px 11px!important;
  font-size:10px!important;
}
#collectionCards .v403142-card .v403120-card-pl b{
  font-size:13px!important;
  font-variant-numeric:tabular-nums!important;
}
#collectionCards .v403142-card .v412-actions{
  gap:7px!important;
}
#collectionCards .v403142-card .v412-actions .btn{
  min-height:36px!important;
  height:36px!important;
  padding:7px 6px!important;
  font-size:11px!important;
}

/* EDIT BOOK — no Advanced Details accordion. Common fields come first on one continuous screen. */
.book-editor-modal.v41-compact-editor{
  width:min(1180px,97vw)!important;
  max-width:1180px!important;
}
.v403143-editor-fields{gap:15px!important}
.v403143-section-heading h3{margin-bottom:3px!important}
.v403143-section-heading p{
  margin:0 0 13px!important;
  color:#8fa0b5!important;
  font-size:11px!important;
  line-height:1.4!important;
}
.v403143-primary-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
.v403143-primary-grid .span-2{grid-column:span 2!important}
.v403143-secondary-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
.v403143-value-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
.book-editor-modal .v41-section h3{font-size:14px!important}
.book-editor-modal .field label{
  font-size:10px!important;
  letter-spacing:.045em!important;
}
.book-editor-modal .input,
.book-editor-modal .select,
.book-editor-modal .textarea{
  font-size:14px!important;
}
.book-editor-modal .input,
.book-editor-modal .select{min-height:42px!important}
.book-editor-modal .v41-editor-actions .btn{
  min-height:44px!important;
  padding:9px 15px!important;
  font-size:12px!important;
}
.v403143-legacy-fields{display:none!important}

@media(max-width:980px){
  #collectionCards .v403142-card{grid-template-columns:22px 124px minmax(0,1fr)!important}
  #collectionCards .v403142-card .v403120-card-left .v43-cover-button.card,
  #collectionCards .v403142-card .v403120-card-left .v43-cover-missing.card{width:124px!important;aspect-ratio:124/178!important}
  .v403143-primary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .v403143-secondary-grid,.v403143-value-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  #collectionCards .v403142-card{grid-template-columns:20px 104px minmax(0,1fr)!important;padding:10px!important;column-gap:8px!important}
  #collectionCards .v403142-card .v403120-card-left .v43-cover-button.card,
  #collectionCards .v403142-card .v403120-card-left .v43-cover-missing.card{width:104px!important;aspect-ratio:104/150!important}
  #collectionCards .v403142-card .v403120-card-values{grid-template-columns:1fr!important}
  #collectionCards .v403142-card .v412-actions{grid-template-columns:1fr 1fr!important}
  .v403143-primary-grid,.v403143-secondary-grid,.v403143-value-grid{grid-template-columns:1fr!important}
  .v403143-primary-grid .span-2{grid-column:auto!important}
}
.v403143-tooltip.below::after{
  top:auto!important;
  bottom:100%!important;
  border-top-color:transparent!important;
  border-bottom-color:#445466!important;
}
/* Saved helper text used to shift My Value upward in Table View. Keep the input centered;
   show only actionable states without changing row geometry. */
#collection .v403142-collection-table .v423-market-cell{position:relative!important}
#collection .v403142-collection-table .v423-market-cell .v43-market-state{display:none!important}
#collection .v403142-collection-table .v423-market-cell .v43-market-state.dirty,
#collection .v403142-collection-table .v423-market-cell .v43-market-state.saving,
#collection .v403142-collection-table .v423-market-cell .v43-market-state.error{
  display:block!important;
  position:absolute!important;
  left:10px!important;
  right:10px!important;
  top:calc(50% + 28px)!important;
  width:auto!important;
  margin:0!important;
  text-align:center!important;
}
