/* Find Best Local Agencies — front-end styles.
   Colors come from --fbs-primary / --fbs-accent / --fbs-score, which a theme or the
   plugin's Appearance settings can set; the fallbacks below apply otherwise.
   Two designs: .fbs-listing--modern (default) and .fbs-listing--classic. */

.fbs-listing, .fbs-page, .fbs-profile {
	--fbs-p: var(--fbs-primary, #e8192c);
	--fbs-a: var(--fbs-accent, #f5a623);
	--fbs-s: var(--fbs-score, #0f2d4a);
	--fbs-ink: #1d2b3a;
	--fbs-muted: #5d6b7a;
	--fbs-line: #e3e8ee;
	color: var(--fbs-ink);
}
.fbs-listing *, .fbs-page * { box-sizing: border-box; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.fbs-icon { width: 16px; height: 16px; flex: none; }

/* ---------- Shared: header block (shortcode), buttons ---------- */
.fbs-listing__header { text-align: center; padding: 2.5rem 1rem; }
.fbs-listing__header h1, .fbs-listing__header h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .75rem; color: var(--fbs-s); }
.fbs-listing__intro { max-width: 70ch; margin: 0 auto; font-size: .95rem; color: var(--fbs-muted); }
.fbs-listing__intro > :last-child { margin-bottom: 0; }

.fbs-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.1rem; border: 1px solid transparent; border-radius: 6px; font-weight: 700; font-size: .875rem; text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1.2; }
.fbs-btn--visit { background: var(--fbs-p); color: #fff; }
.fbs-btn--profile { background: var(--fbs-a); color: #fff; }
.fbs-btn:hover { opacity: .92; color: #fff; }
.fbs-btn .fbs-icon { width: 15px; height: 15px; }

.fbs-badge { display: inline-flex; flex: none; }
.fbs-badge .fbs-icon { width: 26px; height: 26px; }
.fbs-badge--1 { color: #f0a30a; }
.fbs-badge--2 { color: #aeb6c0; }
.fbs-badge--3 { color: #c98a45; }
.fbs-badge--4, .fbs-badge--5 { color: #f0a30a; }
.fbs-badge--4 .fbs-icon, .fbs-badge--5 .fbs-icon { width: 22px; height: 22px; }

.fbs-row__hint { margin: .6rem 0 0; padding: .4rem .7rem; border: 1px dashed #d99a00; background: #fff8e1; color: #6b5200; font-size: .75rem; border-radius: 3px; }
.fbs-empty { text-align: center; padding: 3rem 1rem; color: var(--fbs-muted); }

/* =====================================================================
   MODERN cards (default)
   ================================================================== */
.fbs-listing--modern { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem 2rem; }

.fbs-listing--modern .fbs-filters { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: flex-end; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; background: #fff; border-radius: 14px; box-shadow: 0 6px 26px rgba(15,45,74,.08); }
.fbs-filters__field { display: flex; flex-direction: column; gap: .4rem; flex: 1 1 200px; min-width: 0; }
.fbs-filters__label { display: inline-flex; align-items: center; gap: .4rem; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fbs-muted); }
.fbs-filters__label .fbs-icon { color: var(--fbs-p); width: 14px; height: 14px; }
.fbs-filters select { width: 100%; padding: .7rem .8rem; border: 1px solid var(--fbs-line); border-radius: 8px; font: inherit; font-size: .9rem; color: var(--fbs-ink); background: #fff; }
.fbs-filters select:focus { outline: 2px solid var(--fbs-p); outline-offset: 1px; }
.fbs-filters__apply { padding: .8rem 1.4rem; border-radius: 10px; }
.fbs-filters__reset { align-self: center; font-size: .8rem; font-weight: 700; color: var(--fbs-p); text-decoration: none; }

.fbs-summary { list-style: none; display: flex; flex-wrap: wrap; margin: 0 0 1.5rem; padding: 0 .5rem; }
.fbs-summary li { display: flex; align-items: center; gap: .7rem; padding: .25rem 2rem .25rem 0; margin-right: 2rem; border-right: 1px solid var(--fbs-line); }
.fbs-summary li:last-child { border-right: 0; }
.fbs-summary .fbs-icon { width: 22px; height: 22px; color: var(--fbs-p); }
.fbs-summary strong { display: block; font-size: .9rem; line-height: 1.2; }
.fbs-summary small { display: block; font-size: .72rem; color: var(--fbs-muted); }

.fbs-listing--modern .fbs-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 190px; gap: 1.75rem; align-items: center; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; background: #fff; border-radius: 14px; box-shadow: 0 4px 22px rgba(15,45,74,.07); }
.fbs-listing--modern .fbs-row__media { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.fbs-listing--modern .fbs-row__logo { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; padding: .9rem; border-radius: 14px; background: #fdeff0; background: color-mix(in srgb, var(--fbs-p) 8%, #fff); }
.fbs-listing--modern .fbs-row__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.fbs-row__logo-fallback { font-weight: 700; text-align: center; color: var(--fbs-s); font-size: .9rem; }
.fbs-listing--modern .fbs-score { margin: 0; text-align: center; }
.fbs-listing--modern .fbs-score__label { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border-radius: 999px; background: #fff; box-shadow: 0 2px 10px rgba(15,45,74,.12); font-size: .75rem; color: var(--fbs-muted); white-space: nowrap; }
.fbs-listing--modern .fbs-score__label strong { color: var(--fbs-a); font-size: .8rem; }
.fbs-score__star { width: 14px; height: 14px; color: var(--fbs-a); }
.fbs-score__bar { height: 8px; background: #ececec; margin-top: .5rem; border-radius: 4px; overflow: hidden; width: 100%; }
.fbs-score__bar span { display: block; height: 100%; background: var(--fbs-s); }

.fbs-row__title { margin: 0 0 .45rem; font-size: 1.5rem; font-weight: 700; line-height: 1.2; display: flex; align-items: center; gap: .5rem; }
.fbs-row__title a { color: var(--fbs-s); text-decoration: none; }
.fbs-row__title a:hover { text-decoration: underline; }
.fbs-row__rank { margin: 0 0 .4rem; font-size: .9rem; font-weight: 700; color: var(--fbs-ink); }
.fbs-row__desc { margin: 0 0 .85rem; font-size: .9rem; line-height: 1.6; color: var(--fbs-muted); max-width: 62ch; }
.fbs-row__meta { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 0; margin: 0; padding: 0; font-size: .8rem; color: var(--fbs-muted); }
.fbs-meta { display: inline-flex; align-items: center; gap: .4rem; padding-right: 1.1rem; margin-right: 1.1rem; border-right: 1px solid var(--fbs-line); }
.fbs-meta:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.fbs-meta a { color: inherit; text-decoration: none; }
.fbs-meta a:hover { text-decoration: underline; }
.fbs-meta--check .fbs-icon { color: var(--fbs-a); }
.fbs-meta--pin .fbs-icon { color: var(--fbs-p); }

.fbs-listing--modern .fbs-row__actions { display: flex; flex-direction: column; gap: .6rem; }
.fbs-listing--modern .fbs-btn { justify-content: space-between; padding: .8rem 1rem; }
.fbs-listing--modern .fbs-btn--profile { background: #fff; color: var(--fbs-s); border-color: var(--fbs-line); }
.fbs-listing--modern .fbs-btn--profile:hover { border-color: var(--fbs-s); color: var(--fbs-s); opacity: 1; }

.fbs-listing__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem .5rem 0; }
.fbs-count { margin: 0; font-size: .8rem; color: var(--fbs-muted); }
.fbs-pagination { display: flex; gap: .4rem; margin-left: auto; }
.fbs-pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 .5rem; border-radius: 50%; border: 1px solid var(--fbs-line); background: #fff; color: var(--fbs-ink); font-size: .85rem; text-decoration: none; }
.fbs-pagination .page-numbers.current { background: var(--fbs-p); border-color: var(--fbs-p); color: #fff; }
.fbs-pagination a.page-numbers:hover { border-color: var(--fbs-p); color: var(--fbs-p); }

/* =====================================================================
   CLASSIC rows (optional)
   ================================================================== */
.fbs-listing--classic .fbs-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; justify-content: center; padding: 1.1rem 1rem; border-bottom: 1px solid #e8e8e8; }
.fbs-listing--classic .fbs-filters__label .fbs-icon, .fbs-listing--classic .fbs-score__star, .fbs-listing--classic .fbs-btn .fbs-icon { display: none; }
.fbs-listing--classic .fbs-filters__field { flex: 0 1 auto; }
.fbs-listing--classic .fbs-filters select { min-width: 190px; width: auto; }
.fbs-listing--classic .fbs-summary { justify-content: center; margin: 1rem 0; }
.fbs-listing--classic .fbs-listing__rows { max-width: 1100px; margin: 0 auto; }
.fbs-listing--classic .fbs-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 170px; gap: 1.75rem; align-items: start; padding: 2rem 1.5rem; }
.fbs-listing--classic.fbs-listing--alt .fbs-row:nth-child(even) { background: #f8f8f8; }
.fbs-listing--classic .fbs-row__logo { display: flex; align-items: center; justify-content: center; min-height: 70px; padding: .5rem; }
.fbs-listing--classic .fbs-row__logo img { max-width: 100%; max-height: 90px; width: auto; height: auto; }
.fbs-listing--classic .fbs-score { margin-top: .5rem; font-size: .8rem; }
.fbs-listing--classic .fbs-score__label strong { color: var(--fbs-a); }
.fbs-listing--classic .fbs-row__title { font-weight: 400; font-size: 1.6rem; }
.fbs-listing--classic .fbs-row__actions { display: flex; flex-direction: column; gap: .5rem; }
.fbs-listing--classic .fbs-btn { display: block; text-align: center; border-radius: 3px; }
.fbs-listing--classic .fbs-listing__footer { max-width: 1100px; margin: 0 auto; }

/* ---------- Business info block (agency profile) ---------- */
.fbs-bizinfo { margin-top: 1.1rem; }
.fbs-bizinfo__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.fbs-biz { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .6rem; font-size: .95rem; color: #1d2b3a; }
.fbs-biz > .fbs-icon { width: clamp(18px, 5vw, 22px); height: clamp(18px, 5vw, 22px); color: var(--fbs-primary, #e8192c); }
.fbs-biz--google > .fbs-icon { color: #4285f4; }
.fbs-biz--address { align-items: flex-start; }
.fbs-biz a { color: inherit; }
.fbs-biz a:hover { text-decoration: underline; }
.fbs-biz__google { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .2rem .55rem; }
.fbs-biz__glabel { font-weight: 700; color: var(--fbs-score, #0f2d4a); }
.fbs-biz__rating { font-size: 1rem; }
.fbs-biz__count { font-size: .85rem; color: #5d6b7a; }
.fbs-stars { position: relative; display: inline-block; font-size: 1.05rem; line-height: 1; letter-spacing: .08em; color: #d9dee5; white-space: nowrap; }
.fbs-stars__fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--fbs-accent, #f5a623); }
.fbs-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; padding: 0; }
.fbs-tags li { padding: .3rem .8rem; border-radius: 999px; background: #fdeff0; background: color-mix(in srgb, var(--fbs-primary, #e8192c) 9%, #fff); color: var(--fbs-primary, #e8192c); font-size: .78rem; font-weight: 700; }

/* ---------- Pages (plugin fallback templates) ---------- */
.fbs-page__header { background: #f1f1f1; }
.fbs-page__body { padding-bottom: 2rem; }
.fbs-profile__inner { max-width: 960px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.fbs-profile__header { display: flex; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.fbs-profile__logo img { max-width: 220px; height: auto; }
.fbs-profile__header h1 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; color: var(--fbs-s); }
.fbs-profile__header .fbs-btn { margin-top: 1rem; }
.fbs-profile__terms { margin-top: 2rem; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.fbs-profile__term-label { font-weight: 700; }

@media (max-width: 860px) {
	.fbs-listing--modern .fbs-row, .fbs-listing--classic .fbs-row { grid-template-columns: 1fr; gap: 1rem; }
	.fbs-listing--modern .fbs-row__media { flex-direction: row; justify-content: flex-start; gap: 1rem; }
	.fbs-listing--modern .fbs-row__logo { width: 96px; flex: none; }
	.fbs-listing--modern .fbs-row__actions, .fbs-listing--classic .fbs-row__actions { flex-direction: row; }
	.fbs-listing--modern .fbs-btn, .fbs-listing--classic .fbs-btn { flex: 1; }
	.fbs-summary li { padding-right: 1rem; margin-right: 1rem; }
	.fbs-pagination { margin-left: 0; }
	.fbs-profile__header { flex-direction: column; align-items: flex-start; }
}

/* =====================================================================
   LOCAL listing format (default in v3): a ranking strip, name, address and
   Google stars, a round category icon, and a "View Profile" details table.
   Filters, summary strip, result count and pagination reuse the modern styles
   (the list carries both .fbs-listing--modern and .fbs-listing--local).
   ================================================================== */
.fbs-listing--local .fbs-row--local { display: block; padding: 0; overflow: hidden; background: #fff; border: 1px solid #e3e3e3; border-radius: 16px; box-shadow: 0 4px 18px rgba(15,45,74,.06); margin-bottom: 1.5rem; }
.fbs-local__strip { padding: .9rem 1.5rem; background: #efeeee; font-weight: 700; font-size: clamp(.9rem, 2.6vw, 1.05rem); color: var(--fbs-ink); }
.fbs-local__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; padding: 1.4rem 1.5rem .4rem; }
.fbs-local__id { min-width: 0; }
.fbs-local__name { margin: 0; font-size: clamp(1.35rem, 3.4vw, 2rem); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.fbs-local__name a { color: #111; text-decoration: none; }
.fbs-local__name a:hover { text-decoration: underline; }
.fbs-local__address { margin: .35rem 0 0; font-size: clamp(.9rem, 2.4vw, 1.15rem); line-height: 1.4; color: #8a949e; }
.fbs-local__rating { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .45rem; margin: .5rem 0 0; font-size: .85rem; }
.fbs-local__glink { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .1rem .45rem; color: inherit; text-decoration: none; }
.fbs-local__score { font-weight: 600; }
.fbs-local__count { color: var(--fbs-muted); }
.fbs-local__icon { flex: none; display: flex; align-items: center; justify-content: center; width: clamp(44px, 10vw, 60px); height: clamp(44px, 10vw, 60px); border-radius: 50%; overflow: hidden; background: var(--fbs-icon-color, var(--fbs-p)); color: #fff; }
.fbs-local__icon .fbs-icon { width: 54%; height: 54%; }
.fbs-local__icon img { width: 100%; height: 100%; object-fit: contain; padding: .3rem; background: #fff; }

.fbs-local__more { padding: 0 1.5rem 1.5rem; }
.fbs-local__more > summary { display: inline-flex; align-items: center; gap: .75rem; padding: .85rem 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.05rem; color: #222; }
.fbs-local__more > summary::-webkit-details-marker { display: none; }
.fbs-local__more > summary:focus-visible { outline: 2px solid var(--fbs-p); outline-offset: 3px; }
.fbs-local__more > summary .fbs-icon { width: 20px; height: 20px; transition: transform .18s ease; }
.fbs-local__more[open] > summary .fbs-icon { transform: rotate(180deg); }

.fbs-local__table { width: 100%; border-collapse: separate; border-spacing: 0 .45rem; font-size: .92rem; }
.fbs-local__table th, .fbs-local__table td { padding: .8rem 1rem; border: 1px solid #ececec; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.fbs-local__table th { width: 28%; min-width: 7.5rem; background: #fafafa; border-right: 0; border-radius: 6px 0 0 6px; color: #8a949e; font-weight: 700; }
.fbs-local__table td { border-radius: 0 6px 6px 0; color: #1d2b3a; }
.fbs-local__table td a { color: var(--fbs-s); }
.fbs-local__table .fbs-tags { margin: 0; }
.fbs-local__table .fbs-stars { font-size: 1rem; }
.fbs-local__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.fbs-listing--local .fbs-local__actions .fbs-btn { flex: 0 1 auto; min-width: 190px; }

@media (max-width: 860px) {
	.fbs-local__head { padding: 1.1rem 1rem .3rem; }
	.fbs-local__strip { padding: .75rem 1rem; }
	.fbs-local__more { padding: 0 1rem 1.25rem; }
	.fbs-local__table th { width: 34%; min-width: 0; padding: .7rem .75rem; }
	.fbs-local__table td { padding: .7rem .75rem; }
	.fbs-listing--local .fbs-local__actions .fbs-btn { flex: 1 1 100%; }
}
