.sego-gallery-lightbox {
    --panel-width: 468px;
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: none;
    box-sizing: border-box;
    padding: 52px 0 0;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    opacity: 0;
    transition: opacity 140ms ease-out;
    touch-action: none;
}

.sego-gallery-lightbox.is-open {
    display: block;
}

.sego-gallery-lightbox.is-visible {
    opacity: 1;
}

.sego-gallery-lightbox:focus {
    outline: none;
}

.sego-gallery-lightbox__content {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.sego-gallery-lightbox__stage {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 18px 70px 48px;
    box-sizing: border-box;
}

.sego-gallery-lightbox__image {
    display: block;
    width: 80%;
    height: 80%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 140ms ease-out;
    box-shadow: 0 2px 22px rgba(0, 0, 0, 0.65);
    cursor: pointer;
}

.sego-gallery-lightbox__image.is-loaded {
    opacity: 1;
}

.sego-gallery-lightbox__panel {
    display: none;
    flex: 0 1 min(var(--panel-width), 45vw);
    width: min(var(--panel-width), 45vw);
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 22px 20px 28px;
    background: rgba(24, 24, 24, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.sego-gallery-lightbox.has-panel .sego-gallery-lightbox__panel {
    display: block;
}

.sego-gallery-lightbox__panel-content {
    max-width: 100%;
    color: rgba(255, 255, 255, 0.92);
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.sego-gallery-lightbox__summary dl,
.sego-gallery-lightbox__exif {
    margin: 0;
}

.sego-gallery-lightbox__summary dl > div,
.sego-gallery-lightbox__exif-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 0.4em;
    margin: 0 0 5px;
}

.sego-gallery-lightbox__summary dt,
.sego-gallery-lightbox__exif-row dt,
.sego-gallery-lightbox__copy-row label {
    display: inline;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 400;
    line-height: inherit;
}

.sego-gallery-lightbox__summary dd,
.sego-gallery-lightbox__exif-row dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, 0.96);
    font-size: 14px;
    font-weight: 400;
    line-height: inherit;
}

.sego-gallery-lightbox__section {
    margin-top: 14px;
    border: 0;
}

.sego-gallery-lightbox__section summary {
    padding: 7px 0;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
}

.sego-gallery-lightbox__actions {
    margin-top: 14px;
    padding-top: 0;
    border: 0;
}

.sego-gallery-lightbox__action-label {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
}

.sego-gallery-lightbox__action-controls {
    display: flex;
    align-items: stretch;
    gap: 7px;
    min-width: 0;
}

.sego-gallery-lightbox__action-controls select {
    min-width: 0;
    width: 100%;
    padding: 7px 30px 7px 8px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23b8b8b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 12px 8px;
    -webkit-appearance: none;
    appearance: none;
    color: #fff;
    color-scheme: dark;
    font: 400 14px/1.45 Inter, Arial, sans-serif;
    cursor: pointer;
}

.sego-gallery-lightbox__action-controls select:hover {
    border-color: rgba(255, 255, 255, 0.62);
}

.sego-gallery-lightbox__action-controls select:focus {
    border-color: rgba(255, 255, 255, 0.8);
    outline: 2px solid rgba(255, 255, 255, 0.2);
}

.sego-gallery-lightbox__action-controls select option {
    background: #171717;
    color: #fff;
    white-space: normal;
}

.sego-gallery-lightbox__action-controls button {
    flex: 0 0 auto;
    padding: 7px 13px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font: 400 14px/1.45 Inter, Arial, sans-serif;
    white-space: nowrap;
}

.sego-gallery-lightbox__action-controls button:hover,
.sego-gallery-lightbox__action-controls button:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: 2px solid rgba(255, 255, 255, 0.2);
}

.sego-gallery-lightbox__comments {
    font-size: 13px;
    line-height: 1.4;
}

.sego-gallery-lightbox__comment {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sego-gallery-lightbox__comment-author {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 400;
}

.sego-gallery-lightbox__comment-content {
    overflow-wrap: anywhere;
    color: #fff;
}

.sego-gallery-lightbox__comment-content img {
    max-width: 100%;
    height: auto;
}

.sego-gallery-lightbox__comments-empty {
    color: rgba(255, 255, 255, 0.68);
    font-weight: 400;
}

.sego-gallery-lightbox__comments-more,
.sego-gallery-lightbox__comment-form input[type="submit"],
.sego-gallery-lightbox__comment-form button {
    margin: 0 0 14px;
    padding: 7px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font: 400 14px/1.45 Inter, Arial, sans-serif;
}

.sego-gallery-lightbox__comments-more:hover,
.sego-gallery-lightbox__comments-more:focus,
.sego-gallery-lightbox__comment-form input[type="submit"]:hover,
.sego-gallery-lightbox__comment-form input[type="submit"]:focus,
.sego-gallery-lightbox__comment-form button:hover,
.sego-gallery-lightbox__comment-form button:focus {
    background: rgba(255, 255, 255, 0.2);
}

.sego-gallery-lightbox__comment-form {
    margin-top: 16px;
    padding-top: 0;
    border: 0;
}

.sego-gallery-lightbox__comment-label {
    display: block;
    margin: 0 0 5px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 400;
}

.sego-gallery-lightbox__comment-form textarea,
.sego-gallery-lightbox__comment-username {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 7px;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
    font: 400 14px/1.45 Inter, Arial, sans-serif;
}

.sego-gallery-lightbox__comment-form textarea {
    min-height: 58px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    resize: vertical;
}

.sego-gallery-lightbox__comment-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.sego-gallery-lightbox__comment-form textarea:focus,
.sego-gallery-lightbox__comment-username:focus {
    border-color: rgba(255, 255, 255, 0.65);
    outline: 2px solid rgba(255, 255, 255, 0.2);
}

.sego-gallery-lightbox__comment-form .sego-gallery-lightbox__comment-error {
    margin-bottom: 10px;
    color: #ffb3b3;
}

.sego-gallery-lightbox__comment-form .sego-gallery-lightbox__comment-error.is-pending {
    color: rgba(255, 255, 255, 0.62);
}

.sego-gallery-lightbox__captcha {
    margin-bottom: 10px;
    max-width: 100%;
    overflow-x: auto;
}

.sego-gallery-lightbox__captcha .captcha-panel,
.sego-gallery-lightbox__captcha dl {
    margin: 0;
    padding: 0;
}

.sego-gallery-lightbox__comment-form > button[type="submit"] {
    margin: 0;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font: 400 14px/1.45 Inter, Arial, sans-serif;
}

.sego-gallery-lightbox__comment-form > button[type="submit"]:hover,
.sego-gallery-lightbox__comment-form > button[type="submit"]:focus {
    background: #4a9de3;
}

.sego-gallery-lightbox__copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 9px;
    margin-bottom: 8px;
}

.sego-gallery-lightbox__copy-row label {
    grid-column: 1 / -1;
    margin: 0;
}

.sego-gallery-lightbox__copy-row input {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font: 400 12px/1.4 Inter, Arial, sans-serif;
}

.sego-gallery-lightbox__copy-row button {
    align-self: stretch;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    cursor: pointer;
    font: 400 13px/1.4 Inter, Arial, sans-serif;
    white-space: nowrap;
}

.sego-gallery-lightbox__copy-row button:hover,
.sego-gallery-lightbox__copy-row button:focus {
    background: rgba(255, 255, 255, 0.2);
}

.sego-gallery-lightbox__button {
    position: absolute;
    border: 0;
    border-radius: 6px;
    background: rgba(20, 20, 20, 0.55);
    color: #fff;
    font: 42px/1 Arial, sans-serif;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sego-gallery-lightbox__button:hover,
.sego-gallery-lightbox__button:focus {
    background: rgba(70, 70, 70, 0.8);
    outline: 2px solid rgba(255, 255, 255, 0.75);
}

.sego-gallery-lightbox__button.is-disabled,
.sego-gallery-lightbox__button:disabled {
    visibility: hidden;
    cursor: default;
}

.sego-gallery-lightbox__prev,
.sego-gallery-lightbox__next {
    top: 50%;
    width: 52px;
    height: 74px;
    transform: translateY(-50%);
}

.sego-gallery-lightbox__prev { left: 10px; }
.sego-gallery-lightbox__next { right: 10px; }

.sego-gallery-lightbox.has-panel .sego-gallery-lightbox__next {
    right: calc(min(var(--panel-width), 45vw) + 10px);
}

.sego-gallery-lightbox__close,
.sego-gallery-lightbox__info {
    top: 8px;
    width: 45px;
    height: 40px;
}

.sego-gallery-lightbox__close {
    right: 10px;
    font-size: 34px;
}

.sego-gallery-lightbox__info {
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(20, 20, 20, 0.32);
    color: rgba(255, 255, 255, 0.72);
    font-size: 20px;
}

.sego-gallery-lightbox__caption {
    position: absolute;
    left: 70px;
    right: 70px;
    bottom: 10px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.sego-gallery-lightbox__album {
    position: absolute;
    top: 15px;
    left: 16px;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
}

.sego-gallery-lightbox__album:hover,
.sego-gallery-lightbox__album:focus {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: underline;
}

.sego-gallery-lightbox__status {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    transform: translateY(-50%);
    text-align: center;
    font-size: 18px;
}

body.sego-gallery-lightbox-open {
    overflow: hidden !important;
}

@media (max-width: 900px) {
    .sego-gallery-lightbox {
        padding-top: 45px;
    }

    .sego-gallery-lightbox__content {
        flex-direction: column;
    }

    .sego-gallery-lightbox__stage {
        flex: 1 1 auto;
        padding: 10px 52px 40px;
    }

    .sego-gallery-lightbox__panel {
        flex: 0 0 auto;
        width: 100%;
        max-height: 45vh;
        padding: 16px 18px 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        border-left: 0;
    }

    .sego-gallery-lightbox.has-panel .sego-gallery-lightbox__next {
        right: 10px;
    }

    .sego-gallery-lightbox__prev,
    .sego-gallery-lightbox__next {
        top: auto;
        bottom: 2px;
        width: 46px;
        height: 34px;
        transform: none;
        font-size: 30px;
    }

    .sego-gallery-lightbox__caption {
        left: 58px;
        right: 58px;
        bottom: 10px;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .sego-gallery-lightbox__panel {
        max-height: 52vh;
    }
}

@media (max-width: 420px) {
    .sego-gallery-lightbox__copy-row {
        grid-template-columns: 1fr;
    }

    .sego-gallery-lightbox__copy-row button {
        justify-self: start;
    }
}

@media (max-width: 600px) {
    .sego-gallery-lightbox__action-controls {
        flex-direction: column;
    }

    .sego-gallery-lightbox__action-controls button {
        align-self: flex-start;
    }
}

/* Keep the information panel aligned with the compact Modern forum style. */
.sego-gallery-lightbox__panel-content {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    font-family: "Inter", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400 !important;
    line-height: 1.5;
}

.sego-gallery-lightbox__panel-content * {
    box-sizing: border-box;
    font-family: inherit;
    font-weight: 400;
}

.sego-gallery-lightbox__summary {
    width: 100%;
}

.sego-gallery-lightbox__summary dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 7px;
    width: 100%;
    padding-left: 0;
}

.sego-gallery-lightbox__summary dl > div {
    display: contents;
}

.sego-gallery-lightbox__exif-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    column-gap: 10px;
    width: 100%;
    margin: 0;
}

.sego-gallery-lightbox__summary dt,
.sego-gallery-lightbox__exif-row dt,
.sego-gallery-lightbox__copy-row label,
.sego-gallery-lightbox__action-label,
.sego-gallery-lightbox__comment-label {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 400 !important;
    line-height: 1.45;
}

.sego-gallery-lightbox__summary dd,
.sego-gallery-lightbox__exif-row dd {
    min-width: 0;
    color: rgba(255, 255, 255, 0.94);
    font-size: 13px;
    font-weight: 400 !important;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sego-gallery-lightbox__section,
.sego-gallery-lightbox__actions {
    box-sizing: border-box;
    display: block;
    position: relative;
    width: 100%;
    margin: 18px 0 0;
    padding: 14px 0 0;
    border: 0;
}

.sego-gallery-lightbox__section::before,
.sego-gallery-lightbox__actions::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sego-gallery-lightbox__section summary {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 10px;
    padding: 0 0 9px;
    border-bottom: 0;
    color: rgba(255, 255, 255, 0.96);
    font-size: 13px;
    font-weight: 300 !important;
    line-height: 1.35;
}

.sego-gallery-lightbox__section summary::after {
    content: "";
    display: block;
    width: 100%;
    margin-top: 9px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sego-gallery-lightbox__action-label {
    margin: 0 0 8px;
}

.sego-gallery-lightbox__action-controls {
    width: 100%;
}

.sego-gallery-lightbox__action-controls select,
.sego-gallery-lightbox__action-controls button,
.sego-gallery-lightbox__copy-row input,
.sego-gallery-lightbox__copy-row button,
.sego-gallery-lightbox__comment-form textarea,
.sego-gallery-lightbox__comment-username,
.sego-gallery-lightbox__comment-form > button[type="submit"] {
    font-family: "Inter", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400 !important;
}

.sego-gallery-lightbox__action-controls select {
    padding: 7px 30px 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.72);
    font-weight: 400 !important;
}

.sego-gallery-lightbox__copy-row {
    width: 100%;
    gap: 6px 10px;
    margin: 0 0 12px;
}

.sego-gallery-lightbox__copy-row input {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.72);
    font-weight: 400 !important;
}

.sego-gallery-lightbox__comments {
    width: 100%;
    padding-top: 2px;
    font-size: 13px;
    font-weight: 400 !important;
    line-height: 1.5;
}

.sego-gallery-lightbox__comments-empty,
.sego-gallery-lightbox__comment-author,
.sego-gallery-lightbox__comment-content {
    font-weight: 400 !important;
}

.sego-gallery-lightbox__comment-form {
    width: 100%;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sego-gallery-lightbox__comment-form textarea,
.sego-gallery-lightbox__comment-username {
    width: 100%;
    max-width: none;
    padding: 8px 0;
}

.sego-gallery-lightbox__comment-form textarea {
    min-height: 76px;
    padding: 8px 9px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.9);
}

.sego-gallery-lightbox__comment-form textarea:focus {
    border-color: rgba(255, 255, 255, 0.55);
    outline: 2px solid rgba(255, 255, 255, 0.12);
}

.sego-gallery-lightbox__comment-form > button[type="submit"] {
    margin-top: 4px;
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.9);
}

@media (prefers-reduced-motion: reduce) {
    .sego-gallery-lightbox,
    .sego-gallery-lightbox__image {
        transition: none;
    }
}
