/*
 * _BNFE-DirectoryList.css
 * BNFES-aligned public directory list.
 */

:root {
    --bn-list-primary: var(--bn-shell-primary, #419bc0);
    --bn-list-primary-dark: #3788aa;
    --bn-list-border: var(--bn-shell-border, #dfe7ed);
    --bn-list-muted: var(--bn-shell-muted, #667685);
    --bn-list-text: var(--bn-shell-text, #1f2d36);
    --bn-list-soft: var(--bn-shell-bg, #f7fafb);
    --bn-list-surface: var(--bn-shell-surface, #ffffff);
    --bn-list-radius: var(--bn-shell-control-radius, 10px);
    --bn-list-card-radius: 8px;
    --bn-list-sticky-top: var(--bn-shell-topbar-height, 64px);
    --bn-list-shell-pad: 24px;
    --bn-list-shadow: 0 16px 36px rgba(31, 45, 54, .10);
}

.bn-list-directory,
.bn-list-directory * {
    box-sizing: border-box;
}

.bn-list-directory {
    position: relative;
    padding: 0 0 36px;
    margin-top: calc(var(--bn-list-shell-pad) * -1);
    color: var(--bn-list-text);
}

.bn-list-loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 60;
    height: 3px;
    width: 0;
    opacity: 0;
    background: var(--bn-list-primary);
    transition: opacity .2s ease;
}

.bn-list-loading-bar.is-active {
    opacity: 1;
    animation: bn-list-loading 1.3s ease infinite;
}

@keyframes bn-list-loading {
    0% { width: 8%; }
    50% { width: 72%; }
    100% { width: 92%; }
}

.bn-list-main {
    min-width: 0;
}

.bn-directory-ads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 12px;
    margin: 0 0 18px;
}

.bn-directory-ad-link {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.bn-directory-ad {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 96px;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-card-radius);
    background: #fff;
    box-shadow: 0 10px 24px rgba(31, 45, 54, .08);
}

.bn-directory-ad img,
.bn-ad-embed iframe {
    display: block;
    width: 100%;
}

.bn-directory-ad img {
    width: 100%;
    height: auto;
}

@media (max-width: 720px) {
    .bn-directory-ads {
        grid-template-columns: 1fr;
    }
}

.bn-sponsored-label {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    border-radius: 999px;
    background: rgba(31, 45, 54, .78);
    color: #fff;
    padding: 3px 8px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.bn-controls-band {
    position: sticky;
    top: var(--bn-list-sticky-top);
    z-index: 70;
    display: grid;
    grid-template-columns: minmax(86px, 128px) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin: 0 calc(var(--bn-list-shell-pad) * -1.3) 18px;
    border: 1px solid var(--bn-list-border);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 18px rgba(31, 45, 54, .06);
    backdrop-filter: blur(10px);
    padding: 6px var(--bn-list-shell-pad);
}

.bn-section-label {
    display: flex;
    align-items: center;
    color: var(--bn-list-primary);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: uppercase;
}

@media (min-width: 901px) {
    .bn-shell-content:has(#bn-directory-list-app) {
        padding-top: 0;
    }

    .bn-shell-content:has(#bn-directory-list-app) .bn-list-directory {
        margin-top: 0;
    }
}

.bn-controls-main,
.bn-list-toolbar {
    min-width: 0;
}

.bn-list-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 0;
}

.bn-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.bn-control,
.bn-search-button,
.bn-secondary-button,
.bn-link-button,
.bn-page-button {
    font: inherit;
}

.bn-control {
    min-height: 36px;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-radius);
    background: #fff;
    color: var(--bn-list-text);
    padding: 0 12px;
    font-size: .92rem;
}

.bn-control:focus,
.bn-filter-dropdown[open] summary,
.bn-secondary-button:focus,
.bn-page-button:focus {
    border-color: var(--bn-list-primary);
    box-shadow: 0 0 0 .15rem rgba(65, 155, 192, .16);
    outline: 0;
}

.bn-search-box {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 36px;
}

.bn-search-box span {
    display: grid;
    place-items: center;
    border: 1px solid var(--bn-list-border);
    border-right: 0;
    border-radius: var(--bn-list-radius) 0 0 var(--bn-list-radius);
    background: #fff;
    color: var(--bn-list-muted);
}

.bn-search-box .bn-control {
    border-radius: 0;
}

.bn-search-button {
    min-height: 36px;
    border: 1px solid var(--bn-list-primary);
    border-left: 0;
    border-radius: 0 var(--bn-list-radius) var(--bn-list-radius) 0;
    background: var(--bn-list-primary);
    color: #fff;
    padding: 0 14px;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
}

.bn-search-button:hover,
.bn-search-button:focus {
    border-color: #2f86aa;
    background: #2f86aa;
    outline: 0;
}

.bn-filter-dropdowns {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.bn-mobile-filter-button,
.bn-mobile-filter-modal {
    display: none;
}

.bn-filter-dropdown {
    position: relative;
    z-index: 1;
}

.bn-filter-dropdown[open] {
    z-index: 90;
}

.bn-filter-dropdown summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 138px;
    min-height: 36px;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-radius);
    background: #fff;
    color: var(--bn-list-text);
    padding: 0 12px;
    font-size: .9rem;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.bn-filter-dropdown summary::-webkit-details-marker {
    display: none;
}

.bn-filter-dropdown summary::after {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    color: var(--bn-list-muted);
    content: "";
    transform: rotate(45deg) translateY(-2px);
}

.bn-filter-dropdown[open] summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
}

.bn-filter-dropdown summary span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.bn-filter-dropdown summary b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--bn-list-primary);
    color: #fff;
    font-size: .75rem;
}

.bn-filter-dropdown.is-locked summary {
    border-color: #d9b76c;
    background: #fff8e6;
    color: #8a641b;
}

.bn-filter-dropdown.is-locked summary::after {
    color: #8a641b;
}

.bn-filter-dropdown.is-locked[open] summary,
.bn-filter-dropdown.is-locked summary:hover,
.bn-filter-dropdown.is-locked summary:focus {
    border-color: #c59631;
    background: #f4dca0;
    color: #5f4210;
}

.bn-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 95;
    width: min(340px, calc(100vw - 28px));
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-card-radius);
    background: #fff;
    box-shadow: var(--bn-list-shadow);
    padding: 13px;
}

.bn-location-panel {
    right: 0;
    left: auto;
    width: min(680px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
}

.bn-location-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.bn-location-subhead {
    margin-bottom: 8px;
    color: var(--bn-list-text);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bn-city-row span {
    display: grid;
    gap: 1px;
}

.bn-city-row small {
    color: var(--bn-list-muted);
    font-size: .76rem;
    line-height: 1.2;
}

.bn-filter-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bn-filter-search {
    width: 100%;
}

.bn-filter-scroll {
    display: grid;
    gap: 2px;
    max-height: 290px;
    overflow: auto;
    margin-top: 10px;
    padding-right: 4px;
}

.bn-check-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 30px;
    margin: 0;
    padding: 5px 4px;
    border-radius: 6px;
    font-size: .9rem;
    line-height: 1.25;
    cursor: pointer;
    user-select: none;
}

.bn-check-row:hover {
    background: var(--bn-list-soft);
}

.bn-check-row input {
    margin-top: 2px;
    accent-color: var(--bn-list-primary);
}

.bn-filter-empty {
    margin: 8px 0 0;
    color: var(--bn-list-muted);
    font-size: .85rem;
}

.bn-secondary-button,
.bn-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border-radius: var(--bn-list-radius);
    cursor: pointer;
}

.bn-secondary-button {
    border: 1px solid var(--bn-list-border);
    background: #fff;
    color: var(--bn-list-text);
    padding: 0 13px;
    font-size: .9rem;
    font-weight: 700;
}

.bn-secondary-button:hover {
    border-color: var(--bn-list-primary);
    background: #eef8fb;
    color: var(--bn-list-primary-dark);
}

.bn-clear-filters-button {
    white-space: nowrap;
}

.bn-link-button {
    border: 0;
    background: transparent;
    color: var(--bn-list-primary-dark);
    padding: 0 4px;
    font-size: .85rem;
    font-weight: 700;
}

.bn-link-button:disabled,
.bn-secondary-button:disabled,
.bn-control:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.bn-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 14px;
}

.bn-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    border: 1px solid #c9e4ee;
    border-radius: var(--bn-list-radius);
    background: #eef8fb;
    color: #245d72;
    padding: 3px 10px;
    font-size: .85rem;
    cursor: pointer;
}

.bn-filter-pill:hover {
    border-color: var(--bn-list-primary);
    background: #e3f3f8;
}

.bn-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-card-radius);
    background: #fff;
    color: var(--bn-list-muted);
    padding: 9px 11px;
    font-size: .9rem;
}

.bn-error-notice {
    border-color: #f1c6c6;
    background: #fff7f7;
    color: #8b2f2f;
}

.bn-company-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 8px;
}

.bn-company-row {
    position: relative;
    display: block;
    padding: 14px;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-card-radius);
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(31, 45, 54, .02);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease;
}

.bn-company-row:hover,
.bn-company-row:focus,
.bn-company-row:focus-within {
    z-index: 2;
    color: inherit;
    text-decoration: none;
    border-color: var(--bn-list-primary);
    box-shadow: 0 14px 32px rgba(31, 45, 54, .10);
    transform: translateY(-1px);
}

.bn-company-link {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.bn-company-main-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.bn-company-link:hover,
.bn-company-link:focus {
    color: inherit;
    text-decoration: none;
    outline: 0;
}

.bn-company-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 50px;
    border: 1px solid #edf1f4;
    border-radius: var(--bn-list-card-radius);
    background: var(--bn-list-soft);
    color: var(--bn-list-primary);
    font-size: 1.55rem;
}

.bn-company-logo img {
    max-width: 48px;
    max-height: 38px;
    object-fit: contain;
}

.bn-company-body {
    min-width: 0;
}

.bn-company-title-line {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.bn-company-title-line h2 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.25;
    font-weight: 700;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.bn-viewed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    margin-top: 0;
    border-radius: var(--bn-list-radius);
    background: #eaf5ee;
    color: #287545;
    padding: 2px 7px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.bn-company-meta,
.bn-company-brands,
.bn-company-categories {
    margin: 10px 0 0;
    color: var(--bn-list-muted);
    font-size: .88rem;
    line-height: 1.35;
}

.company-viewed-today .bn-company-title-line {
    padding-right: 0;
}

.bn-company-brands {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bn-company-categories {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}

.bn-category-chip,
.bn-category-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 19px;
    border: 1px solid #d7ecf4;
    border-radius: var(--bn-list-radius);
    background: #eef8fb;
    color: #245d72;
    padding: 1px 7px;
    font-size: .66rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.bn-category-chip {
    overflow: hidden;
    text-overflow: ellipsis;
}

.bn-category-more {
    position: relative;
    border-color: #c9e4ee;
    background: #ffffff;
    cursor: help;
}

.bn-category-popover {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 120;
    display: none;
    width: max-content;
    max-width: min(340px, 78vw);
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-card-radius);
    background: #fff;
    box-shadow: var(--bn-list-shadow);
    padding: 9px;
}

.bn-category-popover span {
    display: block;
    color: var(--bn-list-text);
    padding: 5px 7px;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}

.bn-category-more:hover .bn-category-popover,
.bn-category-more:focus .bn-category-popover,
.bn-category-more.is-open .bn-category-popover {
    display: block;
}

.bn-company-actions {
    display: inline-flex;
    align-content: center;
    align-items: center;
    justify-items: end;
    gap: 6px;
    min-width: 0;
}

.bn-company-action-stack {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.bn-card-icon-button,
.bn-review-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-radius);
    background: #fff;
    color: var(--bn-list-muted);
}

.bn-card-icon-button {
    width: 32px;
    padding: 0;
    cursor: pointer;
}

.bn-card-icon-button:disabled {
    cursor: wait;
    opacity: .72;
}

.bn-card-icon-button:hover,
.bn-card-icon-button:focus,
.bn-card-icon-button.is-active {
    border-color: #ef9fb2;
    background: #fff2f5;
    color: #c9345c;
    outline: 0;
}

.bn-card-icon-button.is-active i::before {
    font-weight: 900;
}

.bn-review-count {
    gap: 4px;
    min-width: 32px;
    padding: 0 7px;
    font-size: .78rem;
    font-weight: 700;
}

.bn-empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 48px 16px;
    color: var(--bn-list-muted);
    text-align: center;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-card-radius);
    background: #fff;
}

.bn-empty-state i {
    font-size: 2rem;
    color: var(--bn-list-primary);
}

.bn-pagination {
    margin-top: 22px;
}

.bn-page-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.bn-page-button,
.bn-page-gap {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-radius);
    background: #fff;
    color: var(--bn-list-primary-dark);
    font-size: .9rem;
}

.bn-page-button {
    cursor: pointer;
}

.bn-page-button:hover,
.bn-page-button.is-active {
    border-color: var(--bn-list-primary);
    background: var(--bn-list-primary);
    color: #fff;
}

.bn-page-button.is-locked {
    border-color: #d9b76c;
    background: #fff8e6;
    color: #8a641b;
    gap: 4px;
    grid-auto-flow: column;
    padding: 0 10px;
}

.bn-page-button.is-locked:hover,
.bn-page-button.is-locked:focus {
    border-color: #c59631;
    background: #f4dca0;
    color: #5f4210;
    outline: 0;
}

.bn-page-button:disabled,
.bn-page-gap {
    opacity: .55;
    cursor: default;
}

.bn-promo-modal {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: grid;
    place-items: center;
    padding: 18px;
}

.bn-promo-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(23, 35, 42, .48);
    cursor: pointer;
}

.bn-promo-dialog {
    position: relative;
    z-index: 1;
    width: min(430px, 100%);
    border: 1px solid var(--bn-list-border);
    border-radius: var(--bn-list-card-radius);
    background: #fff;
    box-shadow: 0 24px 70px rgba(31, 45, 54, .24);
    padding: 26px;
    text-align: center;
}

.bn-promo-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--bn-list-muted);
    cursor: pointer;
}

.bn-promo-close:hover,
.bn-promo-close:focus {
    border-color: var(--bn-list-border);
    background: #f7fafb;
    color: var(--bn-list-text);
    outline: 0;
}

.bn-promo-icon {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #e3f3f8;
    color: var(--bn-list-primary);
    font-size: 1.35rem;
}

.bn-promo-dialog h2 {
    margin: 0 0 8px;
    color: var(--bn-list-text);
    font-size: 1.35rem;
    line-height: 1.2;
}

.bn-promo-message {
    margin: 0;
    color: var(--bn-list-text);
    font-size: 1rem;
    line-height: 1.45;
}

.bn-promo-detail {
    margin: 8px 0 0;
    color: var(--bn-list-muted);
    font-size: .92rem;
    line-height: 1.45;
}

.bn-promo-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.bn-promo-primary,
.bn-promo-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: var(--bn-list-radius);
    padding: 0 16px;
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
}

.bn-promo-primary {
    border: 1px solid var(--bn-list-primary);
    background: var(--bn-list-primary);
    color: #fff !important;
}

.bn-promo-secondary {
    border: 1px solid var(--bn-list-border);
    background: #fff;
    color: var(--bn-list-primary-dark);
}

.bn-promo-primary:hover,
.bn-promo-primary:focus,
.bn-promo-primary:visited,
.bn-promo-primary:active {
    background: #2f86aa;
    border-color: #2f86aa;
    color: #fff !important;
}

.bn-promo-secondary:hover,
.bn-promo-secondary:focus {
    border-color: var(--bn-list-primary);
    color: var(--bn-list-primary);
}

.bn-skeleton-logo,
.bn-skeleton-lines span {
    display: block;
    border-radius: 6px;
    background: linear-gradient(90deg, #e8ecef 25%, #f6f9fb 50%, #e8ecef 75%);
    background-size: 200% 100%;
    animation: bn-list-shimmer 1.4s ease infinite;
}

.bn-skeleton-logo {
    width: 68px;
    height: 58px;
}

.bn-skeleton-lines {
    display: grid;
    gap: 8px;
}

.bn-skeleton-lines span {
    height: 12px;
}

.bn-skeleton-lines span:nth-child(1) {
    width: 44%;
    height: 16px;
}

.bn-skeleton-lines span:nth-child(2) {
    width: 28%;
}

.bn-skeleton-lines span:nth-child(3) {
    width: 70%;
}

@keyframes bn-list-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (min-width: 700px) {
    .bn-company-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1050px) {
    .bn-company-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1500px) {
    .bn-company-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 2200px) {
    .bn-company-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    :root {
        --bn-list-sticky-top: var(--bn-shell-topbar-height, 64px);
        --bn-list-shell-pad: 16px;
    }

    .bn-list-directory {
        padding-bottom: 112px;
    }

    .bn-controls-band {
        top: var(--bn-list-sticky-top);
        z-index: 150;
        grid-template-columns: 1fr;
        gap: 0;
        margin: 0 calc(var(--bn-list-shell-pad) * -1.3) 12px;
        padding: 8px var(--bn-list-shell-pad);
        border-bottom: 1px solid var(--bn-list-border);
        box-shadow: 0 10px 22px rgba(31, 45, 54, .08);
        backdrop-filter: none;
    }

    .bn-section-label {
        display: none;
    }

    .bn-list-toolbar {
        grid-template-columns: 1fr;
    }

    .bn-search-box {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        min-height: 38px;
    }

    .bn-search-box span,
    .bn-search-button,
    .bn-control {
        min-height: 38px;
    }

    .bn-filter-actions {
        display: none;
    }

    .bn-mobile-filter-button {
        position: fixed;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
        z-index: 160;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 58px;
        border: 1px solid #2f86aa;
        border-radius: 16px;
        background: linear-gradient(135deg, #419bc0, #2f86aa);
        color: #fff;
        padding: 9px 14px;
        box-shadow: 0 -14px 30px rgba(31, 45, 54, .16), 0 10px 26px rgba(65, 155, 192, .28);
        text-align: left;
        cursor: pointer;
    }

    .bn-mobile-filter-button span {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 10px;
        align-items: center;
        min-width: 0;
    }

    .bn-mobile-filter-button i {
        grid-row: span 2;
        font-size: 1rem;
    }

    .bn-mobile-filter-button strong,
    .bn-mobile-filter-button small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bn-mobile-filter-button strong {
        font-size: .95rem;
        line-height: 1.1;
    }

    .bn-mobile-filter-button small {
        color: rgba(255, 255, 255, .82);
        font-size: .78rem;
        line-height: 1.2;
    }

    .bn-mobile-filter-button b {
        display: inline-grid;
        place-items: center;
        min-width: 26px;
        height: 26px;
        border-radius: 999px;
        background: #ffffff;
        color: #2f86aa;
        font-size: .78rem;
    }

    .bn-mobile-filter-modal {
        position: fixed;
        inset: 0;
        z-index: 10040;
        display: block;
    }

    .bn-mobile-filter-backdrop {
        position: absolute;
        inset: 0;
        border: 0;
        background: rgba(15, 29, 38, .42);
    }

    .bn-mobile-filter-drawer {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        max-height: min(86vh, 760px);
        border-radius: 20px 20px 0 0;
        background: #fff;
        box-shadow: 0 -24px 54px rgba(31, 45, 54, .24);
        overflow: hidden;
    }

    .bn-mobile-filter-head,
    .bn-mobile-filter-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--bn-list-border);
    }

    .bn-mobile-filter-head span {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .bn-mobile-filter-head strong {
        font-size: 1rem;
    }

    .bn-mobile-filter-head small,
    .bn-mobile-filter-note {
        color: var(--bn-list-muted);
        font-size: .82rem;
        line-height: 1.35;
    }

    .bn-mobile-filter-close {
        display: inline-grid;
        flex: 0 0 auto;
        place-items: center;
        width: 38px;
        height: 38px;
        border: 1px solid var(--bn-list-border);
        border-radius: 12px;
        background: #fff;
        color: var(--bn-list-text);
        cursor: pointer;
    }

    .bn-mobile-filter-body {
        display: grid;
        gap: 12px;
        min-height: 0;
        overflow: auto;
        padding: 14px 16px 18px;
    }

    .bn-mobile-filter-section {
        display: grid;
        gap: 10px;
        border: 1px solid var(--bn-list-border);
        border-radius: 14px;
        background: var(--bn-list-soft);
        padding: 12px;
    }

    .bn-mobile-filter-section.is-locked {
        border-color: #d9b76c;
        background: #fff8e6;
        color: #5f4210;
    }

    .bn-mobile-filter-section.is-locked .bn-mobile-filter-section-head strong {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: #5f4210;
    }

    .bn-mobile-filter-section.is-locked .bn-filter-search,
    .bn-mobile-filter-section.is-locked .bn-mobile-sort-select {
        border-color: #d9b76c;
        background: #fffdf5;
    }

    .bn-mobile-filter-section.is-locked .bn-check-row {
        color: #6f5015;
    }

    .bn-mobile-filter-section.is-locked .bn-check-row:hover {
        background: #f4dca0;
    }

    .bn-mobile-filter-section.is-locked .bn-mobile-filter-note {
        color: #8a641b;
    }

    .bn-mobile-locked-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 40px;
        border: 1px solid #c59631;
        border-radius: 10px;
        background: #f4dca0;
        color: #5f4210;
        padding: 0 12px;
        font: inherit;
        font-size: .86rem;
        font-weight: 800;
        cursor: pointer;
    }

    .bn-mobile-locked-action:hover,
    .bn-mobile-locked-action:focus {
        border-color: #a97921;
        background: #ebc66d;
        outline: 0;
    }

    .bn-mobile-filter-section-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .bn-mobile-filter-note {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .bn-mobile-sort-select {
        width: 100%;
    }

    .bn-mobile-filter-drawer .bn-location-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bn-mobile-filter-drawer .bn-filter-scroll {
        max-height: min(34vh, 260px);
    }

    .bn-mobile-filter-foot {
        border-top: 1px solid var(--bn-list-border);
        border-bottom: 0;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .bn-mobile-filter-foot .bn-secondary-button,
    .bn-mobile-filter-foot .bn-search-button {
        flex: 1 1 0;
        min-height: 44px;
        border-radius: 12px;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .bn-search-button {
        padding: 0 12px;
    }

    .bn-company-row {
        min-height: 0;
        padding: 12px;
    }

    .bn-company-main-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .bn-company-link {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 10px;
    }

    .bn-company-logo {
        width: 50px;
        height: 48px;
    }

    .bn-company-logo img {
        max-width: 42px;
        max-height: 36px;
    }

    .company-viewed-today .bn-company-title-line {
        padding-top: 0;
        padding-right: 0;
    }

    .bn-company-actions {
        justify-content: flex-end;
    }

    .bn-promo-dialog {
        padding: 22px 18px;
    }

    .bn-promo-actions {
        flex-direction: column;
    }
}
