.axx-gallery-card {
    overflow: hidden;
    border-radius: 1rem;
}

.axx-gallery-card-media {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background-color: var(--axx-surface-muted, #f8f9fa);
    color: var(--bs-secondary-color, #6c757d);
}

.axx-gallery-card-media [data-lucide],
.axx-gallery-card-media svg,
.axx-gallery-empty-icon [data-lucide],
.axx-gallery-empty-icon svg {
    width: 3rem;
    height: 3rem;
}

.axx-gallery-card .card-title,
.axx-gallery-card .card-text {
    overflow-wrap: anywhere;
}

.axx-gallery-card-date-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.axx-gallery-empty {
    border: 1px dashed var(--bs-border-color, #dee2e6);
    border-radius: 1rem;
    background-color: var(--axx-surface, #fff);
}

.axx-gallery-empty-icon {
    display: inline-flex;
    color: var(--bs-secondary-color, #6c757d);
}

.axx-gallery-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.axx-gallery-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--axx-surface-muted, #f8f9fa);
}

.axx-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.axx-gallery-description {
    white-space: pre-line;
}

.axx-gallery-filename {
    overflow-wrap: anywhere;
}

.axx-gallery-lightbox {
    width: min(96vw, 90rem);
    max-width: 96vw;
    max-height: 96vh;
    border: 0;
    border-radius: 0.75rem;
    padding: 1rem;
    background: #161616;
}

.axx-gallery-lightbox::backdrop {
    background: rgb(0 0 0 / 80%);
}

.axx-gallery-lightbox-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.axx-gallery-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    height: auto;
    margin: 0 auto 0.5rem;
}

.axx-gallery-lightbox-stage {
    position: relative;
}

.axx-gallery-lightbox-stage .axx-gallery-lightbox-image[hidden] {
    display: none;
}

.axx-gallery-lightbox-status:not([hidden]) {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    padding: 1rem;
}

.axx-gallery-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
}

.axx-gallery-lightbox-primary {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    color: #fff;
    overflow-wrap: anywhere;
}

.axx-gallery-lightbox-caption {
    max-height: 40vh;
    overflow-y: auto;
    overflow-wrap: anywhere;
    color: #fff;
    white-space: pre-line;
}

@media (min-width: 992px) {
    .axx-gallery-lightbox-content {
        flex-direction: row;
        align-items: flex-start;
    }

    .axx-gallery-lightbox-caption {
        flex: 0 0 320px;
        max-width: 360px;
        max-height: 70vh;
    }
}
