/* My Epiphany - long index lists: search, category chips, collapsible groups, back to top (2026-11-18)
   Shared by the Reference, Resource and Citation indexes. Works with js/index-list.js. */

.ix-bar { text-align: left; margin: 10px 0 8px; }   /* space above the search box (2026-11-18) */
.ix-bar *, .ix-group * { box-sizing: border-box; }

/* Search box */
.ix-search { position: relative; max-width: 640px; margin: 0 auto; }   /* centred on the page (2026-11-18) */
.ix-search input[type=search] {
    width: 100%; height: 46px; padding: 0 44px 0 42px;
    border: 1.5px solid #B9C5D8; border-radius: 10px; background: #fff;
    font: 16px 'Open Sans', system-ui, sans-serif; color: #0F1B2D;
    -webkit-appearance: none; appearance: none;
}
.ix-search input[type=search]::-webkit-search-cancel-button { display: none; }
.ix-search input[type=search]:focus { outline: 3px solid rgba(0,158,227,.35); border-color: #009EE3; }
.ix-search .ix-search__icon { position: absolute; left: 13px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
    fill: none; stroke: #5A6A82; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.ix-search .ix-clear { position: absolute; right: 6px; top: 50%; width: 34px; height: 34px; margin-top: -17px;
    border: 0; border-radius: 8px; background: transparent; color: #5A6A82; font-size: 22px; line-height: 1; cursor: pointer; }
.ix-search .ix-clear:hover { background: #F4F6FA; color: #0F1B2D; }
.ix-search .ix-clear[hidden] { display: none; }

/* Category chips */
.ix-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }   /* 12px + 12px more space below the search box (2026-11-18) */
.ix-chip {
    font: 400 14px/1.2 'Open Sans', system-ui, sans-serif; padding: 6px 12px; border-radius: 999px;
    border: 1px solid #DCE3EE; background: #fff; color: #42526B; cursor: pointer;
}
.ix-chip:hover { border-color: #009EE3; color: #006FA6; }
.ix-chip[aria-pressed="true"] { background: #009EE3; border-color: #009EE3; color: #fff; }
.ix-chip em { font-style: normal; opacity: .75; margin-left: 4px; }
.ix-chip.is-empty { opacity: .45; }

/* Second row: sort, minimum rating, expand/collapse, count */
.ix-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 12px 0 0; padding: 0 0 12px;
    border-bottom: 1px solid #DCE3EE; font-size: 14px; color: #555; }
.ix-row label { margin: 0; font-weight: 600; }
.ix-row select { margin-left: 6px; padding: 3px 6px; border: 1px solid #ccd5dd; border-radius: 6px; background: #fff; color: #333; font-weight: 400; }
.ix-row .ix-toggle { border: 0; background: none; padding: 0; color: #009EE3; font: 600 14px 'Open Sans', system-ui, sans-serif; cursor: pointer; }
.ix-row .ix-toggle:hover { color: #006FA6; }
.ix-row .ix-shown { color: #888; font-size: 13px; margin-left: auto; }

/* Category groups */
details.ix-group { text-align: left; margin: 10px 0 0; }
details.ix-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 0 6px; user-select: none; }
details.ix-group > summary::-webkit-details-marker { display: none; }
details.ix-group > summary::before {
    content: ""; flex: none; width: 8px; height: 8px; margin: 0 2px;
    border-right: 2px solid #5A6A82; border-bottom: 2px solid #5A6A82; transform: rotate(-45deg); transition: transform .15s;
}
details.ix-group[open] > summary::before { transform: rotate(45deg); }
details.ix-group > summary h3 { margin: 0 !important; }
.ix-count { font-size: 13px; font-weight: 600; color: #5A6A82; background: #F4F6FA; border: 1px solid #DCE3EE; border-radius: 999px; padding: 1px 9px; }
.ix-group[hidden], .ix-item[hidden], .ix-none[hidden] { display: none !important; }
.ix-list { margin: 2px 0 6px 18px; }
.ix-none { text-align: left; margin: 18px 0; padding: 20px; border: 1px dashed #cfd8dc; border-radius: 12px; color: #555; }

/* One list for every screen: long names are trimmed with "…" on phones instead of a second, shortened copy */
.ix-item { text-align: left; }
@media (max-width: 767px) {
    .ix-item { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
    .ix-item > a { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; flex: 0 1 auto; }
    .ix-item .ix-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    .ix-item .ref-type-tag { display: none; }
    .ix-item .ref-rating { flex: none; }
    .ix-list { margin-left: 6px; }
    .ix-row .ix-shown { margin-left: 0; flex-basis: 100%; }
}

/* Back to top (bottom left: the chat bubble is bottom right) */
.ix-top {
    position: fixed; left: 16px; bottom: 16px; z-index: 900;
    display: inline-flex; align-items: center; gap: 6px; padding: 2.3px 9.2px 2.3px 4.6px;
    border: 1.33px solid #009EE3; border-radius: 9px; background: #009EE3; color: #fff;
    font: 600 14px/1.2 'Open Sans', system-ui, sans-serif; text-decoration: none; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,40,70,.18); opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity .15s, transform .15s;
}
.ix-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ix-top:hover, .ix-top:focus-visible { background: #006FA6; border-color: #006FA6; color: #fff; }
.ix-top svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .ix-top, details.ix-group > summary::before { transition: none; } }

/* Page CSS gives every span in a .link-list 12px grey (meant for the rating label); keep the link's name at full size */
.ix-list li a .ix-name { font-size: inherit; color: inherit; margin-left: 0; }

/* Paging (2026-11-18): Start | Previous | 1 2 3 | Next | End, as on the Glossary */
.ix-pager { text-align: left; margin: 18px 0 4px; font-size: 15px; color: #777; }
.ix-pager a { color: #009EE3; }
.ix-pager a:hover { color: #006FA6; }
.ix-pager .ix-page-current { color: #A70505; font-weight: 600; }
.ix-pager[hidden] { display: none; }
