.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;
    touch-action: none;
}

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

.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;
    box-shadow: 0 2px 22px rgba(0, 0, 0, 0.65);
    cursor: pointer;
}

.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%;
}

.sego-gallery-lightbox__summary h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 20px;
    line-height: 1.25;
}

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

.sego-gallery-lightbox__summary dl > div,
.sego-gallery-lightbox__exif-row {
    margin: 0 0 13px;
}

.sego-gallery-lightbox__summary dt,
.sego-gallery-lightbox__exif-row dt,
.sego-gallery-lightbox__copy-row label {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.3;
}

.sego-gallery-lightbox__summary dd,
.sego-gallery-lightbox__exif-row dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.sego-gallery-lightbox__section {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.sego-gallery-lightbox__section summary {
    padding: 14px 0;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.sego-gallery-lightbox__actions {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.sego-gallery-lightbox__action-label {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    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: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background-color: #171717;
    background-image:
        linear-gradient(45deg, transparent 50%, #fff 50%),
        linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position:
        calc(100% - 15px) 50%,
        calc(100% - 10px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    color: #fff;
    color-scheme: dark;
    font: inherit;
    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: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font: inherit;
    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: 600;
}

.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);
}

.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: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

.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: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.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: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 3px;
    background: #171717;
    color: #fff;
    font: inherit;
}

.sego-gallery-lightbox__comment-form textarea {
    min-height: 58px;
    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__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: 8px 18px;
    border: 1px solid #6fb7ff;
    border-radius: 3px;
    background: #2f88d8;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.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: 7px;
    margin-bottom: 14px;
}

.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: 7px 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font: 12px/1.3 monospace;
}

.sego-gallery-lightbox__copy-row button {
    align-self: stretch;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    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: 60px;
    font-size: 25px;
}

.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: #fff !important;
    font-size: 15px;
    text-decoration: none;
}

.sego-gallery-lightbox__album:hover,
.sego-gallery-lightbox__album:focus {
    color: #fff !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;
    }
}
