/* File Type picker on EFileViewer (js/filetype-picker.js). Colors from pipeline.css: navy text and borders,
   the search panel's sand for the group headings. */
.ftp { display: inline-block; max-width: 100%; }
.ftp-input {
    box-sizing: border-box;
    min-width: 12rem;
    max-width: 100%;
    padding-right: 1.3rem !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23005288' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.4rem center / 0.6rem auto !important;
    cursor: pointer;
    text-overflow: ellipsis;
}
.ftp-input:focus { cursor: text; }
.ftp-input::placeholder { color: #000; opacity: 1; }
.ftp-open .ftp-input { border-color: var(--wvges-navy-dark); }

.ftp-popup {
    position: fixed;
    z-index: 1000;
    box-sizing: border-box;
    width: max-content;
    max-width: min(26rem, calc(100vw - 1rem));
    font-size: var(--body-size);
    background: #fff;
    border: 1px solid var(--wvges-navy);
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 40, 70, 0.28);
    overflow: hidden;
}
.ftp-popup [hidden] { display: none !important; }
.ftp-popup[hidden] { display: none !important; }
.ftp-hint,
.ftp-empty {
    padding: 0.25rem 0.6rem;
    color: #595959;
    font-style: italic;
    font-size: 0.75rem;
}
.ftp-hint { border-bottom: 1px solid #e2e2e2; }
.ftp-list {
    max-height: 24rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 0.2rem;
}

/* Group headings stay at the top of the list while their file types scroll under them. */
.ftp-heading {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.15rem 0.6rem;
    background: var(--panel-bg);
    color: var(--wvges-navy);
    border-top: 1px solid #dccbab;
    border-bottom: 1px solid #dccbab;
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: default;
}
.ftp-count {
    min-width: 1.1rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #fff;
    color: #5b4630;
    font-weight: normal;
    letter-spacing: 0;
    text-align: center;
}

.ftp-option {
    position: relative;
    padding: 0.1rem 0.9rem 0.1rem 1.55rem;
    line-height: 1.4;
    cursor: pointer;
    scroll-margin-top: 1.6rem;
}
.ftp-all { font-style: italic; border-bottom: 1px solid #e2e2e2; }
.ftp-option[aria-selected="true"] { font-weight: bold; }
.ftp-option[aria-selected="true"]::before {
    content: "\2713";
    position: absolute;
    left: 0.5rem;
    color: var(--wvges-navy);
}
.ftp-option.ftp-active { background: var(--wvges-navy); color: #fff; }
.ftp-option.ftp-active::before { color: #fff; }
.ftp-option mark { padding: 0; background: #ffe58f; color: #000; border-radius: 2px; }
.ftp-code {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    font-family: Consolas, "Courier New", monospace;
    color: #595959;
}
.ftp-option.ftp-active .ftp-code { color: #fff; }

@media (forced-colors: active) {
    .ftp-option.ftp-active { outline: 2px solid Highlight; outline-offset: -2px; }
    .ftp-heading { border-color: CanvasText; }
}
