/* ============================================================
   Ratecrest /businesses v2 — sidebar, grid header, modal, add page
   SENTINEL: businesses-v2
   ============================================================ */

/* ---------- Sidebar shell ---------- */
.rc-bv2-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 991.98px) { .rc-bv2-sidebar { position: static; } }

.rc-bv2-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ---------- Applied filter chips ---------- */
.rc-bv2-applied-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.rc-bv2-applied-head__title { font-weight: 600; font-size: 0.88rem; color: rgba(15, 23, 42, 0.7); }
.rc-bv2-clear-all { color: #ef4444; font-size: 0.82rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.rc-bv2-clear-all:hover { text-decoration: underline; color: #dc2626; }

.rc-bv2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-bv2-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 4px 4px 10px; border-radius: 999px;
    background: rgba(58, 67, 209, 0.08); color: #3A43D1;
    font-size: 0.80rem; font-weight: 500; text-decoration: none;
}
.rc-bv2-chip:hover { background: rgba(58, 67, 209, 0.14); color: #3A43D1; }
.rc-bv2-chip__x {
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(58, 67, 209, 0.18);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.72rem; line-height: 1;
}

/* ---------- Section heads (accordion) ---------- */
.rc-bv2-section-head {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none;
    background: none; border: 0; padding: 0; margin: 0; width: 100%;
    color: rgb(15, 23, 42); font-weight: 600; font-size: 0.95rem;
}
.rc-bv2-section-head .chev { transition: transform .2s ease; color: rgba(15, 23, 42, 0.5); }
.rc-bv2-section--collapsed .rc-bv2-section-head .chev { transform: rotate(-90deg); }
.rc-bv2-section-body { margin-top: 14px; }
.rc-bv2-section--collapsed .rc-bv2-section-body { display: none; }
.rc-bv2-section-label { font-weight: 600; font-size: 0.95rem; color: rgb(15, 23, 42); display: block; margin-bottom: 12px; }

/* ---------- Search input ---------- */
.rc-bv2-search { position: relative; }
.rc-bv2-search input {
    width: 100%; padding: 11px 14px 11px 38px;
    border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 10px;
    background: #fff; font-size: 0.92rem;
    transition: border-color .15s, box-shadow .15s;
}
.rc-bv2-search input:focus {
    outline: 0; border-color: #3A43D1;
    box-shadow: 0 0 0 3px rgba(58, 67, 209, 0.12);
}
.rc-bv2-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(15, 23, 42, 0.4); }

/* ---------- Selects ---------- */
.rc-bv2-select {
    width: 100%; padding: 11px 36px 11px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E") right 14px center no-repeat;
    appearance: none; font-size: 0.92rem; color: rgb(15, 23, 42); cursor: pointer;
}
.rc-bv2-select:focus { outline: 0; border-color: #3A43D1; box-shadow: 0 0 0 3px rgba(58, 67, 209, 0.12); }

/* ---------- Rating button group ---------- */
.rc-bv2-rating { display: flex; flex-direction: column; gap: 6px; }
.rc-bv2-rating-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(15, 23, 42, 0.10); border-radius: 10px;
    background: #fff; cursor: pointer; margin: 0;
    transition: all .15s ease;
}
.rc-bv2-rating-btn:hover { border-color: rgba(58, 67, 209, 0.4); background: rgba(58, 67, 209, 0.03); }
.rc-bv2-rating-btn.is-active {
    border-color: #3A43D1; background: rgba(58, 67, 209, 0.08);
    box-shadow: 0 0 0 1px #3A43D1 inset;
}
.rc-bv2-rating-btn input[type="radio"] { display: none; }
.rc-bv2-rating-btn__label { font-size: 0.88rem; font-weight: 500; color: rgb(15, 23, 42); }
.rc-bv2-rating-btn__stars { display: inline-flex; height: 22px; }
.rc-bv2-rating-btn__stars img { height: 100%; width: auto; }

/* ---------- Checkbox / radio rows ---------- */
.rc-bv2-check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; margin: 0; }
.rc-bv2-check input[type="checkbox"],
.rc-bv2-check input[type="radio"] { width: 16px; height: 16px; accent-color: #3A43D1; cursor: pointer; margin: 0; }
.rc-bv2-check__label { font-size: 0.88rem; color: rgba(15, 23, 42, 0.75); }

/* ---------- Mobile offcanvas overrides ---------- */
.rc-bv2-offcanvas { width: 92vw !important; max-width: 420px; }
.rc-bv2-offcanvas .offcanvas-header { border-bottom: 1px solid rgba(15, 23, 42, 0.06); padding: 18px 20px; }
.rc-bv2-offcanvas .offcanvas-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }

.rc-bv2-mobile-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12); background: #fff;
    font-weight: 500; color: rgb(15, 23, 42); cursor: pointer;
}
.rc-bv2-mobile-trigger .badge {
    background: #3A43D1; color: #fff;
    border-radius: 999px; padding: 2px 8px; font-size: 0.72rem;
}

/* ---------- Grid header ---------- */
.rc-bv2-grid-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.rc-bv2-grid-head__title { font-size: 1rem; color: rgba(15, 23, 42, 0.7); margin: 0; }
.rc-bv2-grid-head__count { color: rgba(15, 23, 42, 0.45); font-weight: 400; }
.rc-bv2-grid-head__actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-bv2-sort { min-width: 180px; }

/* ---------- CTA card ---------- */
.rc-bv2-cta {
    position: relative; padding: 36px 28px; text-align: center;
    background: linear-gradient(135deg, rgba(58, 67, 209, 0.04), rgba(91, 230, 201, 0.04));
    border: 1px solid rgba(58, 67, 209, 0.10); border-radius: 16px;
}
.rc-bv2-cta__icon {
    width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px;
    background: rgba(58, 67, 209, 0.08); color: #3A43D1;
    display: inline-flex; align-items: center; justify-content: center;
}
.rc-bv2-cta__icon svg { width: 26px; height: 26px; }
.rc-bv2-cta__title { font-size: 1.4rem; font-weight: 700; color: rgb(15, 23, 42); margin: 0 0 8px; }
.rc-bv2-cta__sub { color: rgba(15, 23, 42, 0.65); margin: 0 0 22px; font-size: 0.96rem; }
.rc-bv2-cta__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; background: #3A43D1; color: #fff;
    border: 0; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
    text-decoration: none; cursor: pointer;
    box-shadow: 0 6px 16px -6px rgba(58, 67, 209, 0.5);
    transition: transform .15s ease, box-shadow .15s ease;
}
.rc-bv2-cta__btn:hover {
    transform: translateY(-1px); color: #fff;
    box-shadow: 0 10px 20px -8px rgba(58, 67, 209, 0.6);
}

/* ---------- Add Business modal ---------- */
.rc-add-modal .modal-dialog { max-width: 640px; }
.rc-add-modal .modal-content { border: 0; border-radius: 16px; overflow: hidden; position: relative; max-height: calc(100vh - 56px); display: flex; flex-direction: column; }
.rc-add-modal__close {
    position: absolute; top: 22px; right: 22px; z-index: 5;
    background: #fff; border: 1px solid rgba(15, 23, 42, 0.1);
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.rc-add-modal__head { padding: 28px 28px 0; display: flex; align-items: flex-start; gap: 16px; border: 0; }
.rc-add-modal__icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: rgba(58, 67, 209, 0.08); color: #3A43D1;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rc-add-modal__icon svg { width: 28px; height: 28px; }
.rc-add-modal__eyebrow {
    color: #3A43D1; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 6px;
}
.rc-add-modal__title { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; color: rgb(15, 23, 42); line-height: 1.2; }
.rc-add-modal__sub { color: rgba(15, 23, 42, 0.6); margin: 0; font-size: 0.95rem; }
.rc-add-modal__body { padding: 24px 28px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }

/* Trust strip */
.rc-trust-strip {
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding: 18px;
    background: rgba(58, 67, 209, 0.03);
    border: 1px solid rgba(58, 67, 209, 0.08);
    border-radius: 12px; margin-bottom: 22px;
}
.rc-trust-item { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-right: 1px solid rgba(58, 67, 209, 0.10); }
.rc-trust-item:last-child { border-right: 0; }
.rc-trust-item__ico {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(16, 185, 129, 0.12); color: #10b981;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rc-trust-item__label { font-weight: 600; font-size: 0.85rem; color: rgb(15, 23, 42); line-height: 1.2; }
.rc-trust-item__sub { font-size: 0.75rem; color: rgba(15, 23, 42, 0.55); margin: 2px 0 0; }

/* Form */
.rc-add-form .field-row { margin-bottom: 18px; }
.rc-add-form .form-label { font-weight: 600; font-size: 0.92rem; color: rgb(15, 23, 42); margin-bottom: 8px; }
.rc-add-form .form-label .req { color: #ef4444; }
.rc-add-form .form-label .optional { color: rgba(15, 23, 42, 0.45); font-size: 0.82rem; font-weight: 500; margin-left: 6px; }
.rc-add-form .form-control {
    width: 100%; padding: 11px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 10px;
    background: #fff; font-size: 0.92rem;
}
.rc-add-form .form-control:focus {
    outline: 0; border-color: #3A43D1;
    box-shadow: 0 0 0 3px rgba(58, 67, 209, 0.12);
}
.rc-add-form .helper { color: rgba(15, 23, 42, 0.55); font-size: 0.82rem; margin-top: 6px; margin-bottom: 0; }

.rc-add-form .input-select {
    display: flex; align-items: stretch;
    border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 10px; overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.rc-add-form .input-select:focus-within { border-color: #3A43D1; box-shadow: 0 0 0 3px rgba(58, 67, 209, 0.12); }
.rc-add-form .input-select select {
    border: 0; background: rgba(15, 23, 42, 0.03);
    padding: 11px 14px; color: #10b981; font-weight: 500; font-size: 0.92rem;
}
.rc-add-form .input-select input { flex: 1; border: 0; padding: 11px 14px; font-size: 0.92rem; background: #fff; }
.rc-add-form .input-select input:focus, .rc-add-form .input-select select:focus { outline: 0; }

/* Category chips */
.rc-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-cat-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 999px;
    background: #fff; cursor: pointer; margin: 0;
    font-size: 0.9rem; font-weight: 500; color: rgb(15, 23, 42);
    transition: all .15s ease; user-select: none;
}
.rc-cat-chip:hover { border-color: #3A43D1; color: #3A43D1; }
.rc-cat-chip.is-active { background: rgba(58, 67, 209, 0.08); border-color: #3A43D1; color: #3A43D1; }
.rc-cat-chip input { display: none; }
.rc-cat-chip__more {
    background: rgba(15, 23, 42, 0.04); border: 1px solid rgba(15, 23, 42, 0.10);
    color: rgba(15, 23, 42, 0.7);
}
.rc-cat-chips--collapsed .rc-cat-chip[data-hidden="1"] { display: none; }

/* Modal footer */
.rc-add-modal__foot {
    padding: 18px 28px 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.015);
    margin: 24px -28px -24px;
}
.rc-add-modal__foot-trust {
    display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px;
    color: rgba(15, 23, 42, 0.65); font-size: 0.85rem;
}
.rc-add-modal__foot-trust__ico {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(16, 185, 129, 0.12); color: #10b981;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rc-add-modal__btn-cancel {
    padding: 10px 20px;
    border: 1px solid rgba(15, 23, 42, 0.14); background: #fff;
    border-radius: 10px; font-weight: 600; color: rgb(15, 23, 42); cursor: pointer;
}
.rc-add-modal__btn-submit {
    padding: 11px 22px; background: #3A43D1; color: #fff;
    border: 0; border-radius: 10px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 16px -6px rgba(58, 67, 209, 0.5);
    transition: transform .15s ease, box-shadow .15s ease;
}
.rc-add-modal__btn-submit:hover { transform: translateY(-1px); color: #fff; }

/* ---------- Add Business full page ---------- */
.rc-add-page { max-width: 720px; margin: 0 auto; }
.rc-add-page__card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px; padding: 32px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.rc-add-page__head { display: flex; align-items: flex-start; gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .rc-trust-strip { grid-template-columns: 1fr; gap: 0; }
    .rc-trust-item { border-right: 0; border-bottom: 1px solid rgba(58, 67, 209, 0.10); padding: 12px 0; }
    .rc-trust-item:last-child { border-bottom: 0; padding-bottom: 0; }
    .rc-trust-item:first-child { padding-top: 0; }
    .rc-add-modal__foot { flex-direction: column; align-items: stretch; }
    .rc-add-modal__foot-trust { width: 100%; }
    .rc-add-page__card { padding: 22px; }
    .rc-add-modal__head { padding: 22px 22px 0; flex-direction: column; }
    .rc-add-modal__body { padding: 20px 22px; }
    .rc-add-modal__title { font-size: 1.35rem; }
}

/* ---------- Verified-orb badge positioning fix on business cards ---------- */
/* The orb-wrap was overflowing the logo bottom-right (Meridian card).
   Pull it slightly inward so it sits inside the image bounds. */
.item-img { position: relative; overflow: visible; }
.item-img .verified-orb-wrap { bottom: 0 !important; right: 0 !important; }


/* 1.8.13.5 cosmetic */
/* Hide redundant star icons in rating sidebar buttons — labels suffice */

/* Card logos fill the box — no whitespace around the image */
.items .item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================
   Dedup matches panel — Phase 5 (S36)
   Appears below business_name input when potential duplicates found.
   ============================================================ */
.rc-dedup-matches {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}
.rc-dedup-matches[hidden] { display: none !important; }
.rc-dedup-matches__header {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 8px;
    color: #555;
}
.rc-dedup-matches__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rc-dedup-match {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s;
}
a.rc-dedup-match:hover { background: #f5f5f5; }
.rc-dedup-match__logo {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.rc-dedup-match__meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.rc-dedup-match__name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rc-dedup-match__sub {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rc-dedup-match--suspended { opacity: 0.65; }
.rc-dedup-match--suspended .rc-dedup-match__sub { color: #c0392b; }
.rc-dedup-override {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}
.rc-dedup-override input[type="checkbox"] { cursor: pointer; }
