/* /viewer/viewer.css — extra styling just for the viewer page */

.viewer-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: 0 0 10px;
}
.viewer-title{
  margin: 0;
}

/* Keep table usable on small screens */
/* Spreadsheet-like table */
.tablewrap{
  overflow:auto;
  border-radius: 12px;
  border: 1px solid var(--sheet-grid-strong, #d6dbe6);
  background: var(--sheet-bg, #fff);
}

/* More "sheet" proportions */
table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 880px;
  font-family: var(--sheet-font, var(--font));
}

/* Header row: utilitarian */
thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  background: linear-gradient(180deg, var(--sheet-head, #f5f6f8), var(--sheet-head2, #eef1f4));
  border-bottom: 1px solid var(--sheet-grid-strong, #d6dbe6);
  color: #222;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .2px;
  text-transform: none;
}

/* Cells: gridlines both ways */
th, td{
  padding: 8px 10px;
  font-size: 13px;
  vertical-align: middle;
  border-bottom: 1px solid var(--sheet-grid, #e6e9ef);
  border-right: 1px solid var(--sheet-grid, #e6e9ef);
  background: #fff;
  white-space: nowrap;
}

tbody td:first-child,
thead th:first-child{
  border-left: 1px solid var(--sheet-grid, #e6e9ef);
}

/* Optional: subtle zebra (very light) */
tbody tr:nth-child(even) td{
  background: #fcfdff;
}

/* Hover like a sheet row */
tbody tr:hover td{
  background: var(--sheet-hover, #f7f9fc);
}

/* "Active cell" feel when focusing links/controls inside a cell */
td:focus-within{
  background: var(--sheet-select, rgba(59,91,204,.10));
  outline: 1px solid var(--sheet-select-border, rgba(59,91,204,.35));
  outline-offset: -1px;
}



/* Viewer chips */
.chipbar{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.chip{
  padding:6px 10px;
  border:1px solid #ddd;
  border-radius:999px;
  background:#fff;
  cursor:pointer;
  font-size:12px;
}
.chip:hover{ background:#f7f7f7; }


/* Domain link as cell content (not CTA-ish) */
.domain-link{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0,0,0,.25);
}
.domain-link:hover{
  border-bottom-color: rgba(0,0,0,.55);
}

/* Availability badge */
/*.badge{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; border:1px solid #26a269; }*/

.badge{
  display:inline-block;
  padding: 2px 8px;
  border-radius: 6px;              /* moins pilule */
  font-size: 12px;
  border: 1px solid #b9e3c7;       /* soft */
  background: #eefaf2;             /* soft */
  color: #1f6d3f;
}

.ok{ border-color:#26a269; }

/* Popover */
.popover{
  position: fixed;
  display:none;
  min-width: 220px;
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
  box-shadow:0 10px 26px rgba(0,0,0,.12);
  z-index: 9999;
  overflow:hidden;
}
.popover.open{ display:block; }
.popover-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  background:#fafafa;
  border-bottom:1px solid #eee;
  font-size:13px;
}
.popover-close{
  border:0;
  background:transparent;
  font-size:16px;
  cursor:pointer;
  line-height:1;
  padding:2px 6px;
}
.popover a{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  text-decoration:none;
  color:#111;
  font-size:13px;
}
.popover a:hover{ background:#f5f5f5; }
.fav{
  width:10px;height:10px;flex:0 0 10px;
  border-radius:4px;
  background:#ff6666;
}
.aff-note{
  padding:8px 12px;
  font-size:12px;
  color:#666;
  border-top:1px solid #eee;
  background:#fff;
}

/* Make inputs wrap cleanly */
.row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom: 10px;
}
input, select{
  padding:8px 10px;
  border:1px solid #ddd;
  border-radius:10px;
}

.pager{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-top:12px;
  flex-wrap:wrap;
}
.pager-pages{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.pager-pages button{
  padding:6px 10px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
  background:transparent;
  cursor:pointer;
}
.pager-pages button[aria-current="page"]{
  border-color: rgba(0,0,0,.35);
  font-weight:600;
}
.pager-pages .dots{ padding:0 6px; }
.pager-right{ display:flex; gap:10px; align-items:center; }
#pgPrev[disabled], #pgNext[disabled]{ opacity:.45; cursor:not-allowed; }

.loading-row td{
  text-align:center;
  padding:24px;
  font-style:italic;
}

tr.row-click{ cursor: pointer; }
tr.row-click:hover td{ background: var(--sheet-hover, #f7f9fc); }