/* falkirklocalhistorysociety.co.uk restore: pure-CSS replacements for the original JavaScript + small-screen reflow */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #4F5559; }
img { border: 0; }
/* the original pages rendered in quirks mode: layout images sit flush and cells size to their own text */
.fl-page td > img, .fl-page td > a > img { vertical-align: bottom; }
.fl-menu td { font-size: 10px; }
.fl-side td { font-size: 11px; }
.fl-page td[height="1"], .fl-page td[height="6"], .fl-page td[height="4"], .fl-page td[height="9"] { font-size: 0; line-height: 0; }
.fl-content { overflow-wrap: anywhere; }
.fl-content img { max-width: 100%; height: auto; }
.fl-content table { max-width: 100%; }

/* sidebar accordion (was a JavaScript show/hide menu) */
.fl-acc { padding: 0 0 2px; }
.fl-acc details { background: #cccccc; }
.fl-acc summary { list-style: none; cursor: pointer; background: #999999; color: #fff; font: bold 11px Arial, sans-serif; padding: 6px 4px; }
.fl-acc summary::-webkit-details-marker { display: none; }
.fl-acc summary::before { content: '\00BB\00A0'; }
.fl-acc details[open] summary { background: #7d7d7d; }
.fl-acc-list a { display: block; padding: 3px 6px; color: #fff; font: 11px Arial, sans-serif; text-decoration: none; }
.fl-acc-list a:hover, .fl-acc-list a:focus { text-decoration: underline; }
.fl-acc-list:empty { display: none; }
.fl-acc-cat { display: block; background: #999999; color: #fff; font: bold 11px Arial, sans-serif; padding: 6px 4px; text-decoration: none; }
.fl-acc-cat::before { content: '\00BB\00A0'; }
.fl-acc-cat:hover, .fl-acc-cat:focus { background: #7d7d7d; text-decoration: underline; }

/* photo viewer (was a JavaScript pop-up window) */
.fl-lb { display: none; }
.fl-lb:target { display: flex; position: fixed; inset: 0; z-index: 10; align-items: center; justify-content: center; padding: 16px; }
.fl-lb-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .82); }
.fl-lb figure { position: relative; margin: 0; max-width: 100%; text-align: center; }
.fl-lb img { display: block; max-width: min(92vw, 900px); max-height: 80vh; width: auto; height: auto; margin: 0 auto; border: 4px solid #fff; }
.fl-lb figcaption { color: #fff; font: 14px Arial, sans-serif; padding-top: 8px; }
.fl-lb figcaption a { color: #fff; margin-left: 12px; }

/* small screens: stack the fixed 800px table layout */
@media (max-width: 820px) {
  .fl-page { width: 100% !important; }
  .fl-page img { max-width: 100%; height: auto; }
  .fl-toprow > td, .fl-mainrow > td { display: block; width: auto !important; height: auto !important; }
  .fl-menu { background: #e6e6e6 !important; padding: 6px 0 10px; }
  .fl-menu td[width="50"], .fl-menu td[height="11"] { display: none; }
  .fl-menu table { width: 100%; }
  .fl-menu a.link { display: block; font-size: 15px; padding: 9px 16px; border-bottom: 1px solid #cfcfcf; color: #333; }
  .fl-head img { width: 100%; }
  .fl-edge, .fl-rule, .fl-gap { display: none !important; }
  .fl-side { margin-bottom: 12px; }
  .fl-content { padding: 0 10px; }
  .fl-content table { width: 100% !important; height: auto !important; }
  .fl-content td, .fl-content th { width: auto !important; }
  .fl-page td[width="59"], .fl-page td[width="58"] { display: none; }
}
@media (max-width: 480px) {
  .fl-content [style*="font-size: x-large"], .fl-content [style*="font-size: xx-large"] { font-size: 1.3em !important; }
  .tablebody > td { display: inline-block; width: 48% !important; vertical-align: top; }
}
