/* ============================================================================
   V4 page additions: Standorte (W09)
   ----------------------------------------------------------------------------
   Source: webapp-v4/seiten/02-standorte.html (prefix standorte-, here
   bl-standorte-). Used by business/locations/v4/*, only inside the V4 shell
   (.bl-v4, FeatureSwitch v4_design).
   ========================================================================= */

/* Grid of location cards and of Google listings */
.bl-v4 .bl-standorte-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.bl-v4 .bl-standorte-grid > * { min-width: 0; }

/* Google connection bar (row: the legacy .bl-card is a flex column) */
.bl-v4 .bl-standorte-gbp { display: flex; flex-direction: row; align-items: center; gap: 12px 16px; padding: 14px 20px; margin-bottom: 24px; }
.bl-v4 .bl-standorte-gbp > .bl-ic { color: var(--good); flex: none; }
.bl-v4 .bl-standorte-gbp-text { min-width: 0; flex: 1 1 auto; }
.bl-v4 .bl-standorte-gbp-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.bl-v4 .bl-standorte-gbp-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-standorte-active { height: 20px; padding: 0 8px; font-size: 11px; }

/* Plan pill: Free grey, Premium amber, Business keeps the accent */
.bl-v4 .bl-standorte-plan--free { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.bl-v4 .bl-standorte-plan--premium { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.bl-v4 .bl-standorte-card a.bl-plan:hover { border-color: var(--accent); }

/* Location card */
.bl-v4 .bl-standorte-card { display: flex; flex-direction: column; padding: 24px; }
.bl-v4 .bl-standorte-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bl-v4 .bl-standorte-name { margin-top: 16px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-standorte-addr { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.bl-v4 .bl-standorte-addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-standorte-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 20px; }
.bl-v4 .bl-standorte-rating-num { font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--rating-ink); }
.bl-v4 .bl-standorte-rating-meta { display: flex; flex-direction: column; gap: 6px; }
.bl-v4 .bl-standorte-rating-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Report stats */
.bl-v4 .bl-standorte-report { margin-top: 20px; }
.bl-v4 .bl-standorte-report .bl-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.bl-v4 .bl-standorte-report .bl-metrics > div { display: flex; flex-direction: column; padding: 10px 12px; }
.bl-v4 .bl-standorte-report .bl-metrics dt { order: 2; margin-top: 2px; font-size: 11.5px; }
.bl-v4 .bl-standorte-report .bl-metrics dd { margin-top: 0; font-size: 18px; }
.bl-v4 .bl-standorte-report-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }
.bl-v4 .bl-standorte-num--review { color: var(--warn); }
.bl-v4 .bl-standorte-num--removed { color: var(--good); }

/* AI note and "without reply" */
.bl-v4 .bl-standorte-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 16px 0 20px; font-size: 12.5px; color: var(--muted); }
.bl-v4 .bl-standorte-ai { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-ink); }
.bl-v4 .bl-standorte-ai-upsell { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.bl-v4 .bl-standorte-ai-upsell:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

.bl-v4 .bl-standorte-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; }
.bl-v4 .bl-standorte-foot .bl-btn-primary { flex: 1 1 auto; }

/* Tile "Weiteren Standort hinzufügen" */
.bl-v4 .bl-standorte-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 240px; padding: 24px; border-radius: 16px; border: 1.5px dashed var(--line-strong); color: var(--ink-2); text-align: center; transition: border-color .15s ease, background-color .15s ease; }
.bl-v4 .bl-standorte-add:hover { border-color: var(--accent); background: var(--accent-soft); }
.bl-v4 .bl-standorte-add-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent-ink); }
.bl-v4 .bl-standorte-add-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.bl-v4 .bl-standorte-free { background: var(--good-soft); border-color: var(--good-line); color: var(--good); }

/* Empty and error states */
.bl-v4 .bl-standorte-empty .bl-empty { padding: 64px 24px; }
.bl-v4 .bl-standorte-empty .bl-empty-title { font-size: 20px; letter-spacing: -.01em; }
.bl-v4 .bl-standorte-empty .bl-empty-sub { max-width: 52ch; line-height: 1.55; }
.bl-v4 .bl-standorte-empty .bl-empty-ic { width: 32px; height: 32px; stroke-width: 1.4; }
.bl-v4 .bl-standorte-empty .bl-empty-ic--warn { color: var(--warn); }
.bl-v4 .bl-standorte-empty .bl-empty-ic--bad { color: var(--bad); }
.bl-v4 .bl-standorte-empty .bl-tag { margin-top: 16px; }
.bl-v4 .bl-standorte-empty .bl-tag + .bl-empty-title { margin-top: 12px; }
.bl-v4 .bl-standorte-hint { margin-top: 12px; font-size: 12px; color: var(--muted); max-width: 52ch; }
.bl-v4 .bl-standorte-instruction { margin-top: 16px; max-width: 52ch; text-align: left; }
.bl-v4 .bl-standorte-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 40px auto 0; max-width: 820px; width: 100%; border-radius: 12px; overflow: hidden; background: var(--line); border: 1px solid var(--line); text-align: left; }
.bl-v4 .bl-standorte-features > div { padding: 16px 18px; background: var(--surface-2); min-width: 0; }
.bl-v4 .bl-standorte-features .bl-ic { color: var(--accent); }
.bl-v4 .bl-standorte-feature-title { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.bl-v4 .bl-standorte-feature-desc { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.bl-v4 .bl-standorte-empty-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.bl-v4 .bl-standorte-empty-btns .bl-btn { margin-top: 0; }

/* Google listing to connect */
.bl-v4 .bl-standorte-conn { display: flex; flex-direction: column; padding: 20px; }
.bl-v4 .bl-standorte-conn.bl-is-connected { background: var(--surface-2); box-shadow: none; }
.bl-v4 .bl-standorte-conn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bl-v4 .bl-standorte-conn-id { min-width: 0; flex: 1 1 auto; }
.bl-v4 .bl-standorte-conn-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-standorte-conn-addr { margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-standorte-conn-flag { margin-top: 10px; }
.bl-v4 .bl-standorte-conn-flag .bl-status { white-space: normal; height: auto; min-height: 22px; padding: 2px 10px; }
.bl-v4 .bl-standorte-conn-flag p { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.bl-v4 .bl-standorte-conn-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.bl-v4 .bl-standorte-conn-lines p { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bl-v4 .bl-standorte-conn-lines span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-standorte-conn-lines .bl-ic { color: var(--muted-2); }
.bl-v4 .bl-standorte-conn-foot { margin-top: auto; padding-top: 16px; }
.bl-v4 .bl-standorte-conn-foot .bl-btn { width: 100%; }
.bl-v4 .bl-standorte-banner { margin-bottom: 20px; }

/* Dialogs */
.bl-v4 .bl-standorte-pick { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.bl-v4 .bl-standorte-pick-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.bl-v4 .bl-standorte-pick-addr { margin-top: 2px; font-size: 13px; color: var(--muted); }
.bl-v4 .bl-standorte-pick-info { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.bl-v4 .bl-standorte-group { margin-top: 20px; }
.bl-v4 .bl-standorte-group .bl-eyebrow { margin-bottom: 8px; }
.bl-v4 .bl-standorte-group .bl-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bl-v4 .bl-standorte-group .bl-choice { padding: 12px 14px; align-items: center; text-align: center; }
/* While the checkout starts, the plan choice is held (the radios must stay
   enabled, or the browser would leave them out of the form). */
.bl-v4 .bl-modal[data-busy="true"] .bl-standorte-group .bl-choice { pointer-events: none; opacity: .55; }
/* v4-busy already puts its spinner in the button; the global form[aria-busy]
   spinner (loading_states.css) would add a second one. */
.bl-v4 [id^="bl-standorte-"] form[aria-busy] button.is-busy::before { content: none; }

@media (max-width: 1023.98px) {
  .bl-v4 .bl-standorte-head { flex-wrap: wrap; }
  .bl-v4 .bl-standorte-head .bl-head-pills { width: 100%; align-items: center; justify-content: flex-start; }
  .bl-v4 .bl-standorte-head .bl-head-pills .bl-btn { flex: 1 1 auto; height: 44px; }
  .bl-v4 .bl-standorte-head .bl-hpill { height: 44px; }
  .bl-v4 .bl-standorte-gbp { flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; }
  .bl-v4 .bl-standorte-gbp-text { flex: 1 1 calc(100% - 44px); }
  .bl-v4 .bl-standorte-gbp-sub { white-space: normal; }
  .bl-v4 .bl-standorte-gbp .bl-link { min-height: 40px; margin-left: 32px; }
  .bl-v4 .bl-standorte-card { padding: 20px; }
  .bl-v4 .bl-standorte-meta a { min-height: 40px; }
  .bl-v4 .bl-standorte-foot .bl-btn { height: 44px; }
  .bl-v4 .bl-standorte-add { min-height: 140px; }
  .bl-v4 .bl-standorte-features { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .bl-v4 .bl-standorte-empty .bl-empty { padding: 48px 20px; }
  .bl-v4 .bl-standorte-empty-btns { align-self: stretch; flex-direction: column; }
  .bl-v4 .bl-standorte-empty-btns .bl-btn,
  .bl-v4 .bl-standorte-empty .bl-empty > .bl-btn { width: 100%; height: 44px; }
  .bl-v4 .bl-standorte-conn-foot .bl-btn { height: 44px; }
  .bl-v4 .bl-standorte-banner { margin-bottom: 16px; }
}
