/**
 * @version     CVS: 1.0.0
 * @package     com_sbd_categorysearch
 * @copyright   2021 Philip Walton
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      Philip Walton <phil@softforge.co.uk>
 */

#com_sbd_categorysearch-product .sbd_categorysearch-productlist-spinner
{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(255,255,255,0.7);
}

#com_product-filter-box .controls .choices__inner .choices__list--single
{
    padding: 2px 16px 2px 4px;
}

.com_sbd_categorysearch .bg-primary
{
    background-color:#00488b !important;
}

#com_product-filter-box .control-group
{
    margin-top: 0px;
}

.choices.is-disabled {
    opacity: 0.5;        /* Dim the element visually */
    color: grey;
    pointer-events: none; /* Prevent user interaction if desired */
  }

  .choices.is-disabled .choices__input--cloned::placeholder {
    color: grey; /* Replace 'grey' with any specific shade you prefer */
  }

 /* Targeting the placeholder text */
.choices__input--cloned::placeholder {
    opacity: 1;  /* Ensures placeholder text is fully visible */
  }
  
  /* Fallback for older browsers */
  .choices__input--cloned::-webkit-input-placeholder {
    opacity: 1;
  }
  
  .choices__input--cloned:-ms-input-placeholder {
    opacity: 1;
  }
  
  /* Ensuring text in the input field also has full opacity */
  .choices__input--cloned {
    opacity: 1;   /* Ensures full opacity of the text */
  }

  .choices__item.choices__placeholder {
    opacity: 1 !important; /* Force override of lower-specificity styles */
  }
  .choices__list.choices__list--dropdown {
   word-break: normal;
  }

#com_sbd_categorysearch-product #com_product-filter-box hr {
  border-color: #00488a !important;
}
#com_sbd_categorysearch-product #com_product-filter-box .row > hr {
  margin-left: .75rem;
  margin-right: .75rem;
  width: calc(100% - 1.5rem);
}

#com_sbd_categorysearch-product .choices__inner .choices__item:not([data-value=""]) {
  background-color: #00488a;
  color: #ffffff;
  font-size: 13px;
  padding: 3px 5px;
  border-radius: 5px;
}

#com_sbd_categorysearch-product .choices__inner .choices__item[data-value=""] button {
  display: none;
}

#com_sbd_categorysearch-product .choices__inner .choices__list--multiple:not(:empty) ~ .choices__input {
  display: none;
}

#com_sbd_categorysearch-product .control-label {
  font-weight: bold;
}

#com_sbd_categorysearch-product joomla-field-fancy-select .choices__inner {
  border: 1px solid #000000;
  border-radius: 5px;
}

#productList {
    table-layout: fixed;
    width: 100%;
}
#productList th,
#productList td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.col-company-name { width: 20%; }
.col-company-address { width: 25%; }
.col-product-category { width: 15%; }
.col-product-types { width: 10%; }
.col-product-features { width: 10%; }
.col-product-materials { width: 10%; }
.col-product-standards { width: 10%; }
/* Uncomment and adjust if region column is reintroduced
.col-company-region { width: 10%; }
*/
#categorylist .box {
    position: relative;
    background-color: #00488a;
    color: #ffffff;
    padding: 10px;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    cursor: pointer;
}
#categorylist .box h3 {
    color: #ffffff;
}
#categorylist .box .category-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: flex-end;
}
#categorylist .box .category-image img {
    width: 100%;
    height: auto;
}

.product-item .uk-button-default:active, .product-item .uk-button-default:hover {
    background-color: #00203e;
    color: #e6e6e6;
    border-color: transparent;
}
  
/* AAA contrast pin for the Notes banner on the product detail view (WCAG 7:1 gate).
   SBD navy on Bootstrap light: #00203e on #f8f9fa is approximately 16:1. */
#com_sbd_categorysearch-details .bg-light,
.com_sbd_categorysearch .bg-light {
    background-color: #f8f9fa !important;
    color: #00203e !important;
}
#com_sbd_categorysearch-details .bg-light .text-primary,
.com_sbd_categorysearch .bg-light .text-primary {
    color: #00203e !important;
}

/* Share-this-filter block: visible keyboard focus on the readonly URL field
   (WCAG 2.4.7), matching the buttons' existing focus style; and button borders
   lifted above the 3:1 non-text contrast guideline (WCAG 1.4.11). */
#com_product-filter-share-url:focus-visible {
    outline: 2px dotted #000;
    outline-offset: 2px;
}
#com_product-filter-share .btn-outline-secondary {
    border-color: #495057;
}

/* Deep-linked product: highlight the targeted accordion item in the banner
   light blue (matches the #e3f1f9 panel blue). !important because the title
   carries an inline white background. Text stays #333 (>= 10:1 on #e3f1f9). */
.uk-accordion-title.sbd-product-highlight {
    background: #e3f1f9 !important;
    border-color: #cfe5f2 !important;
}
/* Keep the deep-linked product clear of the sticky navbar when scrolled to. */
[data-product-name] {
    scroll-margin-top: 110px;
}
/* Inside the highlighted title, the inline greys (#888 category, #666
   description, #999 chevron) drop below 7:1 on #e3f1f9. Pin them to
   #2f3b45 (9.9:1 on #e3f1f9). Category icons keep their own #f8f9fa box. */
.uk-accordion-title.sbd-product-highlight,
.uk-accordion-title.sbd-product-highlight div,
.uk-accordion-title.sbd-product-highlight p,
.uk-accordion-title.sbd-product-highlight h4 {
    color: #2f3b45 !important;
}
.uk-accordion-title.sbd-product-highlight span[uk-icon="chevron-right"] {
    color: #2f3b45 !important;
}
