/* ================================================================
   components.css — oKMS shared page-component styles
   Version 1.0.0 (23rd November 2026)
   Maintained inside the oKMS engine (okms/assets/components.css)
   and copied into every shared-engine site's web root on each
   build, before each site's primary stylesheet overrides apply.
   Extracted from the inline base.html component sheet.
   ================================================================ */
/* Prevent inline-image baseline space exposing the portrait background. */
.author-profile-image img, img.author-profile-image { display: block; }
/* Singular exhibition content type. Legacy .exhibitions selectors remain in
   cas.css for the index and unconverted pages; do not rename those globally. */
.exhibition .listing li:has(a[target="_blank"]) { background-color: #e2e2e2; }
.exhibition .talks-year .listing .listing-image img { aspect-ratio: auto; object-fit: contain; }
/* Shared hover feedback for tag and source filters; retain active colours. */
.body .tag-browser button:not([aria-pressed="true"]):hover { background: #eeeeee; }
/* A filter immediately before a listing supplies its own bottom spacing. */
.body .tag-browser + script + .listing-section { margin-top: 0; }
/* Development section on network pages. */
.development-only {
    background: #f9e8d8;
    border: 2px solid #c45c18;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0 18px;
}
.development-only p { margin: 0 0 8px; font-weight: bold; color: #a34914; }
.development-only ul { margin: 0; padding-left: 1.2em; }
.development-only li { margin: 4px 0; }
.development-only a { color: #a34914; font-weight: 600; }

.page-header h3.speaker-subheading { font-weight: normal; font-style: italic; margin-top: 0.25em; }
.body p.buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.body p.buttons .event-button { display: inline-flex; align-items: center; gap: 6px; }
.body p.buttons .event-button svg { width: 20px; height: 20px; flex: 0 0 20px; }
@media (max-width: 800px) {
    .body p.buttons { flex-direction: column; align-items: stretch; }
    .body p.buttons .event-button { text-align: center; justify-content: center; }
}
.body > .details { display: flow-root; }
.body > .details > img.thumbnail { float: right; width: 150px; max-width: 35%; height: auto; margin: 0 0 15px 20px; border-radius: 6px; }
.body .ai-generated { font-style: italic; padding: 0; margin: 0; color: #b87900; font-size: 0.8em; }
.body .details p.ai-generated,
.body .author-profile p.ai-generated { font-size: 0.75rem; }
.body .details p.ai-generated .ai-icon,
.body .author-profile p.ai-generated .ai-icon { width: 10px; height: 10px; }
.body .ai-generated .ai-icon { display: inline-block; vertical-align: middle; width: 12px; height: 12px; margin-right: 4px; margin-top: -2px; fill: #b87900; }
/* News items retain the old news exception to the legacy metadata image badge.
   Inline shared CSS changes immediately; staging cas.css remains untouched. */
body.item .page-metadata .details a[href]:has(img)::after,
body.item .page-metadata .details a[href]:has(img):hover::after {
    content: none;
    display: none;
}
/* Reusable three-, five- and six-column listings, responsive on small screens. */
.body .listing-grid-three ul.listing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.body .listing-grid-five ul.listing {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.body .listing-grid-six ul.listing {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1000px) {
    .body .listing-grid-five ul.listing { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .body .listing-grid-six ul.listing { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    /* Selected homepage feeds show four items in four- and two-column views. */
    .body .listing-mobile-four ul.listing > li:nth-child(n + 5) { display: none; }
}
@media (max-width: 650px) {
    .body .listing-grid-three ul.listing,
    .body .listing-grid-five ul.listing,
    .body .listing-grid-six ul.listing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Feed/email cards use the same responsive square thumbnails as other listings. */
.body .home-email-list .listing .listing-image {
    display: block;
    position: relative;
    margin: 0 0 0.5em;
    border: 1px solid #ddd;
    border-radius: 6px;
    pointer-events: none;
}
.body .home-email-list .listing .listing-image img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center;
	border-radius: 6px;
}

/* Summary popovers require a fine pointer with true hover support.
   Touch devices keep normal single-tap card links, including wide tablets. */
.home-email-list .listing > li .listing-popover {
	display: none;
}
@media (max-width: 800px) {
.home-email-list .listing > li .listing-popover,
.home-email-list .listing > li .listing-popover-text {
	display: none !important;
}
}
@media (min-width: 801px) and (hover: hover) and (pointer: fine) {
.home-email-list .listing > li {
	position: relative;
	overflow: visible;
}
.home-email-list .listing > li .listing-popover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	background: var(--item-hover-colour);
	color: #222;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 15px;
	z-index: 1;
	font-family: "Lato", sans-serif;
	font-size: 0.9em;
	line-height: 1.4;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	pointer-events: auto;
	display: none;
}
.home-email-list .listing li:hover .listing-popover,
.home-email-list .listing li a:hover .listing-popover,
.home-email-list .listing li:focus-within .listing-popover {
	display: block;
}
.home-email-list .listing > li .listing-popover-text {
	display: -webkit-box;
	-webkit-line-clamp: 7;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}
.home-email-list .listing > li .listing-popover::after {
	content: none;
}
.home-email-list .listing > li .listing-popover strong {
	font-weight: bold;
}
}
.home-email-list .listing .listing-title {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}
.home-email-list .listing .listing-author {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Keep two columns at the narrowest viewport; never collapse to one. */

.navigation-icon {
    display: inline-block;
    vertical-align: middle;
}

/* Shared build-ownership cue; colour cells as well as the table row. */
.body table tr.builder-managed,
.body table tr.builder-managed > td { background-color: #d4edda; }

/* Reusable navigation buttons arranged in a responsive six-column grid. */
.body .button-grid {
    display: grid;
    gap: 10px;
    list-style: none;
    padding: 0 20px;
    margin: 10px auto 20px;
    max-width: 1000px;
}
.body .button-grid-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.body .button-grid li { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.body .button-grid .button-item-count { display: block; margin-top: 5px; text-align: center; font-size: 0.85em; color: #555; }
.body .button-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-size: 1.1em;
    padding: 10px 12px;
    background-color: #eee;
    color: #222;
}
.body .button-grid a:hover,
.body .button-grid a:focus-visible {
    background-color: #ccc;
    color: #222;
}
@media (max-width: 1000px) {
    .body .button-grid-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .body .button-grid-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reusable single-line table values such as dates and names. */
.body table .nowrap { white-space: nowrap; }

/* Reusable compact information links for content tables. */
.body table .record-links { width: 1px; white-space: nowrap; }
.record-links a { display: inline-flex; vertical-align: middle; }

/* Keep full-width booking buttons inside their content padding. */
.body .event-button {
    box-sizing: border-box;
    max-width: 100%;
}

/* Native disabled buttons share the canonical booking-link line height.
   Scope to top-level event/exhibition panels, not nested profile metadata. */
.body > .details .event-button {
    line-height: 1.5;
}

/* Centre button labels on small screens, including wrapped booking links. */
@media (max-width: 800px) {
    .body button,
    .body [role="button"],
    .body .event-button {
        text-align: center;
    }
}

/* Pinned news uses a slightly darker grey border without changing card size. */
.body ul.listing > li.news-pinned {
    border-color: #aaa;
}

/* Thumbnail corner badges share the event video badge's frame and placement. */
.profiles-index-list .listing-image {
    position: relative;
    display: block;
}
.listing-image .news-pin-icon,
.listing-image .news-feed-icon {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 20px;
    z-index: 3;
    pointer-events: none;
    opacity: 0.7;
}

/* Prose lists match paragraphs, including nested lists, without scaling up. */
.body .content-section ul,
.body .content-section ol {
    font-size: inherit;
}

/* Default responsive images in authored content blocks. */
.body .content-section img {
    width: 100%;
    height: auto;
}

/* Optional centred quarter-width images in authored content. */
.body .content-section .image.small {
    display: block;
    width: 25%;
    margin-left: auto;
    margin-right: auto;
}

/* Optional half-width image treatment in authored content. */
.body .content-section .image.medium {
    display: block;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

/* Captions share their sized image wrapper and are centred with it. */
.body .content-section .image.small > .caption,
.body .content-section .image.medium > .caption {
    text-align: center;
    box-sizing: border-box;
}
.body .content-section .image > img {
    display: block;
}

/* News item main image gets a small top margin. */
.body .content-section .image {
    margin-top: 10px;
}

/* Image and video captions: shared sizing and spacing. */
.body .content-section .image > .caption,
.body .video-wrapper + .caption {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    font-size: 0.9em;
}

/* Data-field titles are inline metadata, not legacy page-title panels. */
.body .details .title {
    padding: 0;
    background: transparent;
}

/* News details thumbnail floats right of the panel. */
.details.news-record .thumbnail {
    float: right;
    margin: 10px 0 10px 10px;
}
.details.news-record .thumbnail img {
    width: 150px;
    height: auto;
    border-radius: 4px;
}
.details.news-record::after {
    content: "";
    display: table;
    clear: both;
}

/* Shared table heading alignment. */
.body table th {
    text-align: left;
}

/* Smaller, consistent text across all content and administration tables. */
.body table th,
.body table td {
    font-size: 0.85em;
}
.body table th a,
.body table td a,
.body table th p,
.body table td p,
.body table th button,
.body table td button,
.body table th code,
.body table td code {
    font-size: inherit;
}

/* Reusable compact table thumbnail sizing. */
.body .compact-table .thumbnail-cell {
    width: 40px;
    padding: 4px;
}
.compact-table img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* Speech selection and playback borders are shared in css/speech-mode.css. */

  /* Feed index thumbnail column */
  .feeds-table td:first-child,
  .feeds-table th:first-child { width: 1%; white-space: nowrap; }
  .feeds-table td:first-child img { display: block; width: 40px; min-width: 40px; height: 40px; }

  /* Admin index item counts sit inside underlined anchors; keep count unadorned. */
  .button-grid a .button-item-count { text-decoration: none; display: inline-block; }

/* --- Website development plan banner --- */
/* Website development plan panel, available on public and preview homepages. */
.website-plan-banner {
    background: #c45c18;
    border: 1px solid #a34914;
    height: 30px;
    padding: 0 16px 6px;
    margin: 8px 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    clear: both;
    border-radius: 4px;
}

/* Tighten page header when it follows the dev banner. */
.website-plan-banner + .page-header {
    padding-top: 0;
    margin-top: 0 !important;
}
.website-plan-banner p {
    margin: 0;
    line-height: 1;
}
.website-plan-banner a,
.website-plan-banner a:link,
.website-plan-banner a:visited {
    color: #fff !important;
    font-weight: bold;
    text-decoration: none;
}
.website-plan-banner a:hover {
    color: #fff !important;
    font-weight: bold;
    text-decoration: underline;
}

@media (max-width: 800px) {
    .website-plan-banner {
        height: auto;
        padding: 6px 16px;
    }
    .body .website-plan-banner p {
        margin: 0;
        padding: 0;
        text-align: center;
        line-height: 1.4;
    }
}
