/* ckauthor.css — CK author-side browse page (ckauthor.php).
   Image dimensions come from CSS custom properties --ckauthor-img-w
   and --ckauthor-img-h, set by a tiny inline <style> block emitted by
   ckauthor.php (sourced from coversize_w/h('author_browse')). */

/* Auto-fill grid: each column starts at the configured author thumbnail
   width and grows to 1fr after the minimum, mirroring how
   render_responsive_shelf packs work covers. */
.ckauthor_imagegrid {
	display: grid;
	gap: 16px;
	margin-top: var(--lt-padding);
	grid-template-columns: repeat(auto-fill, minmax(var(--ckauthor-img-w), 1fr));
	}

.ckauthor_cell {
	text-align: center;
	font-size: 13px;
	line-height: 1.3;
	position: relative;
	}

.ckauthor_pic {
	width: var(--ckauthor-img-w);
	height: var(--ckauthor-img-h);
	object-fit: cover;
	display: block;
	margin: 0 auto 4px auto;
	background: #eee;
	}

.ckauthor_cell .name { font-weight: 600; }
.ckauthor_cell .meta { color: #888; font-size: 11px; }

/* Hover caption — the page's matching wikitext line(s) on top, then
   the author's other entries in this wikifield below. Hidden by
   default, fades in over the photo on hover. Anchored to the image
   (via .ckauthor_pic dimensions) so wider grid cells don't stretch
   the overlay; overflow: hidden truncates naturally when an author
   has more entries than fit. */
.ckauthor_caption {
	visibility: hidden;
	opacity: 0;
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: var(--ckauthor-img-w);
	max-height: var(--ckauthor-img-h);
	overflow: hidden;
	box-sizing: border-box;
	padding: 6px 8px;
	background: rgba(255, 255, 255, 0.92);
	color: #333;
	font-size: 11px;
	font-weight: normal;
	line-height: 1.3;
	text-align: left;
	z-index: 2;
	pointer-events: none;
	transition: opacity 0.12s ease-in;
	}
.ckauthor_cell:hover .ckauthor_caption {
	visibility: visible;
	opacity: 1;
	}

/* Page-match line(s) — the credential that put this author on this
   page. Bolder so it reads as the headline above the "other" list. */
.ckauthor_caption_match { font-weight: 600; }

/* The author's other entries in this wikifield — quieter color and
   a small gap above so the page match still leads visually. Each
   entry is its own div so they stack as a list. */
.ckauthor_caption_other {
	margin-top: 6px;
	color: #555;
	}

/* Haveit checkmark — overlays the inside bottom-right of the author
   photo, ~8px in from each edge. Anchored from the image right edge
   (cell-center + half image width) so it stays glued to the photo even
   when the grid cell is wider than the image. fa-check-circle carries
   the green via .have_1; we just position + ring it. */
.ckauthor_cell .haveit.ckauthor_pic_check {
	position: absolute;
	font-size: 1.6rem;
	left: calc(50% + (var(--ckauthor-img-w) / 2));
	top:  var(--ckauthor-img-h);
	transform: translate(-100%, -100%) translate(-8px, -8px);
	background: var(--lt-background-color, #fff);
	border-radius: 50%;
	border: 3px solid var(--lt-background-color, #fff);
	line-height: 1;
	}

.ckauthor_namelist {
	padding-left: 24px;
	margin-top: 30px !important;
	padding-top: 8px;
	}

.ckauthor_namelist li { margin-bottom: 4px; }

.ckauthor_namelist .haveit.ckauthor_name_check {
	margin-left: 4px;
	font-size: 0.95em;
	vertical-align: -1px;
	}

/* Empty-state alert spans the whole shelf area in both modes — without
   grid-column the alert would render as a single auto-fill column. */
.ckauthor_imagegrid .alert { grid-column: 1 / -1; }
.ckauthor_namelist  .alert { width: 100%; }

/* Right-sidebar slicing footnote (also used by ajax_ckcategory_sidebar.php).
   Quiet grey, slight top margin under the helpers list. */
.ck_helpers_note {
	margin-top: 6px;
	color: #888;
	}

/* Other Languages disclaimer panel — bottom margin matches the
   greenbox stack rhythm. */
.ck_languages_note { margin-bottom: var(--lt-padding); }

/* Related Tags section sits below the shelf with standard top spacing. */
.ckauthor_related_tags { margin-top: var(--lt-padding); }

/* Right-sidebar Related panel placeholder — reserve space for the
   AJAX-loaded content so the page doesn't reflow when the panel arrives. */
.ckauthor_related_panel { min-height: 60px; }

/* Cache-provenance footnote under the shelf — quiet so it doesn't
   distract. */
.ckauthor_cache_footnote {
	color: #999;
	font-size: 11px;
	margin-top: 1em;
	text-align: left;
	}

/* Developer-only wtbt_id badge inside the H1. Tiny + light gray so it
   blends out for non-devs (gated server-side by isDeveloper()). */
.ckauthor_h1_devid {
	color: #bbb;
	font-size: 0.55em;
	font-weight: normal;
	vertical-align: 2px;
	}

/* Parent/child navigation — wikitext_basetext_relationship links above the
   author count heading. Quiet so it doesn't compete with the H1. */
.ckauthor_parent_nav {
	margin-top: 6px;
	font-size: 13px;
	color: #555;
	}
.ckauthor_parent_up   { margin-bottom: 2px; }
.ckauthor_parent_down { }
.ckauthor_excludeall  { color: #888; }

/* "Authors (N)" count heading sits below the H1. */
.ckauthor_count_heading { margin-top: var(--lt-padding); }

/* Pagination controls under the shelf. */
.ckauthor_shelf_controls { margin-top: var(--lt-padding); }

/* Range counter ("N–M of T") between the prev/next buttons. */
.ckauthor_range { margin: 0 12px; }

/* Related-items greenbox in the right sidebar — share the bottom-margin
   rhythm with the disclaimer panel below. */
.ck_related_box { margin-bottom: var(--lt-padding); }

/* Relationships greenbox — wikitext_basetext_relationship up/down nav on
   the right rail. Mirrors the .ck_related_box bottom-margin so it
   stacks cleanly above Related and Other Languages. */
.ckauthor_relationships_box { margin-bottom: var(--lt-padding); }
.ckauthor_relationships_box h2 { overflow: hidden; }
.ckauthor_relationships_edit { margin-left: 8px; }
.ckauthor_relationships_up   { margin-bottom: 4px; }
.ckauthor_relationships_up   .fa-arrow-up,
.ckauthor_relationships_down .fa-arrow-down {
	color: #999;
	margin-right: 4px;
	}

/* "show N more" link inside the Related panel. */
.ck_related_more { margin-top: 6px; }

/* Relationships editor lightbox (ajax_lb_ckauthor_relationships.php).
   Sits inside LT's standard lightbox container; rules here just shape
   the inner list + add-row layout. */
.ckauthor_lb_focal {
	color: #555;
	font-size: 13px;
	margin: -6px 0 12px 0;
	font-style: italic;
	}
.ckauthor_lb_list {
	list-style: none;
	padding: 0;
	margin: 0 0 10px 0;
	}
.ckauthor_lb_list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	border-bottom: 1px solid #eee;
	}
.ckauthor_lb_list .ckauthor_lb_text { flex: 1; }
.ckauthor_lb_list .ckauthor_lb_empty {
	color: #999;
	font-style: italic;
	border-bottom: 0;
	}
.ckauthor_lb_add {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 16px;
	}
.ckauthor_lb_add input.form-control { flex: 1; }

/* History section in the lightbox — audit log of who changed what
   and when. Quiet metadata color on the timestamp, tight per-row
   spacing so a long history doesn't overwhelm the editor controls. */
.ckauthor_lb_history {
	list-style: none;
	padding: 0;
	margin: 4px 0 12px 0;
	max-height: 220px;
	overflow-y: auto;
	}
.ckauthor_lb_history li {
	padding: 4px 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 12px;
	line-height: 1.4;
	}
.ckauthor_lb_history li:last-child { border-bottom: 0; }
.ckauthor_lb_history_when { color: #888; }

/* "X edits" toggle that reveals the history list. */
.ckauthor_lb_history_header {
	margin-top: 16px;
	}
.ckauthor_lb_history_toggle {
	font-size: 13px;
	font-weight: normal;
	}
