.wtwh-cloudflare-gallery {
    width: 100%;
}

.wtwh-gallery-grid {
    display: grid;
    grid-gap: 10px;
    grid-auto-rows: 250px 150px;
}

.wtwh-gallery-item {
    overflow: hidden;
    border-radius: 4px;
    break-inside: avoid;
    cursor: pointer;
}

.style-1 {
    grid-template-columns: repeat(5, 1fr);
}

.style-1 .wtwh-gallery-item:nth-child(3n) {
    grid-row: span 2;
}

.style-2, .style-3, .style-4 {
    grid-template-columns: repeat(6, 1fr);
}

.style-2 .wtwh-gallery-item:nth-child(3n), .style-3 .wtwh-gallery-item:nth-child(3n) {
    grid-column: span 2;
}

.style-3 .wtwh-gallery-item:nth-child(6n) {
    grid-row: span 2;
}

.style-4 .wtwh-gallery-item:nth-child(4n) {
    grid-column: span 2;
}

.wtwh-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wtwh-gallery-empty {
    color: #666;
    text-align: center;
    padding: 20px;
}

.wtwh-gallery-overlay{
    width:100%;
    height:100vh;
    position:fixed;
    top:0;
    left:0;
    z-index:9999;
    background-color:rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wtwh-gallery-overlay.visible{
    opacity: 1;
}

.wtwh-gallery-overlay.fade-out{
    opacity: 0;
}

.wtwh-gallery-lightbox{
    width:100%;
    height:100vh;
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position:relative;
    z-index:10000;
    padding:6rem;
}

.wtwh-gallery-lightbox img{
    max-width:100%;
    max-height:100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wtwh-gallery-lightbox img.visible{
    opacity: 1;
}

.wtwh-gallery-lightbox .image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 1;
}

.wtwh-gallery-lightbox .image-loader.hidden {
    display: none;
}

.wtwh-gallery-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.wtwh-gallery-loader-text {
    color: #fff;
    font-size: 14px;
    opacity: 0.8;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wtwh-gallery-lightbox .image-skeleton {
    width: 80%;
    height: 60%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    position: relative;
}

.wtwh-gallery-lightbox .image-skeleton.hidden {
    display: none;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.wtwh-gallery-close{
    position:absolute;
    top:20px;
    right:20px;
    z-index:10000;
    cursor:pointer;
    font-size: 18px;
    color: #fff;
    border: none;
    background: grey;
    padding: 3px 9px;
    border-radius: 25px;
}

.wtwh-gallery-share-links{
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.wtwh-gallery-share-links button{
    background-color:transparent;
    border:none;
    cursor:pointer;
    padding: 0;
}

.wtwh-gallery-share-links svg{
    width:24px;
    fill:#fff;
}

.wtwh-gallery-share-links svg:hover{
    fill:var(--e-a-color-primary);
}

.wtwh-gallery-copied-notification{
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.wtwh-gallery-copied-notification.fade-out{
    opacity: 0;
}

.wtwh-gallery-arrows{
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
}

.wtwh-gallery-arrows .wtwh-gallery-arrow{
    background: grey;
    color: white;
    border: none;
    font-weight: bold;
    padding: 17px 12px !important;
    border-radius: 25px !important;
    line-height: 0;
}
