/* FOD Search - one shared stylesheet replacing the per-topic screen/print CSS. */

.fod-search .fod-form { max-width: 34rem; margin: 0 0 1.5rem; }
.fod-search .fod-form p { margin: 0 0 .75rem; }
.fod-search .fod-form label { display: inline-block; min-width: 7rem; font-weight: 600; }
.fod-search .fod-form label.fod-inline { min-width: 0; margin-left: .5rem; }
.fod-search .fod-form .fod-check label { font-weight: 400; min-width: 0; }
/* Explicit colours so theme or dark-mode rules cannot make typed text invisible. */
.fod-search .fod-form input[type="text"],
.fod-search .fod-form select {
	box-sizing: border-box;
	max-width: 100%;
	padding: .35rem .5rem;
	font: inherit;
	line-height: 1.3;
	color: #111 !important;
	-webkit-text-fill-color: #111;
	background-color: #fff !important;
	border: 1px solid #767676;
	border-radius: 3px;
}
.fod-search .fod-form input[type="text"]::placeholder { color: #666; opacity: 1; }
.fod-search .fod-form input[type="text"]:focus,
.fod-search .fod-form select:focus,
.fod-search .fod-form button:focus { outline: 2px solid #1a5fb4; outline-offset: 1px; }
.fod-search .fod-form button[type="submit"] {
	padding: .45rem 1.2rem;
	font: inherit;
	color: #fff;
	background-color: #1a5fb4;
	border: 1px solid #14498a;
	border-radius: 3px;
	cursor: pointer;
}
.fod-search .fod-form button[type="submit"]:hover { background-color: #14498a; }
.fod-search .fod-hint { font-size: .875em; opacity: .75; }

.fod-search .fod-notice { padding: .75rem 1rem; border-left: 4px solid currentColor; background: rgba(0, 0, 0, .04); }
.fod-search .fod-count { font-weight: 600; }

.fod-search .fod-table-wrap { overflow-x: auto; }
.fod-search .fod-table { border-collapse: collapse; width: 100%; }
.fod-search .fod-table th,
.fod-search .fod-table td { padding: .4rem .6rem; border-bottom: 1px solid rgba(0, 0, 0, .15); text-align: left; vertical-align: top; }
.fod-search .fod-table thead th { border-bottom-width: 2px; }

.fod-search .fod-pager { margin: 1rem 0; }
.fod-search .fod-pager .page-numbers { display: inline-block; padding: .25rem .6rem; margin-right: .15rem; text-decoration: none; border: 1px solid rgba(0, 0, 0, .2); }
.fod-search .fod-pager .page-numbers.current { font-weight: 700; background: rgba(0, 0, 0, .08); }

@media print {
	.fod-search .fod-form,
	.fod-search .fod-pager,
	.fod-search .fod-hide-print { display: none; }

	/* Some themes keep a fixed-width page container when printing, which pushes
	   anything inside it past the paper edge. Cap our block at the printable
	   width, and make long words wrap. */
	.fod-search { box-sizing: border-box; width: 100%; max-width: calc(100vw - 2rem); }

	/* The screen layout scrolls sideways; paper cannot, so fit the page instead. */
	.fod-search .fod-table-wrap { overflow: visible; }
	.fod-search .fod-table { width: 100%; max-width: 100%; table-layout: auto; font-size: 9.5pt; }
	.fod-search .fod-table th,
	.fod-search .fod-table td {
		padding: .2rem .35rem;
		border-bottom: 1px solid #000;
		overflow-wrap: anywhere;
		word-break: normal;
	}
	.fod-search .fod-table thead { display: table-header-group; }
	.fod-search .fod-table tr { break-inside: avoid; }
}

.fod-search .fod-back { margin: 0 0 1rem; font-weight: 600; }
@media print { .fod-search .fod-back { display: none; } }

/* Image popup */
.fod-lightbox {
	box-sizing: border-box;
	max-width: 94vw;
	max-height: 94vh;
	padding: 2.5rem 1rem 1rem;
	border: 0;
	border-radius: 6px;
	color: #111;
	background: #fff;
	overflow: auto;
	text-align: center;
}
.fod-lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.fod-lightbox .fod-lightbox-img { display: block; margin: 0 auto; max-width: 100%; max-height: 76vh; height: auto; }
.fod-lightbox .fod-lightbox-caption { margin: 0 0 .6rem; font-weight: 600; color: #111; }
.fod-lightbox .fod-lightbox-msg { margin: 1rem 0; color: #111; }
.fod-lightbox .fod-lightbox-newtab { display: inline-block; margin-top: .6rem; font-size: .9em; color: #1a5fb4; }
.fod-lightbox .fod-lightbox-close {
	position: absolute;
	top: .4rem;
	right: .5rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	font: 1.6rem/1 Arial, sans-serif;
	color: #111;
	background: #eee;
	border: 1px solid #999;
	border-radius: 3px;
	cursor: pointer;
}
.fod-lightbox .fod-lightbox-close:hover { background: #ddd; }
@media print { .fod-lightbox { display: none; } }

.fod-lightbox .fod-lightbox-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; justify-content: center; align-items: center; margin-top: .75rem; }
.fod-lightbox .fod-lightbox-actions .fod-lightbox-newtab { margin-top: 0; }
.fod-lightbox .fod-lightbox-print {
	padding: .4rem 1rem;
	font: inherit;
	color: #fff;
	background: #1a5fb4;
	border: 1px solid #14498a;
	border-radius: 3px;
	cursor: pointer;
}
.fod-lightbox .fod-lightbox-print:hover { background: #14498a; }

/* "Print this" in the popup: the script adds a plain copy of the popup content
   (.fod-print-area) to the page; print only that, not the page behind it. */
.fod-print-area { display: none; }
@media print {
	body.fod-print-popup > *:not(.fod-print-area) { display: none !important; }
	body.fod-print-popup .fod-print-area { display: block; color: #000; background: #fff; }
	.fod-print-area h2 { margin: 0 0 .6rem; font-size: 14pt; }
	.fod-print-area img { display: block; max-width: 100%; max-height: 235mm; height: auto; }
	.fod-print-area .fod-print-table { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
	.fod-print-area .fod-print-table th,
	.fod-print-area .fod-print-table td { padding: .25rem .5rem; text-align: left; vertical-align: top; border-bottom: 1px solid #bbb; overflow-wrap: anywhere; }
	.fod-print-area .fod-print-table th { width: 32%; font-weight: 600; }
	.fod-print-area .fod-print-table tr { break-inside: avoid; page-break-inside: avoid; }

	/* Let the printed page grow to the full height of the content, whatever the theme sets. */
	html:has(body.fod-print-popup),
	body.fod-print-popup { height: auto !important; min-height: 0 !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; position: static !important; }
}

/* Hidden elements stay hidden even where a rule above sets display. */
.fod-lightbox [hidden] { display: none !important; }

/* "More detail": opens in place without JavaScript, in the popup with it. */
.fod-search .fod-details summary { cursor: pointer; color: #1a5fb4; text-decoration: underline; }
.fod-search .fod-details[open] summary { margin-bottom: .4rem; }
.fod-dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; text-align: left; }
.fod-dl dt { font-weight: 600; }
.fod-dl dd { margin: 0; overflow-wrap: anywhere; }
.fod-lightbox .fod-lightbox-details { max-width: 100%; margin: 0 auto; color: #111; }
.fod-lightbox .fod-dl { color: #111; }
@media (max-width: 30rem) { .fod-dl { grid-template-columns: 1fr; gap: 0; } .fod-dl dd { margin-bottom: .5rem; } }
@media print { .fod-search .fod-details { display: none; } }
.fod-search .fod-details summary { list-style: none; }
.fod-search .fod-details summary::-webkit-details-marker { display: none; }

/* Sort description above the results table. */
.fod-search .fod-sortnote { margin: 0 0 .75rem; font-size: .9em; opacity: .8; }
