/* GHPHouse v2.13.0 profile Gallery viewer and dynamic empty states. */
body.profile-gallery-viewer-open {
    overflow: hidden !important;
}

.profile-videos-grid > .profile-content-empty {
    grid-column: 1 / -1;
    width: 100%;
    box-sizing: border-box;
}

.profile-gallery-item::after {
    content: "\f00e";
    position: absolute;
    top: 11px;
    right: 11px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 11px;
    color: #fff;
    background: rgba(8, 7, 11, .72);
    font-family: "Font Awesome 6 Free";
    font-size: 13px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity .2s ease, transform .2s ease;
}

.profile-gallery-item:hover::after,
.profile-gallery-item:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.profile-gallery-viewer[hidden] {
    display: none !important;
}

.profile-gallery-viewer {
    position: fixed;
    inset: 0;
    z-index: 13050;
    display: grid;
    place-items: center;
    padding: 22px;
    isolation: isolate;
}

.profile-gallery-viewer__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(3, 3, 6, .88);
    backdrop-filter: blur(12px);
    cursor: zoom-out;
}

.profile-gallery-viewer__dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: calc(100dvh - 44px);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid rgba(255, 69, 107, .27);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(219, 14, 66, .13), transparent 32rem),
        linear-gradient(145deg, #171218, #090a0f 66%);
    box-shadow: 0 34px 100px rgba(0, 0, 0, .78);
    color: #fff;
    animation: profileGalleryIn .2s ease both;
}

.profile-gallery-viewer__header {
    min-height: 72px;
    padding: 13px 16px 13px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.profile-gallery-viewer__header > div:first-child {
    min-width: 0;
}

.profile-gallery-viewer__header > div:first-child > span {
    color: #ff7898;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.profile-gallery-viewer__header h2 {
    margin: 4px 0 0;
    overflow: hidden;
    color: #fff;
    font-size: clamp(16px, 2vw, 21px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-gallery-viewer__header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-gallery-viewer__counter {
    min-width: 58px;
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.profile-gallery-viewer__header-actions button,
.profile-gallery-viewer__nav {
    border: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
    background: rgba(255, 255, 255, .055);
    cursor: pointer;
}

.profile-gallery-viewer__header-actions button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.profile-gallery-viewer__header-actions button:hover,
.profile-gallery-viewer__nav:hover {
    border-color: rgba(255, 82, 119, .45);
    background: rgba(255, 45, 85, .16);
}

.profile-gallery-viewer__stage {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) 62px;
    align-items: center;
    gap: 10px;
    padding: 18px;
    background:
        linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .1)),
        repeating-conic-gradient(from 45deg, #101015 0 25%, #0b0b10 0 50%) 0 / 26px 26px;
    touch-action: pan-y;
    user-select: none;
}

.profile-gallery-viewer__stage figure {
    position: relative;
    min-width: 0;
    height: min(65dvh, 720px);
    margin: 0;
    display: grid;
    place-items: center;
}

.profile-gallery-viewer__stage img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 18px 54px rgba(0, 0, 0, .55);
}

.profile-gallery-viewer__stage img[hidden] {
    display: none !important;
}

.profile-gallery-viewer__nav {
    width: 48px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    font-size: 16px;
}

.profile-gallery-viewer__loading {
    display: grid;
    place-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, .6);
    font-size: 11px;
}

.profile-gallery-viewer__loading i {
    color: #ff5d80;
    font-size: 24px;
}

.profile-gallery-viewer.is-ready .profile-gallery-viewer__loading {
    display: none;
}

.profile-gallery-viewer.is-error .profile-gallery-viewer__loading i {
    animation: none;
}

.profile-gallery-viewer__footer {
    min-height: 82px;
    padding: 11px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.profile-gallery-viewer__thumbs {
    min-width: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    -webkit-overflow-scrolling: touch;
}

.profile-gallery-viewer__thumbs button {
    flex: 0 0 64px;
    width: 64px;
    height: 50px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #18141a;
    cursor: pointer;
    opacity: .62;
}

.profile-gallery-viewer__thumbs button:hover,
.profile-gallery-viewer__thumbs button[aria-current="true"] {
    border-color: #ef174d;
    opacity: 1;
}

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

.profile-gallery-viewer__footer > a {
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #b80b38, #ef174d);
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
}

@keyframes profileGalleryIn {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
    .profile-gallery-viewer {
        padding: 0;
    }

    .profile-gallery-viewer__dialog {
        width: 100%;
        height: 100dvh;
        max-height: none;
        border-width: 0;
        border-radius: 0;
    }

    .profile-gallery-viewer__header {
        min-height: 66px;
        padding: calc(9px + env(safe-area-inset-top)) 10px 9px 14px;
    }

    .profile-gallery-viewer__stage {
        min-height: 0;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 3px;
        padding: 8px 4px;
    }

    .profile-gallery-viewer__stage figure {
        height: auto;
        min-height: 0;
    }

    .profile-gallery-viewer__nav {
        width: 40px;
        height: 48px;
        border-radius: 13px;
    }

    .profile-gallery-viewer__footer {
        padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    }

    .profile-gallery-viewer__thumbs button {
        flex-basis: 56px;
        width: 56px;
        height: 44px;
    }
}

@media (max-width: 430px) {
    .profile-gallery-viewer__header h2 {
        max-width: 165px;
        font-size: 15px;
    }

    .profile-gallery-viewer__counter {
        min-width: 42px;
    }

    .profile-gallery-viewer__footer {
        grid-template-columns: 1fr;
    }

    .profile-gallery-viewer__footer > a {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-gallery-viewer__dialog,
    .profile-gallery-item::after {
        animation: none;
        transition: none;
    }
}
