/* OG User Gallery styles */

/* The gallery toggle no longer uses its own absolute wrapper. It will be appended
 * into the shared .ogx-profile-hero-tab-dock container defined in the expanded
 * profiles stylesheet. Hide the old wrapper to prevent layout artefacts.
 */
.ogx-gallery-toggle-wrap{
    display:none;
}

.ogx-gallery-toggle{
    pointer-events:auto;
    position:relative;
    appearance:none;
    border:1px solid rgba(126,208,255,0.24);
    border-top-color:rgba(126,208,255,0.14);
    background:linear-gradient(180deg, rgba(11,17,27,0.88) 0%, rgba(9,14,22,0.96) 58%, rgba(7,11,18,0.99) 100%);
    color:#eef8ff;
    border-radius:999px;
    min-height:30px;
    padding:5px 13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    font-weight:800;
    font-size:11px;
    line-height:1;
    letter-spacing:.01em;
    box-shadow:0 10px 20px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.04);
    cursor:pointer;
    white-space:nowrap;
    transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

/* Remove decorative pseudo elements on the gallery toggle. Without them the button
 * appears as a clean pill that can sit next to the profile button without
 * visual interference.
 */
.ogx-gallery-toggle::before,
.ogx-gallery-toggle::after{
    display:none;
}

.ogx-gallery-toggle:hover,
.ogx-gallery-toggle:focus-visible{
    transform:translateY(-1px);
    border-color:rgba(126, 208, 255, 0.40);
    box-shadow:0 12px 22px rgba(0,0,0,.24), 0 0 0 1px rgba(94,192,255,.08) inset;
    outline:none;
}

.ogx-gallery-toggle .dashicons{
    width:14px;
    height:14px;
    font-size:14px;
    line-height:14px;
}

.ogx-gallery-toggle-caret{
    transition:transform .18s ease;
}
.khdb-profile-hero.ogx-gallery-open .ogx-gallery-toggle-caret{
    transform:rotate(180deg);
}

/* Gallery panel */
.ogx-gallery-panel{
    display:none;
    margin:34px 0 18px;
    border-radius:22px;
    border:1px solid rgba(255,255,255,.08);
    background:linear-gradient(180deg, rgba(14,20,29,0.98) 0%, rgba(8,12,18,0.98) 100%);
    box-shadow:0 18px 48px rgba(0,0,0,.22);
    overflow:hidden;
}
.ogx-gallery-panel.is-open{
    display:block;
}

.ogx-gallery-shell{
    padding:18px;
}
.ogx-gallery-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(120px, 1fr));
    gap:14px;
}
.ogx-gallery-item,
.ogx-gallery-upload{
    position:relative;
    border-radius:18px;
    overflow:hidden;
    background:rgba(255,255,255,.03);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:120px;
}

/* Remove icon on gallery items */
.ogx-gallery-remove{
    position:absolute;
    top:6px;
    right:6px;
    width:20px;
    height:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(0,0,0,0.6);
    color:#ff7a7a;
    font-size:16px;
    cursor:pointer;
    z-index:2;
}

.ogx-gallery-upload{
    border:2px dashed rgba(94,192,255,.35);
    background:rgba(255,255,255,.04);
    color:#8bcfff;
    font-size:32px;
    font-weight:700;
    transition:background .18s ease, border-color .18s ease;
}
.ogx-gallery-upload:hover{
    background:rgba(255,255,255,.08);
    border-color:rgba(94,192,255,.6);
}

.ogx-gallery-item img,
.ogx-gallery-item video{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* Lightbox modal */
.ogx-gallery-modal{
    position:fixed;
    inset:0;
    z-index:2147483000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(0,0,0,0.75);
}
.ogx-gallery-modal.is-open{
    display:flex;
}

.ogx-gallery-modal,
.ogx-gallery-modal .ogx-gallery-modal-content,
.ogx-gallery-modal .ogx-gallery-modal-close{
    isolation:isolate;
}
.ogx-gallery-modal .ogx-gallery-modal-content{
    z-index:2;
}
.ogx-gallery-modal .ogx-gallery-modal-close{
    z-index:3;
}

.ogx-gallery-modal .ogx-gallery-modal-content{
    position:relative;
    width:min(1100px, 92vw);
    max-width:1100px;
    max-height:88vh;
    padding:16px;
    overflow:hidden;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(14,20,29,0.98) 0%, rgba(8,12,18,0.98) 100%);
    border:1px solid rgba(255,255,255,.08);
    box-shadow:0 18px 48px rgba(0,0,0,.32);
}
.ogx-gallery-modal .ogx-gallery-modal-content img,
.ogx-gallery-modal .ogx-gallery-modal-content video{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    max-height:calc(88vh - 32px);
    object-fit:contain;
    margin:0 auto;
}
.ogx-gallery-modal .ogx-gallery-modal-close{
    position:absolute;
    top:8px;
    right:8px;
    width:24px;
    height:24px;
    background:rgba(0,0,0,0.6);
    color:#ffffff;
    border-radius:50%;
    font-size:16px;
    line-height:24px;
    text-align:center;
    cursor:pointer;
}


.ogx-gallery-controls{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:12px;
    margin-bottom:14px;
}

.ogx-gallery-privacy-control{
    position:relative;
    display:inline-flex;
    max-width:100%;
}

.ogx-gallery-privacy-pill{
    appearance:none;
    border:1px solid rgba(126,208,255,0.24);
    border-top-color:rgba(126,208,255,0.14);
    background:linear-gradient(180deg, rgba(11,17,27,0.88) 0%, rgba(9,14,22,0.96) 58%, rgba(7,11,18,0.99) 100%);
    color:#eef8ff;
    border-radius:999px;
    min-height:32px;
    max-width:100%;
    padding:5px 10px;
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-weight:800;
    font-size:11px;
    line-height:1;
    letter-spacing:.01em;
    white-space:nowrap;
    box-shadow:0 10px 20px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.04);
    cursor:pointer;
    transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ogx-gallery-privacy-pill:hover,
.ogx-gallery-privacy-pill:focus-visible{
    transform:translateY(-1px);
    border-color:rgba(126, 208, 255, 0.40);
    box-shadow:0 12px 22px rgba(0,0,0,.24), 0 0 0 1px rgba(94,192,255,.08) inset;
    outline:none;
}

.ogx-gallery-privacy-pill .dashicons,
.ogx-gallery-privacy-option .dashicons{
    width:14px;
    height:14px;
    font-size:14px;
    line-height:14px;
}

.ogx-gallery-privacy-pill-caret{
    transition:transform .18s ease;
}

.ogx-gallery-privacy-control.is-open .ogx-gallery-privacy-pill-caret{
    transform:rotate(180deg);
}

.ogx-gallery-privacy-menu{
    position:absolute;
    top:calc(100% + 6px);
    right:0;
    left:auto;
    width:146px;
    max-width:min(146px, calc(100vw - 24px));
    padding:6px;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.08);
    background:linear-gradient(180deg, rgba(14,20,29,0.98) 0%, rgba(8,12,18,0.98) 100%);
    box-shadow:0 18px 48px rgba(0,0,0,.28);
    display:flex;
    flex-direction:column;
    gap:5px;
    z-index:30;
}

.ogx-gallery-privacy-option{
    appearance:none;
    width:100%;
    border:1px solid rgba(255,255,255,.06);
    background:rgba(255,255,255,.03);
    color:#eef8ff;
    border-radius:11px;
    min-height:34px;
    padding:7px 9px;
    display:flex;
    align-items:center;
    gap:7px;
    text-align:left;
    font-weight:700;
    font-size:11px;
    cursor:pointer;
    transition:background .18s ease, border-color .18s ease, transform .18s ease;
}

.ogx-gallery-privacy-option:hover,
.ogx-gallery-privacy-option:focus-visible{
    background:rgba(255,255,255,.06);
    border-color:rgba(94,192,255,.22);
    outline:none;
}

.ogx-gallery-privacy-option.is-active{
    border-color:rgba(94,192,255,.35);
    box-shadow:0 0 0 1px rgba(94,192,255,.12) inset;
    background:rgba(94,192,255,.08);
}

@media (max-width:782px){
    .ogx-gallery-toggle{
        min-height:28px;
        padding:5px 11px;
        font-size:10px;
        gap:6px;
    }
    .ogx-gallery-toggle-wrap{
        bottom:-16px;
    }
    .ogx-gallery-toggle::before{
        top:-9px;
        height:16px;
        width:74%;
    }
    .ogx-gallery-toggle::after{
        width:58%;
    }
    .ogx-gallery-panel{
        margin-top:30px;
    }
    .ogx-gallery-controls{
        margin-bottom:12px;
    }
    .ogx-gallery-privacy-pill{
        min-height:30px;
        padding:5px 9px;
        font-size:10px;
        gap:6px;
    }
    .ogx-gallery-privacy-menu{
        width:138px;
        max-width:calc(100vw - 20px);
    }
    .ogx-gallery-grid{
        grid-template-columns:repeat(auto-fill, minmax(90px,1fr));
    }
}

.ogx-gallery-private,
.ogx-gallery-empty{
    grid-column:1/-1;
    padding:18px;
    border-radius:16px;
    background:rgba(255,255,255,.03);
    color:#d7e9f9;
    text-align:center;
}

.ogx-gallery-upload{
    flex-direction:column;
    gap:6px;
}
.ogx-gallery-upload-plus{
    font-size:34px;
    line-height:1;
}
.ogx-gallery-upload-label{
    font-size:12px;
    font-weight:700;
    letter-spacing:.02em;
}

.ogx-gallery-upload-overlay{
    position:absolute;
    inset:0;
    z-index:2147483600;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
    background:rgba(0,0,0,0.55);
}
body > .ogx-gallery-upload-overlay{
    position:fixed;
}
.ogx-gallery-upload-overlay.is-open{
    display:flex;
}
.ogx-gallery-upload-box{
    width:min(320px, 92vw);
    border-radius:20px;
    padding:20px 18px;
    text-align:center;
    background:linear-gradient(180deg, rgba(14,20,29,0.98) 0%, rgba(8,12,18,0.98) 100%);
    border:1px solid rgba(255,255,255,.08);
    box-shadow:0 18px 48px rgba(0,0,0,.32);
    color:#eef8ff;
}
.ogx-gallery-upload-spinner{
    width:44px;
    height:44px;
    margin:0 auto 12px;
    border-radius:50%;
    border:3px solid rgba(139,207,255,.20);
    border-top-color:#8bcfff;
    animation:ogxGallerySpin .8s linear infinite;
}
.ogx-gallery-upload-title{
    font-size:18px;
    font-weight:800;
    margin-bottom:4px;
}
.ogx-gallery-upload-subtitle{
    font-size:12px;
    line-height:1.45;
    color:rgba(238,248,255,.76);
    margin-bottom:14px;
}
.ogx-gallery-upload-progress{
    width:100%;
    height:10px;
    overflow:hidden;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    box-shadow:inset 0 1px 2px rgba(0,0,0,.24);
}
.ogx-gallery-upload-progress-bar{
    width:0;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg, rgba(74,164,255,0.96) 0%, rgba(123,214,255,0.96) 100%);
    transition:width .15s ease;
}
.ogx-gallery-upload-percent{
    margin-top:10px;
    font-size:18px;
    font-weight:800;
    color:#8bcfff;
}

@keyframes ogxGallerySpin{
    to{ transform:rotate(360deg); }
}


.ogx-gallery-modal .ogx-gallery-modal-nav,
.ogx-gallery-modal .ogx-gallery-modal-counter{
    position:absolute;
    z-index:4;
}
.ogx-gallery-modal .ogx-gallery-modal-nav{
    top:50%;
    transform:translateY(-50%);
    width:42px;
    height:42px;
    border:0;
    border-radius:999px;
    background:rgba(0,0,0,0.56);
    color:#fff;
    font-size:26px;
    line-height:42px;
    text-align:center;
    cursor:pointer;
}
.ogx-gallery-modal .ogx-gallery-modal-prev{ left:16px; }
.ogx-gallery-modal .ogx-gallery-modal-next{ right:16px; }
.ogx-gallery-modal .ogx-gallery-modal-counter{
    left:50%;
    bottom:10px;
    transform:translateX(-50%);
    padding:6px 12px;
    border-radius:999px;
    background:rgba(0,0,0,0.52);
    color:#eef8ff;
    font-size:12px;
    font-weight:700;
    letter-spacing:.02em;
}
@media (max-width:782px){
    .ogx-gallery-modal{ padding:12px; }
    .ogx-gallery-modal .ogx-gallery-modal-content{
        width:min(96vw, 96vw);
        max-height:92vh;
        padding:12px;
    }
    .ogx-gallery-modal .ogx-gallery-modal-content img,
    .ogx-gallery-modal .ogx-gallery-modal-content video{
        max-height:calc(92vh - 24px);
    }
    .ogx-gallery-modal .ogx-gallery-modal-nav{
        width:38px;
        height:38px;
        line-height:38px;
        font-size:24px;
    }
    .ogx-gallery-modal .ogx-gallery-modal-prev{ left:8px; }
    .ogx-gallery-modal .ogx-gallery-modal-next{ right:8px; }
    .ogx-gallery-modal .ogx-gallery-modal-counter{
        bottom:8px;
        font-size:11px;
        padding:5px 10px;
    }
}


.ogx-gallery-controls{
    display:flex;
    justify-content:flex-end;
    margin:0 0 12px;
}
.ogx-gallery-privacy-control{
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    background:rgba(5,12,25,.45);
}
.ogx-gallery-privacy-label{
    font-size:12px;
    font-weight:600;
    opacity:.9;
}
.ogx-gallery-privacy-select{
    min-width:130px;
    padding:6px 28px 6px 10px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(0,0,0,.35);
    color:#fff;
}
@media (max-width: 767px){
    .ogx-gallery-controls{
        justify-content:stretch;
    }
    .ogx-gallery-privacy-control{
        width:100%;
        justify-content:space-between;
    }
    .ogx-gallery-privacy-select{
        min-width:0;
        max-width:160px;
        width:100%;
    }
}


.ogx-gallery-privacy-menu[hidden]{
    display:none !important;
}


.ogx-gallery-privacy-control[hidden]{
    display:none !important;
}
