/* public/website/new-assets/css/pages/partners-cards.css  (load AFTER partners.css) */

.partners-main, .bd {
  --bc-ink: #241d33;
  --bc-body: #3d3650;
  --bc-muted: #6a6379;
  --bc-line: #ebe6f1;
  --bc-brand: #693d97;
  --bc-soft: #f6f2fb;
}

/* ---------- containers ---------- */
.partners-main #brandGrid.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.partners-main #brandGrid.brand-list { display: flex; flex-direction: column; gap: 8px; }

/* ---------- card ---------- */
.bc {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  grid-template-areas: "av id site" "where where go";
  column-gap: 12px;
  align-items: start;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--bc-line);
  border-radius: 14px;
  color: var(--bc-ink);
  transition: border-color 0.15s;
}
.bc:not(.bc--static):hover { border-color: #c9b6e0; }
.bc.is-hidden { display: none; }
.bc [hidden], .bd [hidden] { display: none !important; }

.bc-av {
  grid-area: av;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden;
}
.bc-av--0 { background: #efe7f8; color: #5a2f86; }
.bc-av--1 { background: #e0f4f1; color: #0f6b5f; }
.bc-av--2 { background: #fdf0d9; color: #8a5a00; }
.bc-av--3 { background: #fde4e8; color: #a3203f; }
.bc-av--4 { background: #e2ecfb; color: #25549b; }
.bc-av--5 { background: #e6f3df; color: #3b6b1f; }

.bc-id { grid-area: id; min-width: 0; align-self: center; }
.bc-name {
  margin: 0;
  font-size: 16px; line-height: 1.3; font-weight: 650;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.bc-tag { font-size: 11.5px; font-weight: 600; line-height: 1.5; padding: 1px 9px; border-radius: 999px; }
.bc-tag--store  { background: #f1eaf9; color: #5a2f86; }
.bc-tag--online { background: #e1f3ef; color: #0f6b5f; }

.bc-where {
  grid-area: where;
  display: flex; gap: 8px;
  margin: 14px 0 0;
  font-size: 13.5px; line-height: 1.45;
  color: var(--bc-muted);
}
.bc-where i { flex: none; margin-top: 3px; font-size: 12px; color: var(--bc-brand); }
.bc-where span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.bc-go {
  grid-area: go;
  justify-self: end; align-self: start;
  margin-top: 14px;
  font-size: 12px; color: #a79bb8;
  transition: color 0.15s, transform 0.15s;
}
.bc:hover .bc-go { color: var(--bc-brand); transform: translateX(2px); }

/* whole-card click target, sits under the website icon */
.bc-open {
  position: absolute; inset: 0; z-index: 1;
  padding: 0; background: none; border: 0; border-radius: 14px;
  cursor: pointer;
}
.bc-open:focus-visible { outline: 2px solid var(--bc-brand); outline-offset: 2px; }

.bc-site {
  grid-area: site;
  position: relative; z-index: 2;
  justify-self: end; align-self: start;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-size: 13px; color: var(--bc-muted); text-decoration: none;
}
.bc-site:hover { background: var(--bc-soft); color: var(--bc-brand); }
.bc-site:focus-visible { outline: 2px solid var(--bc-brand); }

/* ---------- list view: aligned columns ---------- */
.brand-list .bc {
  grid-template-columns: 44px minmax(170px, 260px) minmax(0, 1fr) 32px 32px;
  grid-template-areas: "av id where site go";
  align-items: center;
  padding: 12px 16px;
}
.brand-list .bc-where, .brand-list .bc-go, .brand-list .bc-site { margin: 0; align-self: center; }

@media (max-width: 760px) {
  .brand-list .bc {
    grid-template-columns: 44px minmax(0, 1fr) 32px;
    grid-template-areas: "av id site" "where where go";
    align-items: start;
    padding: 16px;
  }
  .brand-list .bc-where { margin-top: 14px; align-self: start; }
  .brand-list .bc-go { margin-top: 14px; align-self: start; }
}

/* ---------- details dialog (bottom sheet on phones) ---------- */
html.bd-lock { overflow: hidden; }
.bd {
  width: min(540px, calc(100vw - 24px));
  padding: 0; border: 0; border-radius: 16px;
  background: #fff; color: var(--bc-ink);
  box-shadow: 0 24px 60px rgba(36, 29, 51, 0.28);
}
.bd::backdrop { background: rgba(36, 29, 51, 0.45); }
.bd-box { display: flex; flex-direction: column; max-height: min(82vh, 720px); }
.bd-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 12px 14px 18px;
  border-bottom: 1px solid var(--bc-line);
}
.bd-title { flex: 1; min-width: 0; }
.bd-title h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 650; }
.bd-close {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 10px;
  font-size: 16px; color: var(--bc-muted); cursor: pointer;
}
.bd-close:hover { background: var(--bc-soft); color: var(--bc-ink); }
.bd-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 18px 20px; overflow: auto; overscroll-behavior: contain; }
.bd-site {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px;
  background: var(--bc-brand); color: #fff;
  font-weight: 600; text-decoration: none;
  border-radius: 10px;
}
.bd-site:hover { filter: brightness(1.08); color: white !important;}
.bd-search { position: relative; }
.bd-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--bc-muted); }
.bd-search input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px 10px 36px;
  font: inherit; font-size: 14px;
  border: 1px solid var(--bc-line); border-radius: 10px;
}
.bd-search input:focus { outline: 2px solid var(--bc-brand); outline-offset: -1px; }
.bd-list { display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 600px) {
  .bd { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; }
  .bd-box { max-height: 88vh; }
}

/* ---------- location content (inside dialog) ---------- */
.bc-group h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 650; }
.bc-group h4 small { font-size: 12px; font-weight: 500; color: var(--bc-muted); }
.bc-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bc-items li { position: relative; padding-left: 14px; font-size: 13.5px; line-height: 1.5; color: var(--bc-body); }
.bc-items li::before { content: ""; position: absolute; left: 2px; top: 0.65em; width: 5px; height: 5px; border-radius: 50%; background: #b9a6d3; }
.bc-items a { color: var(--bc-brand); text-underline-offset: 2px; }
.bc-bare-h { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 650; }
.bc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-chip { padding: 3px 11px; font-size: 13px; background: var(--bc-soft); border-radius: 999px; }
.bc-note { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--bc-body); }
.bc-group.is-match { order: -1; }
.bc-group.is-match h4 { color: var(--bc-brand); }
.bc-chip.is-match { order: -1; color: #fff; background: var(--bc-brand); }
.bd-list > .bc-bare { order: 0; }

/* ---------- empty state ---------- */
.bc-empty { padding: 56px 16px; text-align: center; color: var(--bc-muted); }
.bc-empty h3 { margin: 0 0 6px; font-size: 18px; color: var(--bc-ink); }
.bc-empty p { margin: 0 0 16px; }
.bc-empty button { padding: 9px 18px; font: inherit; font-weight: 600; color: #fff; background: var(--bc-brand); border: 0; border-radius: 999px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { .bc, .bc-go { transition: none; } }