/* Layout only */
.ha-counties-tabs .ha-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin:0 0 1rem;
}

/* Let theme style the button; just ensure it behaves nicely as a tab */
.ha-counties-tabs .ha-tab.wp-element-button{
  cursor:pointer;
  text-decoration:none; /* some themes add underline to buttons */
}

/* Active tab:
   If your theme already has a solid/primary button style, you may not even need this.
   This version gently emphasises the active state without fighting the theme. */
.ha-counties-tabs .ha-tab[aria-selected="true"]{
  /* If your theme uses box-shadow/outline on focus, keep it */
  filter: brightness(0.95);
}

/* Panel container */
.ha-counties-tabs .ha-panel{
  border: 1px solid var(--wp--preset--color--contrast-3, #d0d0d0);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1rem;
}

.ha-counties-tabs .ha-panel[hidden]{ display:none; }

.ha-counties-tabs .ha-panel-title{
  margin:0 0 .75rem;
}

/* Town list (still block-specific styling) */
.ha-counties-tabs .ha-towns{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr));
  gap:.35rem 1rem;
}

.ha-counties-tabs .ha-towns li{
  margin:0;
  padding-left:1.1rem;
  position:relative;
}

.ha-counties-tabs .ha-towns li::before{
  content:"";
  position:absolute;
  left:0;
  top:.55em;
  width:.4rem;
  height:.4rem;
  border-radius:999px;
  background: var(--wp--preset--color--primary, currentColor);
}

.ha-counties-tabs .ha-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1rem;
}

/* Prevent wrapper divs behaving oddly in flex */
.ha-counties-tabs .ha-tabs .wp-block-button {
  margin: 0;
}

/* If any themes underline buttons, this prevents it */
.ha-counties-tabs .ha-tab.wp-block-button__link {
  text-decoration: none;
}

.ha-counties-tabs .ha-tab[aria-selected="true"] {
  transform: translateY(-1px);
}

/* Ensure brand button style wins inside Counties Tabs */
.ha-counties-tabs .wp-block-button.is-style-button-brand--2 .wp-block-button__link.ha-tab {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

.ha-counties-tabs .wp-block-button.is-style-button-brand--2 .wp-block-button__link.ha-tab[aria-selected="true"]{
  background-color: var(--wp--preset--color--primary-alt, #ffc821);
  color: var(--wp--preset--color--contrast, #111);
  border-color: var(--wp--preset--color--primary-alt, #ffc821);
}

.ha-counties-tabs .wp-block-button.is-style-button-brand--2 .wp-block-button__link.ha-tab:hover {
  filter: brightness(0.95);
}

.ha-counties-tabs .wp-block-button.is-style-button-brand--2 .wp-block-button__link.ha-tab[aria-selected="true"]:hover {
  filter: brightness(1);
}