/* Styled after the live site (https://search.pirtonhistory.org.uk/, css/style.css, 2026-09-28):
   background photo, white rounded page, logo header, grey menu bar, blue breadcrumb strip,
   Open Sans / Arial text, grey-bordered results tables, three-column footer.
   Unlike the live site's fixed 996px page, this one also fits phones. */

:root {
  --menu-grey: #d1d1d1;
  --menu-active: #949fbb;
  --breadcrumb: #a8b4d3;
  --link-hover: #2d4f7c;
  --input-border: #96b0d1;
  --input-focus: #516074;
  --text: #333;
  --cell-border: darkgrey;
}

* { box-sizing: border-box; }
html {
  background: #949fbb url(/static/images/bg.png) no-repeat center center fixed;
  background-size: cover;
}
body {
  margin: 0;
  font-family: 'Open Sans', Arial, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}
a:link, a:visited { color: #000; }
a:hover, a:active { color: var(--link-hover); }
.skip-link { position: absolute; left: -9000px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 4px 8px; z-index: 100000; }

#wrapper {
  max-width: 996px;
  margin: 20px auto 10px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
}

/* Header */
#header { padding-top: 30px; }
.header-logo { display: flex; align-items: center; gap: 8px; margin: 0 20px 20px; text-decoration: none; }
.header-logo:link, .header-logo:visited { color: #000; }
.site-title { font-size: 26px; font-weight: 700; line-height: 1.2; }

/* Main menu, as the live site's #access bar with hover sub-menus */
#access { background: var(--menu-grey); font-size: 14px; margin: 0 10px; }
#access ul { list-style: none; margin: 0; padding: 0; }
#access > ul.menu { display: flex; flex-wrap: wrap; padding-left: 12px; }
#access li { position: relative; }
#access a { display: block; line-height: 38px; padding: 0 10px; color: #000; text-decoration: none; }
#access ul ul {
  display: none; position: absolute; top: 38px; left: 0; width: 180px; z-index: 99999;
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
}
#access ul ul ul { left: 100%; top: 0; }
#access ul ul a { background: var(--menu-grey); line-height: 1.2; padding: 10px; }
#access li:hover > ul, #access li:focus-within > ul { display: block; }
#access li:hover > a, #access li:focus-within > a,
#access a[href="https://search.pirtonhistory.org.uk/"] { background: var(--menu-active); color: #fff; }

#breadcrumbs {
  margin: 0 10px; font-size: 12px; background: var(--breadcrumb);
  padding: 3px 10px 2px; border-top: 1px solid #fff;
}
#breadcrumbs a { color: #000; text-decoration: none; }
#breadcrumbs a:hover { text-decoration: underline; }
#breadcrumbs .sep { margin: 0 2px; }

/* Content */
#content { padding: 20px; min-height: 300px; }
#content a { font-weight: 700; }
#content p { margin: 0 0 20px; }
h1.entry-title { font-size: 24px; line-height: 1.3; color: #000; margin: 0 0 12px; }
#content h2, #content h3, #content h4 { color: #000; line-height: 1.5; margin: 24px 0 12px; }
#content h3 { font-size: 20px; }
#content h4 { font-size: 18px; }
.intro p { text-align: justify; }
img.alignright { float: right; margin: 4px 0 12px 24px; border: 1px solid #000; border-radius: 4px; max-width: 45%; height: auto; }

/* Search form: labels on the left, fields on the right, as on the live site */
.search-form {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  gap: 10px 0; align-items: center; max-width: 620px; margin-bottom: 20px; clear: left;
}
.search-form label { color: #000; }
input[type="text"], select {
  color: #666; border: 1px solid var(--input-border); border-radius: 3px;
  padding: 6px; font: inherit; font-size: 14px; width: 200px; max-width: 100%; background: #fff;
}
input[type="text"]:focus, select:focus {
  color: #111; outline: none; border-color: var(--input-focus); box-shadow: 0 0 6px #6c83a1;
}
.with-link { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
#recordtype-link { font-size: 0.75em; }
.search-form .buttons { display: contents; }
.search-form .buttons .button, .search-form .buttons button { justify-self: start; margin-top: 20px; }
.search-area { clear: both; display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: 0 36px; align-items: start; }
.search-area .example { margin-top: 10px; text-align: justify; }
button, a.button {
  border: 1px solid #ccc; border-color: #ccc #ccc #bbb; border-radius: 3px; background: #e6e6e6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 15px 17px rgba(255,255,255,0.5), inset 0 -5px 12px rgba(0,0,0,0.05);
  color: #000; cursor: pointer; font: inherit; font-size: 14px; line-height: 1; padding: 6px 10px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8); min-width: 70px; text-align: center;
}
#content a.button { font-weight: 400; text-decoration: none; }
button:hover, a.button:hover { border-color: #ccc #bbb #aaa; }
.example { font-size: 0.95em; }
.notice { color: #8a3b12; }

/* Results and record tables: grey-bordered cells and headers, as the live site's GridView */
.result-count { margin-bottom: 8px !important; }
.result-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 0.85em; }
#results-table { overflow-x: auto; }
table.results { width: 100%; border-collapse: collapse; font-size: 0.85em; margin-top: 15px; }
table.results th, table.results td {
  text-align: left; vertical-align: top; padding: 4px 5px;
  border-bottom: 1px solid var(--cell-border); border-right: 1px solid var(--cell-border);
}
table.results tr > :first-child { border-left: 1px solid var(--cell-border); }
table.results th { background: var(--menu-grey); border-top: 1px solid var(--cell-border); color: #000; }
table.results th a:link, table.results th a:visited { color: #000; }
table.results.narrow { width: auto; min-width: 50%; }
table.results td.nowrap { white-space: nowrap; }
.surname { text-transform: uppercase; }
tr.highlight td { background: #fdf3d0; }

.pager { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; background: wheat; padding: 4px 8px; font-size: 0.95em; }
.pager .per-page { margin-left: auto; font-size: 0.9em; }

/* Record pages, as the live site's DisplayRecord pages */
.record-box { display: inline-block; max-width: 100%; background: #f0f0f0; border: 1px solid #bbb; padding: 14px 15px 4px; margin-bottom: 16px; }
.monument-box { display: block; background: #fff; }
h1.record-box-title { font-size: 16px; margin: 0 0 14px; color: #333; }
.record-heading { font-size: 16px !important; margin: 10px 0 18px !important; color: #333 !important; }
table.record-details { border-collapse: collapse; background: #fff; font-size: 16px; line-height: 1.4; }
table.record-details th { background: var(--menu-grey); text-align: left; padding: 1px 3px; border: 1px solid #999; }
table.record-details td { border: 1px solid #999; padding: 1px 3px; vertical-align: top; }
table.record-details td.label { min-width: 230px; }
table.record-details.narrow td.label, table.record-details.inventory td.label { min-width: 0; }
.current-person { background: #ffff00; padding: 0 3px; }
.record-number { margin-top: 12px !important; }
.record-source { margin-bottom: 8px !important; }
.about { margin-bottom: 12px !important; text-align: left !important; }
.schedule { line-height: 1.15; }
.box-subheading { font-size: 16px !important; margin: 16px 0 2px !important; }
.inscription { font-style: italic; }
.war-memorial { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-start; margin: 16px 0; }
.war-memorial figure { margin: 0; max-width: 350px; }
.war-memorial img { display: block; max-width: 100%; height: auto; border: 1px solid #999; }
.war-memorial figcaption { margin-top: 6px; font-size: 0.95em; }
.probate-top { display: flex; flex-wrap: wrap; gap: 20px 30px; align-items: flex-start; margin-bottom: 20px; }
table.probate-details td { padding: 0 8px 0 4px; vertical-align: top; }
a.transcription { text-align: center; }
section.probate-document + section.probate-document { border-top: 1px solid #ccc; margin-top: 24px; }
.table-scroll { overflow-x: auto; }
table.results.census td { font-size: 14px; }
.back { margin-top: 20px; }

/* Footer: warning, footer menu, Heritage Lottery Fund logo */
#footer {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0;
  border-top: 1px solid #000; margin: 0 20px; padding: 18px 0; font-size: 12px; line-height: 1.5;
}
.footer-col { padding: 0 20px; }
.footer-col p { margin: 0; }
.middle-col { border-left: 1px solid #000; border-right: 1px solid #000; }
#menu-footer-menu { list-style: none; margin: 0; padding: 0; }
#menu-footer-menu a { text-decoration: none; }
.footer-col img { max-width: 100%; height: auto; }
#copyright { font-size: 12px; text-align: center; margin: 0 auto 20px; color: #000; }

/* Narrow screens (the live site had no phone layout) */
@media (max-width: 760px) {
  #wrapper { margin: 0; border-radius: 0; }
  .site-title { font-size: 20px; }
  .search-form { grid-template-columns: 1fr; }
  .search-area { grid-template-columns: 1fr; }
  .search-form .buttons { display: flex; gap: 10px; }
  #results-table table.results { min-width: 1000px; }  /* scroll sideways rather than squash */
  input[type="text"], select { width: 100%; }
  img.alignright { float: none; display: block; margin: 0 0 12px; max-width: 100%; }
  #footer { grid-template-columns: 1fr; gap: 16px; }
  .middle-col { border: 0; }
}
