/* 图集 filters (templates/partials/gallery_filters.html): the order pills keep the page's own .radio-inputs look; the
   time and author choices sit in one row under them. */
.gallery-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: -2%;
    padding: 14px 10px 10px;
    background-color: whitesmoke;
}

/* The order pills: three equal columns as wide as the longest label (at least the page's 300px), each label on one
   line. The page made the group a fixed 300px and the theme's `label` rule upper-cases and spaces the labels out, so
   translated labels (Indonesian "Jelajah Acak", Vietnamese "Duyệt ngẫu nhiên", Thai) broke onto two lines in capitals. */
.gallery-filters .radio-inputs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    width: auto;
    min-width: 300px;
    max-width: 100%;
}
.gallery-filters .radio-inputs .radio .name {
    padding: 0.5rem 14px;
    white-space: nowrap;
}
.gallery-filters .radio-inputs .radio {
    text-transform: none;
}
/* The Chinese and English pages keep the theme's 11px with 2px spacing. Other languages read better a size up and
   without the wide spacing (it pulls Thai marks away from their letters): 12px, next to the 13px filters below. */
:root:not(:lang(zh)):not(:lang(en)) .gallery-filters .radio-inputs .radio {
    font-size: 12px;
}
:root:not(:lang(zh)):not(:lang(en)):not(:lang(th)) .gallery-filters .radio-inputs .radio {
    letter-spacing: 0.3px;
}
:root:lang(th) .gallery-filters .radio-inputs .radio {
    letter-spacing: normal;
}

/* The order radios stay focusable (the theme hid them with display: none, out of reach of the keyboard). */
.gallery-filters .radio-inputs .radio {
    position: relative;
}
.gallery-filters .radio-inputs .radio input {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.gallery-filters .radio-inputs .radio input:focus-visible + .name {
    outline: 2px solid #4ab7cc;
    outline-offset: 1px;
}

.gallery-filter-box {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 10px 14px;
    max-width: 900px;
    padding: 10px 14px;
    border-radius: 0.5rem;
    background-color: #EEEEEE;
}
.gallery-filters .gallery-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: auto;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(51, 65, 85, 1);
}
.gallery-filters select,
.gallery-filters input[type="date"] {
    height: 34px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-size: 13px;
    color: #333;
}
.gallery-filters #gallery_time {
    min-width: 150px;
}
.gallery-filters #gallery_author {
    min-width: 220px;
    max-width: 320px;
}
.gallery-filter-range {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}
.gallery-filter-range[hidden] {
    display: none;
}
.gallery-filters .gallery-filter-reset {
    height: 34px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: rgba(51, 65, 85, 1);
    cursor: pointer;
}
.gallery-filters .gallery-filter-reset:hover {
    border-color: #4ab7cc;
    color: #2a8fa3;
}
.gallery-filter-count p {
    margin: 0;
    font-size: 14px;
    color: #555;
}
