/* Additions on top of the original JA Teline IV stylesheets. */

/* Directory search box on the home page (inline styles on the old site). */
#newsearch { padding: 18px 0 0; border-top: 5px solid #000; }
#newsearch .newsearch-inner { padding: 0; font-size: 12px; }
#newsearch h2.newsearch-title {
  margin: 0 0 30px !important; padding: 0 !important; text-transform: uppercase;
  font: bold 175%/1 Arial, sans-serif; letter-spacing: -1px; text-indent: 5px;
  background: url("../legacy/templates/ja_teline_iv/images/stripe-bg.png") repeat top;
}
#newsearch h2.newsearch-title a { color: #069; background: #fff; padding: 0 12px 0 4px; display: inline-block; }
#newsearch .jvsobe-des { display: block; font-weight: bold; }
#newsearch .newsearch-browse { margin: 10px 0; }
#newsearch .newsearch-browse-link { text-align: center; margin-bottom: 10px; }

/* Banners. */
.enuk-banner img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
#ja-right .moduletableSITES .enuk-banner + .enuk-banner { margin-top: 12px; }
.ja-header-r .mod_bannerslider { width: 468px; max-width: 100%; }
/* Video banners (the old "Featured Video" boxes were 310 x 199 players). */
.enuk-video { width: 310px; max-width: 100%; margin: 0 auto; }
.enuk-video iframe { display: block; width: 100%; aspect-ratio: 310 / 199; border: 0; }

/* 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 { outline: 2px solid #069; outline-offset: 2px; }

/* 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.full-width.custom-size { display: block; }

/* The old template was fixed-width; stack the columns on small screens. */
@media (max-width: 990px) {
  #ja-wrapper .main { width: auto !important; padding-left: 10px; padding-right: 10px; }
  #ja-mainbody, #ja-right { float: none !important; width: auto !important; }
  #ja-header .ja-header-r { float: none; margin: 10px 0; }
  #ja-topbar .ja-healineswrap, #ja-topbar .ja-updatetime { display: none; }
  #ja-header .main { height: auto !important; }
  #ja-header .logo-text, #ja-header .ja-header-r { position: static !important; float: none !important; }
  .linear .ja-zin .ja-zincontent, .linear .ja-zin .ja-zinlinks {
    float: none !important; width: auto !important; margin: 0 0 10px !important; border: 0 !important;
  }
  .linear .ja-zin .ja-box-inner { background: none !important; }
  img { max-width: 100%; height: auto; }
}

/* The old page used JavaScript to size these (category tabs that slid, a rotating ticker);
   without it, keep the articles in normal flow and give the ticker a width. */
.linear .ja-zin .ja-articles { position: static; }
#enuk-headlines { width: 290px; }

/* Article pages. */
ul.actions .print-button { background: none; border: 0; padding: 0; cursor: pointer; }
/* Pencil for logged-in staff: opens the item in the CMS (templates/_cms_edit_link.html). */
.cms-edit-link { display: inline-block; color: #3b7513; line-height: 0; }
.cms-edit-link:hover, .cms-edit-link:focus-visible { color: #2a2a2a; }
.sobi2Details .cms-edit-link { float: right; margin: 2px 2px 0 8px; }
/* The old site's thumbnail plugin showed floated article images at 200px wide. */
.article-content .richtext-image.left:not(.custom-size),
.article-content .richtext-image.right:not(.custom-size) { width: 200px; max-width: 50%; }
.article-content .richtext-image.left, .article-content .richtext-image.right { margin-bottom: 10px; }
.article-content .richtext-image.right { margin-left: 20px; }
.article-content .richtext-image.left { margin-right: 20px; }
.article-content::after { content: ""; display: table; clear: both; }
/* In table cells (e.g. Charities) a percentage cap would shrink logos to nothing. */
.article-content td .richtext-image.left, .article-content td .richtext-image.right { max-width: none; }
/* 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: 200px; max-width: 50%; }
/* (After the 200px article rule above, and as specific, so it wins inside a caption box.) */
.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; }

/* Printing an article prints just the article (the old Print button opened a bare copy). */
@media print {
  #ja-header, #ja-topmegamenu, #ja-mainnav, #ja-topbar, #ja-right, #ja-footer,
  #ja-navhelper-top, .article-tools .actions, .skip-link, .cms-edit-link { display: none !important; }
  #ja-mainbody { width: 100% !important; }
}
/* Embedded players/publications kept from old articles (YouTube, Vimeo, Issuu). */
.article-content iframe.embed-frame { display: block; max-width: 100%; border: 0; }
/* Players without a size of their own get a standard one. */
.article-content iframe.embed-frame:not([width]) { width: 100%; max-width: 640px; aspect-ratio: 16 / 9; height: auto; margin: 10px 0; }
/* Issuu publications need more room than a video. */
.article-content iframe.embed-frame[src*="issuu.com"] { max-width: none; aspect-ratio: 16 / 10; min-height: 500px; }

/* 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 contact forms */

/* Directory (old SOBI2 look; base rules come from com_sobi2.css). */
.sobi2 { font-size: 12px; }
#sobi2AlphaLinks a[aria-current] { font-weight: bold; text-decoration: underline; }
.sobi2Listing .sobi2ListingBadge { float: right; margin: 0 0 8px 8px; }
.sobi2Listing td { vertical-align: top; }
.sobi2Listing td::after { content: ""; display: table; clear: both; }  /* keep floated links inside the card */
.sobi2AlphaHeading { font: normal 15px Arial, Helvetica, sans-serif; margin: 15px 5px 10px; }
.sobi2AlphaSub { margin: 15px 5px 10px; }
.sobi2Details address { font-style: normal; }
.sobi2Details .sobi2WaySearch { float: right; }
.sobi2NoEntries { margin: 15px 5px; }
.sobi2SearchMatch { border: 0; margin: 10px 0; padding: 0; }
.sobi2SearchMatch label { margin-right: 10px; }
@media (max-width: 700px) {
  /* Section pages: the two-column article rows become one column. */
  .items-row .item { float: none !important; clear: both; width: auto !important; margin: 0 0 15px !important; padding: 0 !important; background: none !important; }
  .items-row .item .contentpaneopen { margin-left: 0 !important; padding-left: 0 !important; }
  table.sobi2Listing, table.sobi2Listing tbody, table.sobi2Listing tr, table.sobi2Listing td,
  table#sobi2CatListSymbols, table#sobi2CatListSymbols tbody, table#sobi2CatListSymbols tr, table#sobi2CatListSymbols td {
    display: block; width: auto !important;
  }
}

/* Home page category tabs: only the selected panel shows. */
.linear .ja-zin .ja-articles[hidden] { display: none !important; }

/* ------------------------------------------------------------------------------------------
   Site search. Not a copy of the old page: same palette (#3b7513 green, #fffae5 cream,
   #f0f0f0 grey) and type (Arial, Georgia headlines), but 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 #3b7513; border-right: 0; border-radius: 0; box-sizing: border-box; background: #fff;
}
.search-bar button {
  height: 40px; padding: 0 22px; border: 0; background: #3b7513; 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: #3b7513; color: #fff; font-weight: bold; }
.search-sort a:hover { text-decoration: none; background: #e2e2e2; }
.search-sort a.is-current:hover { background: #3b7513; }

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

/* Group headings borrow the home page's striped section headings. */
.search-group { margin-top: 22px; }
.search-group h2 {
  margin: 0 0 14px; padding: 0; text-transform: uppercase; font: bold 175%/1 Arial, sans-serif;
  letter-spacing: -1px; text-indent: 5px;
  background: url("../legacy/templates/ja_teline_iv/images/stripe-bg.png") repeat top;
}
.search-group h2 span { display: inline-block; padding: 0 12px 0 4px; background: #fff; color: #000; }

/* Directory companies: small cards on the site's cream. */
.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: #fffae5; border: 1px solid #ece2bd; border-left: 4px solid #3b7513;
}
.search-company-name { display: block; font: bold 15px Georgia, Cambria, "Times New Roman", serif; color: #3b7513; }
.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 Georgia, Cambria, "Times New Roman", serif; }
.search-result h3 a { color: #3b7513; }
.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: #e2efd4; color: inherit; padding: 0 1px; }
.search-result h3 mark { background: #e2efd4; }

.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: #3b7513; border-color: #3b7513; 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; }
}

/* Get Listed form (same feel as the old page: green intro, price list, uppercase labels). */
.get-listed-intro p { font-size: 15px; }
.get-listed-form { max-width: 640px; font-family: Arial, Helvetica, sans-serif; }
.get-listed-problem { padding: 8px 12px; background: #fdecea; border-left: 4px solid #b00; color: #600; }
.get-listed-options { margin: 15px 0 20px; padding: 0; border: 0; }
.get-listed-options legend { padding: 0; margin-bottom: 8px; font: bold 13px Arial, sans-serif; text-transform: uppercase; color: #2a2a2a; }
.get-listed-option {
  display: flex; align-items: center; gap: 10px; max-width: 420px; margin: 0 0 6px; padding: 9px 12px;
  border: 1px solid #ddd; background: #f0f0f0; cursor: pointer; font-size: 15px;
}
.get-listed-option:has(input:checked) { background: #fffae5; border-color: #3b7513; }
.get-listed-option .option-name { flex: 1; font-weight: bold; text-transform: uppercase; }
.get-listed-option .option-price { color: #3b7513; font-weight: bold; }
.get-listed-period { margin: 10px 0 0; font-weight: bold; font-size: 12px; }
.get-listed-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 15px; align-items: start; margin-bottom: 12px; }
.get-listed-row label { padding-top: 6px; font-size: 12px; text-transform: uppercase; color: #333; }
.get-listed-row .optional { text-transform: none; color: #888; }
.get-listed-row input, .get-listed-row textarea {
  width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #aaa; font: 14px Arial, sans-serif;
}
.get-listed-row.has-error input, .get-listed-row.has-error textarea { border-color: #b00; background: #fff8f8; }
.get-listed-form .errorlist { margin: 4px 0 0; padding: 0; list-style: none; color: #b00; font-size: 12px; }
.get-listed-form .errorlist li { background: none; padding: 0; margin: 0; }
.get-listed-submit { margin: 18px 0 0 195px; }
.get-listed-submit .button { padding: 8px 28px; font-size: 13px; cursor: pointer; }
.get-listed-sent { margin: 15px 0; padding: 15px 18px; background: #fffae5; border-left: 4px solid #3b7513; font-size: 15px; }
@media (max-width: 700px) {
  .get-listed-row { grid-template-columns: 1fr; }
  .get-listed-row label { padding-top: 0; }
  .get-listed-submit { margin-left: 0; }
}
/* The old page's opening lines were large and green. */
.get-listed-intro p:first-child, .get-listed-intro p:first-child b { color: #3b7513; font-size: 19px; line-height: 1.35; }

/* "Show email address" buttons in the directory (see reveal-email.js): look like the links around them. */
.reveal-email { padding: 0; border: 0; background: none; color: #3b7513; font: inherit; text-transform: none; letter-spacing: normal; cursor: pointer; text-decoration: underline; }
.reveal-email:hover { color: #2a2a2a; }
/* Field labels (Email:, Contact Person:, Phone:, ...) in bold, the values plain; listings and entry pages.
   (span.… to outrank com_sobi2.css, which sets them normal.) */
span.sobi2Listing_field_email_label, span.sobi2Listing_field_contact_person_label, span.sobi2Listing_field_hotline_label,
span.sobi2Listing_field_fax_label, span.sobi2Listing_field_occupation_label { font-weight: bold; }
