﻿/* ---------------------------------------------------------------------------
   /find/ filter bar (Views/Search/_FindFilterBar.cshtml, Scripts/Blumev2.FindFilterBar.js)
   Colours are the design's; change them here in one place.
   --------------------------------------------------------------------------- */

.bf-root {
    --bf-accent: #EE7900;
    --bf-accent-dark: #7E3A0B;
    --bf-accent-soft: #FDF1E6;
    --bf-accent-border: #F0C9A8;
    --bf-link: #A84F12;
    --bf-link-hover: #7E3A0B;
    --bf-text: #1E1E1E;
    --bf-muted: #4A4744;
    --bf-muted-2: #6B655E;
    --bf-border: #E6E2DC;
    --bf-border-strong: #D9D4CC;
    --bf-divider: #EFEBE5;
    --bf-neutral: #F3F0EB;
    --bf-check-border: #A8A29A;
    color: var(--bf-text);
    margin: 12px 0 8px;
}

.bf-root *, .bf-root *::before, .bf-root *::after { box-sizing: border-box; }

.bf-anchor { position: relative; z-index: 20; }

/* Bar ------------------------------------------------------------------- */

.bf-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #FFFFFF;
    border: 1px solid var(--bf-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.bf-pills { display: contents; }
.bf-spacer { flex: 1 1 0; min-width: 0; }

.bf-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px 0 16px;
    border-radius: 999px;
    border: 1.5px solid var(--bf-border-strong);
    background: #FFFFFF;
    color: var(--bf-text);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
}
.bf-pill:hover { border-color: var(--bf-accent); }
.bf-pill.is-active {
    border-color: var(--bf-accent);
    background: var(--bf-accent-soft);
    color: var(--bf-accent-dark);
}
.bf-pill:focus-visible,
.bf-root button:focus-visible,
.bf-root a:focus-visible,
.bf-root input:focus-visible,
.bf-root select:focus-visible {
    outline: 3px solid var(--bf-accent);
    outline-offset: 2px;
}

.bf-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--bf-accent);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bf-chev { transition: transform 0.15s; flex: none; }
.bf-pill[aria-expanded="true"] .bf-chev { transform: rotate(180deg); }

.bf-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--bf-muted);
}
.bf-select {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--bf-border-strong);
    border-radius: 10px;
    background: #FFFFFF;
    font: inherit;
    font-weight: 600;
    color: var(--bf-text);
}

/* Pop-over -------------------------------------------------------------- */

.bf-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(860px, 100%);
    background: #FFFFFF;
    border: 1px solid var(--bf-border);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(30, 20, 10, 0.16);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bf-pop[hidden] { display: none; }

.bf-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bf-pop-head h2 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; }

.bf-close {
    width: 44px;
    height: 44px;
    flex: none;
    border: none;
    border-radius: 999px;
    background: var(--bf-neutral);
    color: var(--bf-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4px 28px;
}
.bf-group { display: flex; flex-direction: column; gap: 4px; }
.bf-group-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bf-muted-2);
}

.bf-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 6px 8px;
    margin: 0 -8px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-weight: 500;
    color: var(--bf-text);
    text-align: left;
    cursor: pointer;
    width: calc(100% + 16px);
}
.bf-opt:hover { background: var(--bf-neutral); }
.bf-opt[aria-pressed="true"], .bf-opt[aria-checked="true"] { font-weight: 700; }

.bf-box {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 6px;
    border: 2px solid var(--bf-check-border);
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bf-opt.is-radio .bf-box { border-radius: 999px; }
.bf-opt[aria-pressed="true"] .bf-box,
.bf-opt[aria-checked="true"] .bf-box {
    background: var(--bf-accent);
    border-color: var(--bf-accent);
}
.bf-box svg { display: none; }
.bf-opt[aria-pressed="true"] .bf-box svg,
.bf-opt[aria-checked="true"] .bf-box svg { display: block; }

.bf-field { display: flex; flex-direction: column; gap: 6px; max-width: 320px; }
.bf-field label { font-size: 15px; font-weight: 600; margin: 0; }
.bf-input {
    min-height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--bf-border-strong);
    border-radius: 10px;
    font: inherit;
    color: var(--bf-text);
    background: #FFFFFF;
    width: 100%;
}
.bf-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.bf-row .bf-field { flex: 1 1 140px; }
.bf-error { color: #A4161A; font-weight: 600; font-size: 15px; margin: 0; }
.bf-hint { font-size: 15px; color: var(--bf-muted-2); margin: 0; }

.bf-linkbtn {
    min-height: 44px;
    padding: 0 4px;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 700;
    color: var(--bf-link);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.bf-linkbtn:hover { color: var(--bf-link-hover); }
.bf-hint .bf-linkbtn { min-height: 0; font-size: inherit; padding: 0; }

.bf-scroll { max-height: 50vh; overflow-y: auto; padding-right: 4px; }

.bf-pop-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--bf-divider);
}
.bf-foot-left { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.bf-mode { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--bf-muted); cursor: pointer; }
.bf-mode input { width: 18px; height: 18px; accent-color: var(--bf-accent); }

.bf-primary {
    min-height: 48px;
    padding: 0 26px;
    border: none;
    border-radius: 12px;
    background: var(--bf-accent);
    color: #FFFFFF;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.bf-primary:hover { background: var(--bf-accent-dark); }

/* Summary and chips ----------------------------------------------------- */

.bf-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    min-height: 44px;
    margin-top: 14px;
}
.bf-count { margin: 0 6px 0 0; font-size: 18px; }
.bf-count strong { font-weight: 800; }
.bf-chips { display: contents; }

.bf-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px 0 14px;
    border: 1px solid var(--bf-accent-border);
    border-radius: 999px;
    background: var(--bf-accent-soft);
    color: var(--bf-accent-dark);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.bf-chip:hover { border-color: var(--bf-accent); }
.bf-clearall { min-height: 38px; padding: 0 6px; font-size: 15px; }

/* Small screens --------------------------------------------------------- */

@media (max-width: 575.98px) {
    .bf-bar { padding: 10px; }
    .bf-spacer { display: none; }
    .bf-sort { width: 100%; justify-content: space-between; }
    .bf-pop { padding: 18px; border-radius: 14px; }
    .bf-pop-foot { flex-direction: column-reverse; align-items: stretch; }
    .bf-primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .bf-chev { transition: none; }
}
