/* =====================================================================
   Desplegables (FancySelect) – comuns a la web pública i al panell
   ===================================================================== */
.fs { position: relative; width: 100%; min-width: 0; font-family: inherit; }
.fs[hidden] { display: none !important; }
.fs-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0 !important; pointer-events: none !important; margin: 0 !important; }

.fs-trigger {
    width: 100%; display: flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 9px 12px 9px 14px;
    background: #fff; color: var(--ink, #111727);
    border: 1.5px solid var(--line, #e1e7f6); border-radius: 12px;
    font: 500 14.5px/1.3 inherit; font-family: inherit; text-align: left; cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.fs-trigger:hover { border-color: #c5d3f4; }
.fs-trigger:focus-visible, .fs.is-open .fs-trigger { outline: none; border-color: var(--primary, #2f5bea); box-shadow: 0 0 0 4px var(--primary-soft, #e6edff); }
.fs-value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-value.is-placeholder { color: var(--muted, #8590a8); }
.fs-meta { font-size: 13px; font-weight: 700; color: var(--muted, #8590a8); white-space: nowrap; }
.fs-meta:empty { display: none; }
/* Com a la referència: al botó només el nom; el text secundari surt dins la llista */
.fs-trigger .fs-meta { display: none; }
.fs-chev { width: 26px; height: 26px; margin-right: -4px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-2, #465068); transition: transform .2s, background .15s, color .15s; flex: none; }
.fs-chev svg { width: 15px; height: 15px; }
.fs.is-open .fs-chev { transform: rotate(180deg); background: var(--primary-soft, #e6edff); color: var(--primary, #2f5bea); }
.fs.is-disabled .fs-trigger { opacity: .55; cursor: default; background: #f6f8fe; }

/* Panell */
.fs-panel {
    position: fixed; z-index: 9999; top: 0; left: 0;
    background: #fff; border: 1px solid var(--line, #e1e7f6); border-radius: 16px;
    box-shadow: 0 2px 6px rgba(20, 40, 110, .06), 0 18px 40px rgba(30, 55, 150, .18);
    padding: 6px; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top center;
    transition: opacity .14s ease, transform .14s ease;
}
.fs-panel.is-up { transform-origin: bottom center; transform: translateY(4px) scale(.98); }
.fs-panel.is-visible { opacity: 1; transform: none; }
.fs-search { position: relative; margin: 2px 2px 8px; }
.fs-search svg { position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--muted, #8590a8); pointer-events: none; }
.fs-search input { width: 100%; padding: 9px 12px 9px 34px; border: 1.5px solid var(--line, #e1e7f6); border-radius: 10px; font: 14px inherit; font-family: inherit; background: #f6f8fe; color: var(--ink, #111727); box-shadow: none; }
.fs-search input:focus { outline: none; border-color: var(--primary, #2f5bea); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft, #e6edff); }
.fs-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 4px; outline: none; scrollbar-width: thin; scrollbar-color: #c5d3f4 transparent; }
.fs-list::-webkit-scrollbar { width: 8px; }
.fs-list::-webkit-scrollbar-thumb { background: #d3ddf6; border-radius: 99px; border: 2px solid #fff; }
.fs-option {
    display: flex; align-items: center; gap: 10px; min-height: 40px;
    padding: 9px 12px; border-radius: 10px; cursor: pointer;
    font-size: 14.5px; font-weight: 500; color: var(--ink, #111727); user-select: none;
}
.fs-check { display: none; }
.fs-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-opt-meta { font-size: 13px; font-weight: 700; color: var(--muted, #8590a8); white-space: nowrap; }
.fs-option.is-active { background: #f2f5ff; }
.fs-option.is-selected { background: var(--primary-soft, #e6edff); color: var(--primary-dark, #1f45c9); font-weight: 700; }
.fs-option.is-selected .fs-opt-meta { color: var(--primary, #2f5bea); }
.fs-option.is-selected.is-active { background: #dbe5ff; }
.fs-option.is-disabled { opacity: .45; cursor: default; }
.fs-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #8590a8); padding: 8px 12px 2px; }
.fs-empty { margin: 0; padding: 14px 12px; text-align: center; color: var(--muted, #8590a8); font-size: 13.5px; }

/* Variants segons on es fan servir */
.fs--inline .fs-trigger { min-height: 36px; border-color: transparent; background: transparent; padding: 5px 8px 5px 10px; font-size: 14px; }
.fs--inline .fs-trigger:hover { border-color: var(--line, #e1e7f6); background: #fff; }
.fs--inline .fs-chev { width: 22px; height: 22px; }
.filters .fs, .bulk-bar .fs, .bulk-toolbar .fs, .inline-form .fs { width: auto; min-width: 190px; }
.bulk-bar .fs-trigger, .bulk-toolbar .fs-trigger { min-height: 36px; padding: 5px 8px 5px 12px; font-size: 13.5px; }
.bulk-sub .fs { max-width: 280px; }
.photos-table .fs { min-width: 150px; }
.billing .fs-trigger { min-height: 40px; }
