/* ─── Filter panel wrapper ─────────────────────────────────────── */

.bslcd-filters {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  font-family: inherit;
  margin-bottom: 1.5rem;
}

/* ─── Toggle header (always visible) ──────────────────────────── */

.bslcd-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  border: none;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid transparent;
}

.bslcd-filter-toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.bslcd-filter-toggle-left::before {
  content: "⚙";
  font-size: 16px;
  color: #6b7280;
}

.bslcd-filter-toggle-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bslcd-active-badge {
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 99px;
}

.bslcd-chevron {
  color: #6b7280;
  line-height: 1;
}

/* ─── Collapsible body ─────────────────────────────────────────── */

.bslcd-filter-body {
  display: none;
}

.bslcd-filter-body.bslcd-open {
  display: block;
}
.bslcd-filter-toggle .open-filter {
    display:none;
}
.bslcd-filter-toggle .close-filter {
    display: block;
}


/* ─── Filter sections grid ─────────────────────────────────────── */
/*
  Mobile:  1 column, sections separated by horizontal lines
  Tablet+: 3 columns, sections separated by vertical lines
           Search spans all 3 columns on its own row below,
           separated from the top row by a horizontal line
*/

.bslcd-filter-sections {
  display: grid;
  grid-template-columns: 1fr;
}

/* ─── Individual filter section ────────────────────────────────── */

.bslcd-filter-section {
  padding: 16px;
  /* Mobile: horizontal dividers between all sections */
  border-bottom: 1px solid #e5e7eb;
}

.bslcd-filter-section:last-child {
  border-bottom: none;
}

/* ─── Search section — full-width on tablet/desktop ────────────── */
/*
  .bslcd-filter-section--search spans all columns above tablet.
  It sits on its own row beneath the 3-col group.
*/
.bslcd-filter-section--search {
  /* Always full width — grid-column set at tablet breakpoint below */
}

/* ─── Group labels ─────────────────────────────────────────────── */

.bslcd-filter-section > span,
.bslcd-filter-section > label[for] {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

/* ─── Region select ────────────────────────────────────────────── */

#bslcd-filter-region {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  appearance: auto;
  box-sizing: border-box;
}

/* ─── Search input ─────────────────────────────────────────────── */

#bslcd-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
}

#bslcd-search:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* ─── Chips (restyled .bslcd-checkbox) ─────────────────────────── */

.bslcd-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
  background: #fff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin: 0;
}

.bslcd-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Checked state — :has() for CSS-only; .bslcd-checked as JS fallback */
.bslcd-checkbox:has(input:checked),
.bslcd-checkbox.bslcd-checked {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.bslcd-checkbox:has(input:checked)::before,
.bslcd-checkbox.bslcd-checked::before {
  background: #1d4ed8;
}

/* Chip group wrapper */
.bslcd-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ─── Footer ───────────────────────────────────────────────────── */

.bslcd-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #d1d5db;
  background: #f9fafb;
}

.bslcd-btn-reset {
  font-size: 13px;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bslcd-btn-reset:hover { color: #111827; }

#bslcd-no-results {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1.1rem;
    color: #4b5563;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#bslcd-no-results.visible {
    opacity: 1;
}


/* ─── Tablet & Desktop (768px+) ────────────────────────────────── */
/*
  From 768px upward the layout is always 3 columns.
  The search section spans all 3 columns on a second row.
  Sections are divided by vertical lines; the search row
  is divided from the top row by a horizontal line.
*/

@media (min-width: 768px) {

  .bslcd-filter-sections {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* Remove mobile horizontal dividers */
  .bslcd-filter-section {
    border-bottom: none;
    /* Vertical dividers between columns */
    border-right: 1px solid #e5e7eb;
  }

  /* No right border on the last section in the top row (3rd child) */
  .bslcd-filter-section:nth-child(3) {
    border-right: none;
  }

  /* Search spans all 3 columns */
  .bslcd-filter-section--search {
    grid-column: 1 / -1;
    /* Horizontal line separating it from the 3-col row above */
    border-top: 1px solid #e5e7eb;
    border-right: none;
  }
}

/* Cards */

.bslcd-directory {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 700px) {
    .bslcd-directory {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    .bslcd-directory {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.bslcd-card {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 8px;
    background: #fff;
}

.bslcd-card-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}
.dashicons-dismiss::before {color: #dd0000;}
.dashicons-yes-alt::before {color: #00dd00;}

.bslcd-card-meta {
    border-bottom: 1px solid #ddd;
    padding: 0.25em 0;
    text-align: center;
}

.bslcd-card-levels{
    margin: 0 0 0.25em;
}
.bslcd-card-town {
    font-size: 14px;
    margin-right: 5px;
}
.card-pill {
	border: 1px solid #ddd;
	padding: 3px 10px;
    font-size: 13px;
	border-radius: 100px;
	text-align: center;
	display: inline-block;
	margin: 5px 2px 0;
	white-space: nowrap;
}
.card-pill.small {
    font-size: 12px;
}
.bslcd-provider-image {
    display: block;
    margin: 0 auto;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1em;
}


.bslcd-card-title, 
.bslcd-card-location, 
.bslcd-delivery-icons, 
.bslcd-card-cost, 
.bslcd-card-contact {
    text-align: center;
}
h3.bslcd-card-title {
    font-size:1.5em;
    margin-bottom:5px;
}
.bslcd-card-location .card-pill { 
    padding: 0 10px;
}

.bslcd-delivery-icons {
    margin: 0.25em 0;
}

.bslcd-delivery-icon {
    width: 64px;
    height: auto;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}
.bslcd-card-flags, .bslcd-card-extras {
    display: flex;
    justify-content: space-evenly;
    border-bottom: 1px solid #ddd;
    padding: 0.15em 0 .5em 0;
}
.bslcd-card-cost {
    margin-top: 0.25em;
}
.bslcd-card-extras {
    padding: 0.5em 0;
    margin: 0.5em 0;
}

0.15em 0 .5em 0
.bslcd-flag {
    text-align: right;
}
.pill-green {
    background: #eaf3de;
    border: 0.5px solid #a8cc78;
    color: #3b6d11;
}
.pill-red {
    background: #fcebeb;
    border: 0.5px solid #f09595;
    color: #a32d2d;
}
.pill-neutral {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #ddd;
}
.dashicons, .dashicons-before::before { font-size: 25px; }

.bslcd-card-contact {
    border-bottom: 1px solid #ddd;
    padding: 0 0 0.5em;
    margin: 0 0 0.5em;
}
.bslcd-card-notes {
    border: 1px solid #ddd;
    padding: 10px;
    background: #f3f4f6;
    border-radius: 5px;
}

.bslcd-card-link {
    display:block;
    border-top-width: 0;
	border-right-width: 0;
	border-left-width: 0;
	border-bottom-width: 0;
	border-color: #017089;
	background-color: #017089;
	color: #fff;
	font-family: inherit;
	font-weight: inherit;
	line-height: 1em;
	padding-top: 10px;
	padding-right: 40px;
	padding-bottom: 10px;
	padding-left: 40px;
    border-radius: 9999px;
}
.bslcd-card-link:hover {
	color: #fff;
	background-color: #3a3a3a;
	border-color: #3a3a3a;
}

.bslcd-cta:active {
    transform: translateY(0);
}
.bslcd-cta-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #ddd;
}
.bslcd-cta-secondary:hover {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #ddd;
}
.bslcd-email-address {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #374151;
    word-break: break-all;
}
.ti-help-circle {
    font-size: 1.5em;
    vertical-align: sub;
}