/* Agent profile (templates/user/userProfile/agent/). Everything is scoped under .agent-profile. */

/* The 48px column gutter (gx-lg-5) has 24px negative row margins, 12px more than the container padding: where the
   container is as wide as the window (e.g. 1099px) that made a horizontal scroll. Clip only that empty space
   (clip, not hidden: hidden would break the sticky agent block). */
.agent-profile.container {
  overflow-x: clip;
}

.agent-profile {
  --ap-accent: #1f6f5c;
  --ap-accent-hover: #185a4a;
  --ap-text: #222;
  --ap-muted: #6a6a6a;
  --ap-border: #ebebeb;
  --ap-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  color: var(--ap-text);
}

/* base.css gives every svg a grey fill and a 24px size, which turns these outline icons into grey blobs.
   Let the icons use their own width/height/fill attributes (only ours: the legacy pagination arrows are filled). */
.agent-profile svg[fill="none"],
.ap-mobile-bar svg[fill="none"] {
  width: auto;
  height: auto;
  fill: none;
}

/* Both columns start with a head row of the same height, so the profile card and the first listing line up. */
.agent-profile .ap-col-head {
  min-height: 44px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agent-profile .ap-col-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

@media (min-width: 992px) {
  .agent-profile .ap-sticky {
    position: sticky;
    top: 24px;
  }
}

.agent-profile .ap-icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #e3f1ec;
  color: #1f6f5c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.agent-profile .ap-icon-btn:hover {
  background: #cfe7de;
}

/* Profile card */
.agent-profile .ap-card {
  position: relative; /* no overflow clipping: it cut off the share button in the corner */
  background: #fff;
}
.agent-profile .ap-cover {
  display: block;
  border-radius: 24px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
/* No frame around the card; the photo top lines up with the bar buttons above the listings */
.agent-profile .ap-card-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.agent-profile .ap-avatar-wrap {
  position: relative;
  flex: none;
}
.agent-profile .ap-avatar {
  width: 184px;
  height: 184px;
  border-radius: 999px;
  border: 4px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  background: var(--ap-accent);
  color: #fff;
  font-size: 52px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}
/* Agencies often upload a logo (some are white on transparent): show it whole on the accent colour, not cropped. */
.agent-profile .ap-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.agent-profile .ap-card-body.has-cover {
  padding-top: 0;
}
.agent-profile .ap-card-body.has-cover .ap-avatar-wrap {
  margin-top: -68px;
}
.agent-profile .ap-card-body.has-cover .ap-avatar {
  width: 136px;
  height: 136px;
  font-size: 40px;
}
/* Owner only: "edit / upload photo" as a round icon on the bottom right of the avatar */
.agent-profile .ap-photo-link {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  color: var(--ap-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.agent-profile .ap-photo-link:hover {
  background: #e3f1ec;
  color: var(--ap-accent-hover);
}

/* Icons sit in soft coloured badges; the hue differs per meaning, and so does lightness of the stroke. */
.agent-profile .ap-ico {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.agent-profile .ap-ico--lg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.agent-profile .ap-ico--green { background: #e3f1ec; color: #1f6f5c; }
.agent-profile .ap-ico--blue { background: #e6eefb; color: #2b5ba8; }
.agent-profile .ap-ico--orange { background: #fcebdf; color: #b4501e; }
.agent-profile .ap-ico--purple { background: #efe9f8; color: #6b4fa0; }
.agent-profile .ap-ico--teal { background: #def3f3; color: #0f6e72; }
.agent-profile .ap-name {
  margin: 16px 0 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.agent-profile .ap-role {
  margin-top: 6px;
  font-size: 14px;
}
.agent-profile .ap-role + .ap-role {
  margin-top: 2px;
}
.agent-profile .ap-description {
  margin-top: 14px;
  width: 100%;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ap-muted);
  text-align: center;
}
.agent-profile .ap-link-btn {
  display: inline-block;
}
/* "Опис" section of the right column ("Читати далі" in the agent block links here) */
.agent-profile #agent-description {
  scroll-margin-top: 24px;
}
.agent-profile .ap-description-full {
  font-size: 15px;
  line-height: 1.6;
}
.agent-profile .ap-description-full p:last-child {
  margin-bottom: 0;
}
html:has(.agent-profile) {
  scroll-behavior: smooth;
}

/* Footer at the end of the right column (_footer.html.twig) */
.agent-profile .ap-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ap-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  font-size: 14px;
  color: var(--ap-muted);
}
.agent-profile .ap-footer-pay,
.agent-profile .ap-footer-links,
.agent-profile .ap-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
}
.agent-profile .ap-footer-pay {
  gap: 16px;
}
.agent-profile .ap-footer a {
  color: var(--ap-text);
}
.agent-profile .ap-footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.agent-profile .ap-description p:last-child {
  margin-bottom: 0;
}
.agent-profile .ap-link-btn {
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-text);
  text-decoration: underline;
}

.agent-profile .ap-facts {
  margin: 16px 0 0;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--ap-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: start;
  font-size: 14px;
}
.agent-profile .ap-facts li {
  display: flex;
  gap: 12px;
  align-items: center;
}
.agent-profile .ap-facts svg {
  flex: none;
}
.agent-profile .ap-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.agent-profile .ap-actions {
  margin-top: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agent-profile .ap-btn-primary,
.agent-profile .ap-btn-outline,
.ap-mobile-bar .ap-btn-primary,
.ap-mobile-bar .ap-btn-outline {
  min-height: 50px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.agent-profile .ap-btn-primary,
.ap-mobile-bar .ap-btn-primary {
  background: #1f6f5c;
  border: 1px solid #1f6f5c;
  color: #fff;
}
.agent-profile .ap-btn-primary:hover,
.ap-mobile-bar .ap-btn-primary:hover {
  background: #185a4a;
  border-color: #185a4a;
  color: #fff;
}
.agent-profile .ap-btn-outline,
.ap-mobile-bar .ap-btn-outline {
  background: #fff;
  border: 1px solid #222;
  color: #222;
}
.agent-profile .ap-btn-outline:hover,
.ap-mobile-bar .ap-btn-outline:hover {
  background: #f7f7f7;
  color: #222;
}

/* Listings */
.agent-profile .ap-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.agent-profile .ap-listing {
  display: flex;
  gap: 20px;
  align-items: flex-start; /* photo at the top of the card, not centered next to long addresses */
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 20px;
  box-shadow: var(--ap-shadow);
  color: var(--ap-text);
  text-decoration: none;
  background: #fff;
}
.agent-profile .ap-listing:hover {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14);
  color: var(--ap-text);
}
.agent-profile .ap-listing-photo {
  position: relative;
  flex: none;
  width: 160px;
  height: 128px;
  border-radius: 14px;
  overflow: hidden;
  background: #efece6;
}
.agent-profile .ap-listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  font-size: 0; /* a broken image would otherwise spill its long alt text over the card */
}
.agent-profile .ap-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}
.agent-profile .ap-badge-hot {
  color: #a23b16;
}
.agent-profile .ap-listing-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 8px;
}
.agent-profile .ap-listing-title {
  font-size: 17px;
  font-weight: 600;
}
.agent-profile .ap-listing-address,
.agent-profile .ap-listing-specs {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ap-muted);
}
.agent-profile .ap-listing-price {
  font-size: 15px;
}
.agent-profile .ap-listing-meta {
  font-size: 13px;
  color: var(--ap-muted);
}
.agent-profile .ap-list .pagination {
  margin-top: 20px;
}

@media (max-width: 575.98px) {
  .agent-profile .ap-listing {
    gap: 14px;
    padding: 10px;
    border-radius: 18px;
  }
  .agent-profile .ap-listing-photo {
    width: 96px;
    height: 96px;
    border-radius: 12px;
  }
  .agent-profile .ap-listing-title {
    font-size: 15px;
  }
  .agent-profile .ap-listing-address,
  .agent-profile .ap-listing-specs,
  .agent-profile .ap-listing-price {
    font-size: 13px;
  }
}

/* Map right under the listings */
.agent-profile .ap-map-block {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.agent-profile .ap-subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.agent-profile .ap-subhead .list-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* legend dots: search.css floats them with a fixed top margin, which misaligns them in this flex row */
.agent-profile .ap-subhead .circle-sub-layout-in-block {
  float: none;
  flex: none;
  margin: 0;
}
.agent-profile .ap-map {
  border-radius: 20px;
  overflow: hidden;
}
@media (max-width: 575.98px) {
  .agent-profile .ap-map.user-prof-obj-map {
    height: 280px !important;
  }
}

/* Sections below the listings */
.agent-profile .ap-section + .ap-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--ap-border);
}
.agent-profile .ap-section-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 600;
}
.agent-profile .ap-note {
  display: flex;
  gap: 14px;
}
.agent-profile .ap-note svg {
  flex: none;
}

/* "Зв'язатися" + share fixed at the bottom of the window (phone and desktop) */
.ap-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #ebebeb;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.ap-mobile-bar-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center; /* both buttons as wide as their content, centered */
  gap: 10px;
}
/* desktop: only under the left column (left / width set by assets/js/user/agent_profile.js) */
@media (min-width: 992px) {
  .ap-mobile-bar {
    right: auto;
    padding: 12px 16px;
    border: 1px solid #ebebeb;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
  }
  .ap-mobile-bar-inner {
    max-width: none;
  }
}
/* phone: the bar covers the end of the page, so leave room for it (on desktop it is only under the left column) */
@media (max-width: 991.98px) {
  body:has(.ap-mobile-bar) {
    padding-bottom: 72px;
  }
}
/* .agent-profile.ap-mobile-bar: outweighs the general .agent-profile .ap-contact-btn / .ap-share-btn rules below */
.agent-profile.ap-mobile-bar .ap-contact-btn {
  flex: none;
  min-height: 46px;
}
.agent-profile.ap-mobile-bar .ap-share-btn {
  flex: none;
  width: 46px;
  min-height: 46px;
}

/* "Зв'язатися" (blue) + share (round icon, the outline of "Фільтри") of the bottom bar */
.agent-profile .ap-contact-btn {
  min-height: 40px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #3366bb;
  color: #fff;
  font-size: 15px;
  font-weight: 500; /* semibold look: the site font (Helvetica Neue) has no 600 face, 600 renders bold */
}
.agent-profile .ap-contact-btn:hover {
  background: #2a559c;
}
.agent-profile .ap-share-btn {
  width: 36px;
  padding: 0;
  justify-content: center;
}

/* Advertise / Edit: round icon buttons (like share) in the top-right corner of the agent block */
.agent-profile .ap-manage {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.agent-profile .ap-card:has(.ap-cover) .ap-manage {
  top: 12px;
  right: 12px;
}
.agent-profile .ap-card:has(.ap-cover) .ap-round-btn {
  background: #fff;
}
/* Edit menu: rounded items inside the rounded menu (a square hover background stuck out of its corners) */
.agent-profile .ap-manage .dropdown-menu {
  padding: 6px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}
.agent-profile .ap-manage .dropdown-item {
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
}
.agent-profile .ap-round-btn {
  width: 36px;
  padding: 0;
  justify-content: center;
}
.agent-profile .ap-round-btn svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.agent-profile .ap-round-btn.ap-round-btn--green {
  color: #d63a1f; /* default outline, filled red flame */
}
.agent-profile .ap-round-btn.ap-round-btn--green svg {
  fill: currentColor;
}
.agent-profile .ap-round-btn.ap-round-btn--green:hover {
  color: #b8301a;
}
.agent-profile .ap-share-btn svg {
  flex: none;
  width: 16px; /* as the only flex item an auto-sized svg collapsed to a few px */
  height: 16px;
}

/* Contact modal (_contactModal.html.twig): photo, name, agency, phones, then the form */
.agent-profile .ap-contact-modal .modal-dialog {
  max-width: 420px;
}
.agent-profile .ap-contact-modal .modal-content {
  border: 0;
  border-radius: 20px;
}
.agent-profile .ap-contact-head {
  margin-bottom: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.agent-profile .ap-contact-photo {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ap-accent);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.agent-profile .ap-contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agent-profile .ap-contact-phone {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  color: var(--ap-text);
  text-decoration: none;
}
.agent-profile .ap-contact-phone:hover {
  color: #3366bb;
}

/* List bar above the listings: "Тип", "Фільтри", search (_listBar.html.twig) */
.agent-profile .ap-bar {
  min-height: 36px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.agent-profile .ap-bar-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: transparent;
  color: var(--ap-text);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.agent-profile .ap-bar-btn:hover,
.agent-profile .ap-bar-btn[aria-expanded="true"] {
  border-color: #222;
}
.agent-profile .ap-bar-btn.is-active {
  border-color: #222;
  font-weight: 500;
}
.agent-profile .ap-bar-btn[aria-expanded="true"] .ap-chevron {
  transform: rotate(180deg);
}
/* "Фільтри" with active filters: dark outline and the count in a badge on the top-right corner */
.agent-profile .ap-bar-btn.has-filters {
  position: relative;
  border-color: #222;
  box-shadow: inset 0 0 0 1px #222;
}
.agent-profile .ap-bar-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px; /* a circle for one digit, a pill for more */
  height: 20px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.agent-profile .ap-bar-badge.d-none {
  display: none;
}

/* "Тип" panel: opens under the bar from its left edge (the bar is the positioning box, not the button) */
.agent-profile .ap-bar {
  position: relative;
}
.agent-profile .ap-bar .dropdown {
  position: static;
}
@media (min-width: 768px) {
  .agent-profile .ap-type-menu {
    top: 100%;
    left: 0 !important;
  }
}
.agent-profile .ap-type-menu {
  width: min(520px, calc(100vw - 32px));
  margin-top: 8px !important;
  padding: 24px;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.agent-profile .ap-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.agent-profile .ap-option {
  min-height: 44px;
  padding: 0 8px 0 14px;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.agent-profile .ap-option:hover,
.agent-profile .btn-check:checked + .ap-option {
  border-color: #222;
}
.agent-profile .btn-check:focus-visible + .ap-option {
  outline: 2px solid var(--ap-accent);
  outline-offset: 2px;
}
.agent-profile .ap-option-count {
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f2f2f2;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.agent-profile .ap-sheet-head {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.agent-profile .ap-sheet-title {
  font-size: 22px;
  font-weight: 600;
}
.agent-profile .ap-sheet-foot {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agent-profile .ap-clear {
  padding: 10px 0;
  font-weight: 600;
  color: var(--ap-text);
  text-decoration: underline;
}
.agent-profile .ap-clear.is-disabled {
  color: #b0b0b0;
  pointer-events: none;
  text-decoration: none;
}
.agent-profile .ap-show-btn {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #222;
  color: #fff;
  font-weight: 600;
}
.agent-profile .ap-show-btn:hover {
  background: #000;
}

/* Phone: the "Тип" panel is a bottom sheet over a dimmed page */
@media (max-width: 767.98px) {
  .agent-profile .ap-type-menu.show {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    margin: 0 !important;
    border-radius: 24px 24px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
    z-index: 1060;
  }
}

/* Search: a round button that opens into a field over the rest of the row */
.agent-profile .ap-search {
  position: relative;
  display: flex;
  align-items: center;
}
.agent-profile .ap-search-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: transparent;
  color: var(--ap-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.agent-profile .ap-search-btn:hover {
  border-color: #222;
}
.agent-profile .ap-search-input,
.agent-profile .ap-search-close {
  display: none;
}
.agent-profile .ap-bar.is-searching .ap-search {
  flex: 1 1 220px; /* the open search fills the rest of the row (or wraps to its own row on a phone) */
}
.agent-profile .ap-bar.is-searching .ap-search-btn {
  position: absolute;
  left: 0;
  border-color: transparent;
  pointer-events: none;
}
.agent-profile .ap-bar.is-searching .ap-search-input {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0 36px;
  border: 1px solid #222;
  border-radius: 999px;
  font-size: 14px;
  outline: none;
}
.agent-profile .ap-search-input::-webkit-search-cancel-button {
  display: none;
}
.agent-profile .ap-bar.is-searching .ap-search-close {
  position: absolute;
  right: 3px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ap-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.agent-profile .ap-bar.is-searching .ap-search-close:hover {
  background: #f2f2f2;
}

.agent-profile .ap-list-anchor {
  scroll-margin-top: 68px; /* keep the bar (and the search field being typed in) above the listings in view */
}
.agent-profile .ap-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--ap-muted);
}

/* Filter modal: the search page filter (a horizontal bar of dropdowns there) shown as one vertical list */
.ap-filter-modal .modal-content {
  border: 0;
  border-radius: 20px;
}
/* block, not flex: as flex items the column grids below got the height of a single column */
.ap-filter-modal .ap-filter-list {
  display: block;
}
.ap-filter-modal .ap-filter-list > .nav-item + .nav-item {
  margin-top: 8px;
}
.ap-filter-modal .ap-filter-list > .nav-item > .nav-link {
  display: none !important;
}
.ap-filter-modal .ap-filter-list .d-md-none {
  display: block !important;
}
.ap-filter-modal .ap-filter-list > .nav-item > .dropdown-menu {
  display: block;
  position: static !important;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid #ebebeb;
  border-radius: 0;
  box-shadow: none;
  transform: none !important;
}
/* checkbox lists in columns (the currency row stays a row) */
.ap-filter-modal .button-list-box:not(.d-flex) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  column-gap: 8px;
}
.ap-filter-modal .button-list-box:not(.d-flex) > li {
  min-width: 0;
  width: auto; /* search.css makes these 50% wide floats on phones */
  float: none;
}
@media (max-width: 575.98px) {
  .ap-filter-modal .button-list-box:not(.d-flex) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ap-filter-modal .button-list-box .btn-link {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  white-space: normal; /* long labels wrap instead of being cut */
  overflow-wrap: anywhere;
  text-overflow: clip;
  overflow: visible;
}
.ap-filter-modal .button-list-box .btn-link {
  line-height: 24px; /* = the checkbox icon height, so the icon lines up with the first text line */
}
.ap-filter-modal .button-list-box .btn-link svg {
  flex: none;
  margin: 0;
}
.ap-filter-modal .modal-footer {
  margin-top: 0;
  border-top: 1px solid #ebebeb;
}
@media (max-width: 575.98px) {
  .ap-filter-modal .modal-content {
    border-radius: 0;
  }
}
