/* ==========================================================================
   FN Fund Filters — discovery-bar dropdowns + mobile bottom sheet
   --------------------------------------------------------------------------
   Enhances .fn-toolsbar .header-fund-filters only. The native <select> stays
   the data + navigation source of truth (see assets/js/fn-fund-filters.js).
   Variant: financial discovery triggers (label + value), not form fields.
   ========================================================================== */

/* ----------------------------- Desktop fn-dd ----------------------------
   Filter chips: independent pills with gap — not equal cells in a form grid. */

.fn-ui .header-fund-filter.fn-dd {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-inline-start: 0;
}

.fn-ui .header-fund-filters > .header-fund-filter.fn-dd:first-child {
  border-inline-start: 0;
}

/* Breathing room before ETF family */
.fn-ui .header-fund-filters > .header-fund-filter.fn-dd:nth-child(4) {
  margin-inline-start: var(--fn-space-2);
  padding-inline-start: 0;
  border-inline-start: 0;
}

/* A select that shared its parent with a label or a sibling select gets its
   own field, so the option panel anchors to that control. */
.fn-ui .fn-dd-field {
  position: relative;
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
}

.fn-ui .fn-dd__native {
  position: absolute !important;
  width: 1px !important;
  min-width: 0 !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.fn-ui .fn-dd__trigger {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  min-width: 150px;
  max-width: 280px;
  height: 40px;
  min-height: 40px;
  padding-block: 0;
  padding-inline-start: 16px;
  padding-inline-end: 40px;
  border: 1px solid var(--fn-control-border);
  border-radius: var(--fn-radius-filter);
  background-color: var(--fn-control-bg);
  background-image: none;
  box-shadow: none;
  color: var(--fn-text-1);
  font-family: var(--fn-font-ui);
  text-align: start;
  cursor: pointer;
  position: relative;
  transition: background-color 180ms var(--fn-ease),
              border-color 180ms var(--fn-ease),
              color 180ms var(--fn-ease),
              box-shadow 180ms var(--fn-ease);
}

.fn-ui .fn-dd__trigger.has-value {
  background-color: var(--fn-brand-soft);
  border-color: var(--fn-green-100);
}

.fn-ui .fn-dd__label {
  display: none;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-block: var(--fn-ink-pad);
  margin-block: calc(var(--fn-ink-pad) * -1);
  color: var(--fn-text-3);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-medium);
  line-height: 1.2;
}

.fn-ui .fn-dd__trigger.has-value .fn-dd__label {
  display: block;
}

.fn-ui .fn-dd__trigger.has-value .fn-dd__label::after {
  content: "·";
  margin-inline-start: 4px;
  color: var(--fn-text-3);
}

.fn-ui .fn-dd__label[hidden] {
  display: none !important;
}

.fn-ui .fn-dd__value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-block: var(--fn-ink-pad);
  margin-block: calc(var(--fn-ink-pad) * -1);
  color: var(--fn-text-1);
  /* Same treatment as the quick-link rail: bold, full ink, token size. */
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-bold);
  line-height: 1.25;
}

.fn-ui .fn-dd__value.is-menu-title {
  /* The resting trigger shows the menu's own title — full ink, same as
     the quick-link rail, not the muted grey that read as pale. */
  color: var(--fn-text-1);
}

.fn-ui .fn-dd__value.is-selected {
  color: var(--fn-brand);
  font-weight: var(--fn-fw-bold);
}

:root[data-fn-theme="soft"] .fn-ui .fn-dd__value.is-selected {
  color: var(--fn-green-800);
}

.fn-ui .fn-dd__value.is-placeholder {
  /* The resting state is what most visitors see — full ink, not the
     muted placeholder grey that read as pale. */
  color: var(--fn-text-1);
  font-weight: var(--fn-fw-bold);
}

.fn-ui .fn-dd__chev {
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  width: 10px;
  height: 6px;
  margin-top: -3px;
  pointer-events: none;
  background-color: var(--fn-gray-400);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5L6 6.5 11 1.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5L6 6.5 11 1.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: transform 180ms var(--fn-ease),
              background-color 180ms var(--fn-ease);
}

.fn-ui .fn-dd__trigger:hover,
.fn-ui .fn-dd__trigger:focus {
  background-color: var(--fn-control-bg-hover);
  border-color: var(--fn-control-border-hover);
  outline: none;
}

.fn-ui .fn-dd__trigger:focus-visible {
  outline: var(--fn-focus-width) solid var(--fn-focus);
  outline-offset: 2px;
}

.fn-ui .fn-dd__trigger.has-value:hover,
.fn-ui .fn-dd__trigger.has-value:focus {
  background-color: var(--fn-green-100);
  border-color: var(--fn-green-200);
}

.fn-ui .fn-dd__trigger:hover .fn-dd__chev,
.fn-ui .fn-dd__trigger:focus .fn-dd__chev {
  background-color: var(--fn-text-2);
}

.fn-ui .fn-dd.is-open .fn-dd__trigger {
  background-color: var(--fn-brand-soft);
  border-color: var(--fn-accent);
  box-shadow: 0 0 0 3px rgba(103, 203, 53, 0.18);
}

.fn-ui .fn-dd.is-open .fn-dd__value,
.fn-ui .fn-dd.is-open .fn-dd__label {
  color: var(--fn-brand);
}

.fn-ui .fn-dd.is-open .fn-dd__chev {
  background-color: var(--fn-brand);
  transform: rotate(180deg);
}

:root[data-fn-theme="dark"] .fn-ui .fn-dd__trigger.has-value {
  background-color: var(--fn-brand-soft);
  border-color: var(--fn-border-brand);
}

/* text-3 is 4.34:1 on brand-soft in dark. The selected caption sits on that fill. */
:root[data-fn-theme="dark"] .fn-ui .fn-dd__trigger.has-value .fn-dd__label,
:root[data-fn-theme="dark"] .fn-ui .fn-dd__trigger.has-value .fn-dd__label::after {
  color: var(--fn-text-2);
}

/* green-100 is a light tint. On dark it would put light text on a light fill. */
:root[data-fn-theme="dark"] .fn-ui .fn-dd__trigger.has-value:hover,
:root[data-fn-theme="dark"] .fn-ui .fn-dd__trigger.has-value:focus {
  background-color: var(--fn-brand-surface-hover);
  border-color: var(--fn-border-brand);
}

.fn-ui .fn-dd__panel {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  inset-inline-end: auto;
  z-index: 1200;
  width: max-content;
  min-width: 100%;
  max-width: min(360px, 90vw);
  text-align: start;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
  box-shadow: var(--fn-shadow-pop);
}

.fn-ui .fn-dd__panel[hidden] {
  display: none !important;
}

.fn-ui .header-fund-filter.fn-dd:nth-last-child(-n+2) .fn-dd__panel {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.fn-ui .fn-dd__search-wrap {
  flex: 0 0 auto;
  padding: var(--fn-space-2);
  border-bottom: 1px solid var(--fn-border);
  background: var(--fn-bg-surface);
}

.fn-ui .fn-dd__search {
  width: 100%;
  height: 34px;
  padding: 0 var(--fn-space-3);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-sm);
  background: var(--fn-bg-sunken);
  color: var(--fn-text-1);
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-sm);
  box-shadow: none;
  transition: border-color 180ms var(--fn-ease),
              box-shadow 180ms var(--fn-ease);
}

.fn-ui .fn-dd__search:focus {
  border-color: var(--fn-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(103, 203, 53, 0.22);
  background: var(--fn-bg-surface);
}

/* Scrollbar side: the shared pane rule in 00-page.css. */
.fn-ui .fn-dd__list {
  list-style: none;
  margin: 0;
  padding: var(--fn-space-1) 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.fn-ui .fn-dd__option {
  display: block;
  padding: 8px var(--fn-space-3);
  color: var(--fn-text-1);
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-sm);
  line-height: 1.35;
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: start;
  transition: background-color 150ms var(--fn-ease);
}

/* Same weight ladder as the header variant below: l0 > l1 > l2. */
.fn-ui .fn-dd__option--l1 {
  padding-inline-start: var(--fn-space-5);
  color: var(--fn-text-1);
  font-weight: var(--fn-fw-medium);
}

.fn-ui .fn-dd__option--l2 {
  padding-inline-start: var(--fn-space-8);
  color: var(--fn-text-2);
  font-weight: var(--fn-fw-regular);
}

/* A menu that is only names has no parent to indent under. */
.fn-ui .fn-dd__list:not(:has(.fn-dd__option--l0)):not(:has(.fn-dd__option--l1)) .fn-dd__option--l2 {
  padding-inline-start: 12px;
  color: var(--fn-text-1);
  font-weight: 500;
}

.fn-ui .fn-dd__option--l0 {
  font-weight: var(--fn-fw-bold);
}

.fn-ui .fn-dd__option--head {
  cursor: default;
  color: var(--fn-text-3);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-medium);
  text-transform: none;
  letter-spacing: 0.01em;
  background: var(--fn-bg-sunken);
  pointer-events: none;
}

.fn-ui .fn-dd__option:not(.fn-dd__option--head):hover,
.fn-ui .fn-dd__option:not(.fn-dd__option--head):focus {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
  outline: none;
}

.fn-ui .fn-dd__option.is-active {
  background: color-mix(in srgb, var(--fn-brand) 18%, var(--fn-bg-raised));
  color: var(--fn-text-1);
  border-inline-start: 3px solid var(--fn-brand);
  padding-inline-start: calc(var(--fn-space-3) - 3px);
  font-weight: var(--fn-fw-bold);
}

.fn-ui .fn-dd__option--l1.is-active { padding-inline-start: calc(var(--fn-space-5) - 3px); }
.fn-ui .fn-dd__option--l2.is-active { padding-inline-start: calc(var(--fn-space-8) - 3px); }

.fn-ui .fn-dd__list:not(:has(.fn-dd__option--l0)):not(:has(.fn-dd__option--l1)) .fn-dd__option--l2.is-active {
  padding-inline-start: 9px;
  font-weight: var(--fn-fw-bold);
}

.fn-ui .fn-dd__empty {
  padding: var(--fn-space-4) var(--fn-space-3);
  color: var(--fn-text-3);
  font-size: var(--fn-fs-sm);
  text-align: center;
  list-style: none;
}

:root[data-fn-theme="dark"] .fn-ui .fn-dd__panel {
  background: var(--fn-bg-raised);
  border-color: var(--fn-border);
  box-shadow: var(--fn-shadow-pop);
}

:root[data-fn-theme="dark"] .fn-ui .fn-dd__search {
  background: var(--fn-bg-sunken);
  border-color: var(--fn-border);
  color: var(--fn-text-1);
}

/* Header menus — the same fn-dd as the homepage table filters, with the
   room and the hierarchy those panels already have. The header chip is
   narrow, so without this the open list reads as a short plain box. */
.fn-ui .header-fund-filter.fn-dd .fn-dd__panel {
  width: max(100%, 320px);
  min-width: 300px;
  max-width: min(400px, 92vw);
  max-height: min(480px, 70vh);
  border-radius: var(--fn-radius-card);
  border-color: var(--fn-border-strong);
  text-align: start;
  box-shadow: var(--fn-shadow-pop);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__search-wrap {
  padding: 10px;
  background: var(--fn-bg-surface);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__search {
  height: 38px;
  border-radius: var(--fn-radius-compact);
  border-color: var(--fn-border-strong);
  padding-inline-start: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b756e' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

.fn-ui .header-fund-filter.fn-dd.is-open .fn-dd__search,
.fn-ui .header-fund-filter.fn-dd .fn-dd__search:focus {
  border-color: var(--fn-accent);
  box-shadow: 0 0 0 3px rgba(103, 203, 53, 0.18);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__list {
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--fn-border-strong) transparent;
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__option {
  border-radius: var(--fn-radius-compact);
  margin: 1px 0;
  padding: 8px 12px;
  color: var(--fn-text-1);
  font-weight: 500;
  text-align: start;
}

/* A major branch (אג"ח, סחורות) opens a new group. */
.fn-ui .header-fund-filter.fn-dd .fn-dd__option--l0 {
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 700;
  color: var(--fn-text-1);
  box-shadow: inset 0 1px 0 var(--fn-border);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__option--l0:first-child {
  margin-top: 2px;
  box-shadow: none;
}

/* One weight step per level, so the hierarchy is readable at a glance:
   l0 = 700, l1 = 600, l2 = 500 muted. */
.fn-ui .header-fund-filter.fn-dd .fn-dd__option--l1 {
  padding-inline-start: 16px;
  font-weight: var(--fn-fw-medium);
  color: var(--fn-text-1);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__option--l2 {
  padding-inline-start: 32px;
  font-weight: 500;
  color: var(--fn-text-2);
}

/* A menu that is only names (מנהל קרן) has no parent to indent under. */
.fn-ui .header-fund-filter.fn-dd .fn-dd__list:not(:has(.fn-dd__option--l0)):not(:has(.fn-dd__option--l1)) .fn-dd__option--l2 {
  padding-inline-start: 12px;
  color: var(--fn-text-1);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__option:not(.fn-dd__option--head):hover,
.fn-ui .header-fund-filter.fn-dd .fn-dd__option:not(.fn-dd__option--head):focus {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__option.is-active {
  background: color-mix(in srgb, var(--fn-brand) 18%, var(--fn-bg-raised));
  color: var(--fn-text-1);
  border-inline-start: 3px solid var(--fn-brand);
  border-radius: var(--fn-radius-compact);
  font-weight: var(--fn-fw-bold);
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__option--l1.is-active {
  padding-inline-start: 13px;
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__option--l2.is-active {
  padding-inline-start: 29px;
}

.fn-ui .header-fund-filter.fn-dd .fn-dd__list:not(:has(.fn-dd__option--l0)):not(:has(.fn-dd__option--l1)) .fn-dd__option--l2.is-active {
  padding-inline-start: 9px;
}

:root[data-fn-theme="dark"] .fn-ui .header-fund-filter.fn-dd .fn-dd__panel,
:root[data-fn-theme="dark"] .fn-ui .header-fund-filter.fn-dd .fn-dd__search-wrap {
  background: var(--fn-bg-raised);
}

:root[data-fn-theme="dark"] .fn-ui .header-fund-filter.fn-dd .fn-dd__search {
  background-color: var(--fn-bg-sunken);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa89d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .fn-ui .fn-dd__trigger,
  .fn-ui .fn-dd__chev,
  .fn-ui .fn-dd__search,
  .fn-ui .fn-dd__option {
    transition: none;
  }
}


/* --------------------------- Mobile open button ------------------------- */

.fn-ui .fn-fund-filter-open {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-inline: 0;
  padding: 0;
  border: 0;
  border-radius: var(--fn-radius-sm);
  background: transparent;
  color: var(--fn-on-brand-muted);
  cursor: pointer;
}

.fn-ui .fn-fund-filter-open:hover,
.fn-ui .fn-fund-filter-open:focus {
  background: rgba(14, 20, 16, 0.10);
  color: var(--fn-on-brand-surface);
  outline: none;
}

:root[data-fn-theme="dark"] .fn-ui .fn-fund-filter-open {
  color: var(--fn-text-2);
}

:root[data-fn-theme="dark"] .fn-ui .fn-fund-filter-open:hover,
:root[data-fn-theme="dark"] .fn-ui .fn-fund-filter-open:focus {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
}

.fn-ui .fn-fund-filter-open__icon {
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6 7v5l-4 2v-7L4 5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6 7v5l-4 2v-7L4 5z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

@media (max-width: 767px) {
  .fn-ui .fn-fund-filter-open {
    display: inline-flex;
  }
}


/* ----------------------------- Bottom sheet ----------------------------- */

.fn-fund-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.fn-fund-sheet:not([hidden]) {
  pointer-events: auto;
}

.fn-fund-sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 12, 0.48);
  opacity: 0;
  transition: opacity var(--fn-dur-base) var(--fn-ease);
}

.fn-fund-sheet.is-in .fn-fund-sheet__scrim { opacity: 1; }

.fn-fund-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--fn-bg-surface);
  border-radius: var(--fn-radius-lg) var(--fn-radius-lg) 0 0;
  border: 1px solid var(--fn-border);
  border-bottom: 0;
  box-shadow: var(--fn-shadow-pop);
  transform: translateY(100%);
  transition: transform var(--fn-dur-base) var(--fn-ease);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  outline: none;
}

.fn-fund-sheet.is-in .fn-fund-sheet__panel {
  transform: translateY(0);
}

.fn-fund-sheet__head {
  display: flex;
  align-items: center;
  gap: var(--fn-space-2);
  flex: 0 0 auto;
  min-height: 52px;
  padding: var(--fn-space-2) var(--fn-space-3);
  border-bottom: 1px solid var(--fn-border);
}

.fn-fund-sheet__title {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-md);
  font-weight: var(--fn-fw-medium);
  color: var(--fn-text-1);
  line-height: 1.3;
  text-align: center;
}

.fn-fund-sheet__back,
.fn-fund-sheet__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--fn-radius-sm);
  background: var(--fn-bg-sunken);
  color: var(--fn-text-2);
  cursor: pointer;
}

.fn-fund-sheet__back[hidden] {
  display: none !important;
}

.fn-fund-sheet__back:hover,
.fn-fund-sheet__back:focus,
.fn-fund-sheet__close:hover,
.fn-fund-sheet__close:focus {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
  outline: none;
}

.fn-fund-sheet__back span {
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

[dir="rtl"] .fn-fund-sheet__back span {
  transform: scaleX(-1);
}

.fn-fund-sheet__close-icon {
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5L5 19'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5L5 19'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Scrollbar side: the shared pane rule in 00-page.css. */
.fn-fund-sheet__step {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.fn-fund-sheet__step[hidden] {
  display: none !important;
}

.fn-fund-sheet__step--types {
  display: flex;
  flex-direction: column;
  padding: var(--fn-space-2) 0 var(--fn-space-4);
}

.fn-fund-sheet__type {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: var(--fn-space-3) var(--fn-space-5);
  border: 0;
  border-bottom: 1px solid var(--fn-border);
  background: transparent;
  color: var(--fn-text-1);
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-md);
  font-weight: var(--fn-fw-medium);
  text-align: start;
  cursor: pointer;
}

.fn-fund-sheet__type:hover,
.fn-fund-sheet__type:focus {
  background: var(--fn-bg-hover);
  outline: none;
}

.fn-fund-sheet__type:active {
  background: var(--fn-bg-active);
}

.fn-fund-sheet__search-wrap {
  padding: var(--fn-space-3) var(--fn-space-4);
  border-bottom: 1px solid var(--fn-border);
  background: var(--fn-bg-surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

.fn-fund-sheet__search {
  width: 100%;
  height: 42px;
  padding: 0 var(--fn-space-4);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-pill);
  background: var(--fn-bg-sunken);
  color: var(--fn-text-1);
  font-family: var(--fn-font-ui);
  font-size: 16px;
  box-shadow: none;
}

.fn-fund-sheet__search:focus {
  border-color: var(--fn-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 203, 53, 0.28);
  background: var(--fn-bg-surface);
}

.fn-fund-sheet__list {
  list-style: none;
  margin: 0;
  padding: var(--fn-space-1) 0 var(--fn-space-4);
}

.fn-fund-sheet__option {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: var(--fn-space-3) var(--fn-space-5);
  color: var(--fn-text-1);
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-md);
  line-height: 1.35;
  cursor: pointer;
  border-bottom: 1px solid var(--fn-border);
}

.fn-fund-sheet__option--l0 { font-weight: var(--fn-fw-medium); }
.fn-fund-sheet__option--l1 {
  padding-inline-start: var(--fn-space-8);
  color: var(--fn-text-2);
  font-size: var(--fn-fs-base);
}
.fn-fund-sheet__option--l2 {
  padding-inline-start: calc(var(--fn-space-8) + var(--fn-space-4));
  color: var(--fn-text-2);
  font-size: var(--fn-fs-base);
}

.fn-fund-sheet__option--head {
  cursor: default;
  pointer-events: none;
  background: var(--fn-bg-sunken);
  color: var(--fn-text-3);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-medium);
  min-height: 36px;
}

.fn-fund-sheet__option:not(.fn-fund-sheet__option--head):active {
  background: var(--fn-bg-active);
}

.fn-fund-sheet__empty {
  margin: 0;
  padding: var(--fn-space-8) var(--fn-space-4);
  text-align: center;
  color: var(--fn-text-3);
  font-size: var(--fn-fs-sm);
}

body.fn-fund-sheet-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  .fn-ui .fn-fund-filter-open { display: none !important; }
  .fn-fund-sheet { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .fn-fund-sheet__scrim,
  .fn-fund-sheet__panel {
    transition: none;
  }
}
