/* Additions on top of the original RocketTheme ("eccy" template) stylesheets in static/legacy/. */

/* Keyboard users. */
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 1000; background: #fff; padding: 6px 10px; }
a:focus-visible, input:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid #941515; outline-offset: 2px; }

/* Helpers. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nickname { position: absolute; left: -10000px; }  /* honeypot field on forms */

/* Header: the old A+ / A- links, the search box and the leaderboard (one banner, no slider). */
#accessibility a .visually-hidden { position: absolute; }
#searchmod label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#top-menu .banner_slider { line-height: 0; }
.eccy-banner img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
/* Column modules: banners and boxes. */
#leftcol .moduletable, #rightcol .moduletable { overflow: hidden; }
.banner-html img { max-width: 100%; height: auto; }
.banner-html .richtext-image.inline { display: inline-block; }
/* "Visit our associated sites": the logos side by side. */
.bottom-banners { text-align: center; }
.bottom-banners .banneritem { display: inline-block; margin: 0 10px 10px; vertical-align: middle; }
.bottom-banners .banneritem img { height: 60px; width: auto; }
/* Home page directory search: the old "Browse our categories" button. */
.browsebutton a.browse-categories {
  display: inline-block; padding: 1px 6px; border: 1px solid #767676; border-radius: 2px; background: #efefef;
  color: #000; font: 13px Arial, sans-serif; text-decoration: none;
}
.browsebutton a.browse-categories:hover { background: #e5e5e5; }
/* Pages made of boxes (Online Features): two to a row, as the old user1 / user2 positions. */
.page-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 -15px; border-top: 1px solid #ddd; }
.page-boxes .page-box { border-bottom: 1px solid #ddd; padding-bottom: 15px; }
.page-boxes .page-box:nth-child(odd) { border-right: 1px solid #ddd; }
.page-boxes .page-box .custom { padding: 0 15px; }
.subpages-back { margin-top: 15px; }

/* Video banners. */
.eccy-video { width: 310px; max-width: 100%; margin: 0 auto; }
.eccy-video iframe { display: block; width: 100%; aspect-ratio: 310 / 199; border: 0; }

/* Rich text images (Wagtail image formats). */
.richtext-image.left { float: left; margin: 0 1em 1em 0; max-width: 50%; height: auto; }
.richtext-image.right { float: right; margin: 0 0 1em 1em; max-width: 50%; height: auto; }
.richtext-image.full-width { max-width: 100%; height: auto; }
.richtext-image.centre { display: block; margin: 0 auto 1em; max-width: 100%; height: auto; }
/* A width chosen in the editor (width attribute); never wider than the column. */
.richtext-image.custom-size { max-width: 100%; height: auto; }
.richtext-image.centred { display: block; margin-left: auto; margin-right: auto; }
/* Floated article images were 150-200px wide on the old site. */
/* (Also in blog intros and home page boxes.) */
:is(.article-content, .article-intro) .richtext-image.left:not(.custom-size, .natural-size),
:is(.article-content, .article-intro) .richtext-image.right:not(.custom-size, .natural-size) { width: 150px; max-width: 50%; }
:is(.article-content, .article-intro) .richtext-image.left, :is(.article-content, .article-intro) .richtext-image.right { margin-bottom: 10px; }
:is(.article-content, .article-intro) .richtext-image.right { margin-left: 20px; }
:is(.article-content, .article-intro) .richtext-image.left { margin-right: 20px; }
.article-content::after, .article-intro::after { content: ""; display: table; clear: both; }
/* In table cells a percentage cap would shrink logos to nothing. */
.article-content td .richtext-image.left, .article-content td .richtext-image.right,
.article-content td .richtext-image.custom-size { max-width: none; }
/* (The old template.css caps every image with !important; it overrode that for these logos too.) */
.article-content td .richtext-image:is(.custom-size, .natural-size) { max-width: none !important; }
/* Captioned images: the image and its caption (in italics underneath) float together. */
.richtext-figure { display: block; max-width: 100%; margin: 0 0 1em; }
.richtext-figure.left { float: left; margin: 0 20px 10px 0; }
.richtext-figure.right { float: right; margin: 0 0 10px 20px; }
.richtext-figure.centre { margin: 0 auto 1em; }
.richtext-figure.left:not(.custom-size), .richtext-figure.right:not(.custom-size) { width: 150px; max-width: 50%; }
.richtext-figure .richtext-image,
.article-content .richtext-figure .richtext-image:is(.left, .right, .full-width, .centre) { display: block; float: none; width: 100%; max-width: 100%; height: auto; margin: 0; }
.richtext-caption { display: block; margin-top: 4px; text-align: center; font-style: italic; font-size: 0.9em; line-height: 1.35; color: #555; }

/* Embedded players and publications kept from old articles (YouTube, Vimeo, Issuu). */
.article-content iframe.embed-frame { display: block; max-width: 100%; border: 0; }
.article-content iframe.embed-frame:not([width]) { width: 100%; max-width: 640px; aspect-ratio: 16 / 9; height: auto; margin: 10px 0; }
.article-content iframe.embed-frame[src*="issuu.com"] { width: 100%; max-width: none; aspect-ratio: 16 / 10; min-height: 500px; height: auto; }

/* Pencil for logged-in staff: opens the item in the CMS (templates/_cms_edit_link.html). */
.cms-edit-link { display: inline-block; color: #941515; line-height: 0; }
.cms-edit-link:hover, .cms-edit-link:focus-visible { color: #2a2a2a; }
.article-tools .actions .cms-edit-link { margin-left: 8px; }

/* Printing an article prints just the article. */
@media print {
  #header-bar, #horiz-menu, #leftcol, #rightcol, .banner-module, .dmmsearch-module, #mainmodules3, .skip-link, .cms-edit-link { display: none !important; }
  #maincol { margin: 0 !important; }
  div.wrapper { width: auto !important; }
}

/* The old template was fixed-width (1030px); on small screens the columns stack. */
@media (max-width: 1040px) {
  div.wrapper { width: auto !important; padding: 0 16px !important; }
  #header-bar .wrapper { padding: 0 !important; }
  #leftcol, #rightcol { float: none !important; width: auto !important; }
  #maincol { margin: 0 !important; }
  #main-body { display: flex; flex-direction: column; }
  #maincol { order: 1; } #leftcol { order: 2; } #rightcol { order: 3; }
  #headerblock-right { float: none; width: auto; }
  img, iframe { max-width: 100%; height: auto; }
  .page-boxes { grid-template-columns: 1fr; }
  .page-boxes .page-box:nth-child(odd) { border-right: 0; }
  .dmmsearch-module { height: auto; padding-bottom: 10px; }
  #extendedsearchsp360 .XTSearchBox { width: 60%; }
  #horiz-menu ul.menutop li { float: none; display: inline-block; }
}

/* Directory (old SobiPro look; base rules come from legacy/components/com_sobipro/var/css/sobipro.css). */
.SobiPro div.lead a { color: inherit; text-decoration: none; }
.SobiPro h1.page-header img { width: auto; height: 32px; padding-right: 20px; vertical-align: middle; }
.SobiPro .spSectionDesc { margin: 20px 0; }
.SobiPro .spParentCat { margin: -5px 0 15px; }
.SobiPro .spAlphaSub { font-size: 16px; text-transform: uppercase; }
.SobiPro .spNoEntries { margin: 15px 0; }
/* Email addresses are revealed on request (no mailto in the page); the button looks like the old link. */
.SobiPro button.reveal-email { padding: 0; border: 0; background: none; color: #337ab7; font: inherit; line-height: inherit; vertical-align: baseline; cursor: pointer; }
.SobiPro button.reveal-email:hover { text-decoration: underline; color: #23527c; }
.SobiPro .spDetailEntry .spClassViewImage { float: right; margin: 0 0 10px 10px; }
.SobiPro .spDetailEntry .cms-edit-link { float: right; margin: 4px 0 0 10px; }
.SobiPro .spSearchMatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.SobiPro .spSearchMatch label:has(input:checked) { color: #fff; background-color: #933; border-color: #933; }
.SobiPro .spSearchMatch label:has(input:focus-visible) { outline: 2px solid #941515; outline-offset: 2px; }
.SobiPro #spSearchForm #id_q { display: inline-block; width: 250px; }

/* Get Listed: the old page's large blue introduction and its two-column form table. */
.get-listed-intro p { font-size: 19px; line-height: 24px; font-weight: bold; color: #941515; }
.get-listed-form { width: 510px; max-width: 100%; }
.get-listed-options { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 10px; margin: 0; }
.get-listed-option { display: block; font-size: 16px; line-height: 24px; text-transform: uppercase; margin: 0; }
.get-listed-option input { margin: 0 20px 0 0; }
.get-listed-option .option-name { display: inline-block; width: 130px; }
.get-listed-period { font-weight: bold; padding: 10px; margin: 0; border-bottom: 1px solid #ddd; }
.get-listed-row { display: flex; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #ddd; }
.get-listed-row label { flex: 0 0 235px; text-transform: uppercase; padding-top: 4px; }
.get-listed-row .optional { text-transform: none; color: #888; }
.get-listed-input { flex: 1; }
.get-listed-input input, .get-listed-input textarea { width: 100%; box-sizing: border-box; height: auto; }
.get-listed-row.has-error input, .get-listed-row.has-error textarea { border-color: #b94a48; }
.get-listed-row .errorlist { color: #b94a48; margin: 4px 0 0; list-style: none; }
.get-listed-submit { text-align: center; margin-top: 20px; }
.get-listed-problem { color: #b94a48; font-weight: bold; }
@media (max-width: 767px) { .get-listed-row { display: block; } .get-listed-row label { display: block; } }

/* Directory search. */
.SobiPro #spSearchForm span.control-label { font-weight: normal; }
.SobiPro #spSearchForm .btn-primary { background: #933; border-color: #933; }

/* ------------------------------------------------------------------------------------------
   Site search. Not a copy of the old page: the old template's red (#941515) and greys, laid out
   to be scanned easily.
   ------------------------------------------------------------------------------------------ */
.site-search { font-family: Arial, Helvetica, sans-serif; }
.site-search .search-form { margin: 0 0 18px; }
.search-bar { display: flex; max-width: 680px; }
.search-bar input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; font-size: 16px;
  border: 2px solid #941515; border-right: 0; border-radius: 0; box-sizing: border-box; background: #fff;
}
.search-bar button {
  margin: 0;
  height: 40px; padding: 0 22px; border: 0; background: #941515; color: #fff; cursor: pointer;
  font: bold 13px Arial, Helvetica, sans-serif; text-transform: uppercase;
}
.search-bar button:hover { background: #2a2a2a; }
.search-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; font-size: 12px; color: #555; }
.search-controls select { height: 28px; font-size: 12px; max-width: 100%; }
.search-sort { display: inline-flex; margin-left: auto; border: 1px solid #ccc; }
.search-sort a { padding: 5px 12px; color: #333; background: #f0f0f0; }
.search-sort a + a { border-left: 1px solid #ccc; }
.search-sort a.is-current { background: #941515; color: #fff; font-weight: bold; }
.search-sort a:hover { text-decoration: none; background: #e2e2e2; }
.search-sort a.is-current:hover { background: #941515; }

.search-count { margin: 0 0 6px; font-size: 13px; color: #555; }
.search-count strong { color: #2a2a2a; }

/* Group headings. */
.search-group { margin-top: 22px; }
.search-group h2 { margin: 0 0 14px; padding: 0 0 4px; border-bottom: 1px solid #ddd; font: bold 150%/1.2 Helvetica, Arial, sans-serif; }
.search-group h2 span { color: #333; }

/* Directory companies: small cards. */
.search-companies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.site-search .search-companies li {
  margin: 0; padding: 10px 12px; line-height: 1.4; overflow: visible; background: #f7f7f7; border: 1px solid #e5e5e5; border-left: 4px solid #941515;
}
.search-company-name { display: block; font: bold 15px Helvetica, Arial, sans-serif; color: #941515; }
.search-company-what, .search-company-where { display: block; font-size: 12px; color: #555; margin-top: 3px; }
.search-company-where { color: #888; }
.search-more { margin: 10px 0 0; font-size: 12px; }
.search-more a { font-weight: bold; }

/* Article and page results. */
.search-results { list-style: none; margin: 0; padding: 0; }
.site-search .search-results .search-result { display: flex; gap: 14px; margin: 0; padding: 14px 0; border-top: 1px dotted #ccc; background: none; line-height: 1.4; }
.site-search .search-results .search-result:first-child { border-top: 0; padding-top: 0; }
.search-result-image { flex: 0 0 120px; }
.search-result-image img { display: block; width: 120px; height: 90px; object-fit: cover; }
.search-result-text { flex: 1; min-width: 0; }
.search-result h3 { margin: 0 0 4px; font: bold 17px/1.25 Helvetica, Arial, sans-serif; }
.search-result h3 a { color: #941515; }
.search-result-meta { margin: 0 0 6px; font-size: 11px; color: #888; text-transform: uppercase; }
.search-result-meta a { color: #555; }
.search-result-extract { margin: 0; font-size: 13px; line-height: 1.55; color: #333; }
.site-search mark { background: #f6e3e3; color: inherit; padding: 0 1px; }
.search-result h3 mark { background: #f6e3e3; }

.search-empty, .search-none { font-size: 13px; color: #333; }
.search-none ul { margin: 8px 0 0 18px; }
.search-browse-label { margin-top: 16px; font-weight: bold; }
.search-browse { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.site-search .search-browse li { margin: 0; padding: 0; background: none; line-height: 1.4; }
.search-browse a { display: inline-block; padding: 5px 10px; border: 1px solid #ccc; background: #f0f0f0; color: #333; font-size: 12px; }
.search-browse a:hover { background: #941515; border-color: #941515; color: #fff; text-decoration: none; }

@media (max-width: 700px) {
  .search-companies { grid-template-columns: 1fr; }
  .search-sort { margin-left: 0; }
  .search-result-image { flex-basis: 80px; }
  .search-result-image img { width: 80px; height: 60px; }
}

/* Video files kept from old articles (e.g. on the Animals charity page). */
.article-content video.embed-video { display: block; max-width: 100%; height: auto; margin-bottom: 15px; }
.article-content video.embed-video.left { float: left; margin-right: 20px; }
.article-content video.embed-video.right { float: right; margin-left: 20px; }
