/*
 * YourBus Korea - Gallery enhancements
 * Load after private-gallery.css
 */

.pv-gallery-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.pv-gallery-search-wrap {
    position: relative;
    width: 100%;
}

.pv-gallery-search-wrap input {
    width: 100%;
    padding-right: 46px;
}

.pv-gallery-search-clear {
    display: none;
    position: absolute;
    top: 50%;
    right: 10px;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 25px;
    line-height: 34px;
    cursor: pointer;
    transform: translateY(-50%);
}

.pv-gallery-search-clear:hover,
.pv-gallery-search-clear:focus-visible {
    background: rgba(0, 0, 0, .08);
}

.pv-gallery-filters {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding: 3px 2px 8px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.pv-gallery-filter {
    flex: 0 0 auto;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pv-gallery-filter.is-active {
    border-bottom: 3px solid currentColor;
    font-weight: 700;
    transform: translateY(-1px);
}

.pv-gallery-filter:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.pv-gallery-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .09);
    font-size: 11px;
    line-height: 1;
}

.pv-gallery-card a {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.pv-gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pv-gallery-card a:focus-visible {
    outline: 4px solid currentColor;
    outline-offset: 4px;
}

.pv-gallery-card a:hover .pv-gallery-overlay,
.pv-gallery-card a:focus .pv-gallery-overlay,
.pv-gallery-card a:focus-visible .pv-gallery-overlay,
.pv-gallery-card:focus-within .pv-gallery-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pv-gallery-overlay {
    transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}

.pv-gallery-capacity-note {
    display: block;
    margin: 7px 0 10px;
    font-size: 12px;
    line-height: 1.45;
    opacity: .88;
}

@media (prefers-reduced-motion: reduce) {
    .pv-gallery-filter,
    .pv-gallery-overlay {
        transition: none;
    }
}
