/**
 * Tour Gallery Modal Styles
 * For [tour_booking_table_tbl419] shortcode
 * Version: 1.0.0
 */

/* ================================
   View Gallery Button
   ================================ */
.view-gallery-btn-tbl419 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    margin-top: 20px;
}

.view-gallery-btn-tbl419:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.view-gallery-btn-tbl419:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.view-gallery-btn-tbl419 i {
    font-size: 18px;
}

.view-gallery-btn-tbl419 .gallery-count-tbl419 {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ================================
   Modal Overlay & Container
   ================================ */
.tour-gallery-modal-tbl419 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tour-gallery-modal-tbl419.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.gallery-modal-overlay-tbl419 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
}

.gallery-modal-content-tbl419 {
    position: relative;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn-tbl419 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn-tbl419 {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ================================
   Modal Header
   ================================ */
.gallery-modal-header-tbl419 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.gallery-modal-header-tbl419 h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-modal-header-tbl419 h3 i {
    color: #0ea5e9;
}

.gallery-modal-close-tbl419 {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 24px;
    line-height: 1;
}

.gallery-modal-close-tbl419:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: rotate(90deg);
}

/* ================================
   Gallery Grid
   ================================ */
.gallery-modal-grid-tbl419 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 80px);
}

/* Custom scrollbar */
.gallery-modal-grid-tbl419::-webkit-scrollbar {
    width: 8px;
}

.gallery-modal-grid-tbl419::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.gallery-modal-grid-tbl419::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.gallery-modal-grid-tbl419::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ================================
   Gallery Item
   ================================ */
.gallery-item-tbl419 {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}

.gallery-item-tbl419:hover .gallery-item-img-tbl419 {
    transform: scale(1.08);
}

.gallery-item-tbl419:hover .gallery-item-overlay-tbl419 {
    opacity: 1;
}

/* Skeleton Loading */
.gallery-skeleton-tbl419 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%);
    background-size: 200% 100%;
    animation: skeleton-pulse-tbl419 1.8s ease-in-out infinite;
    z-index: 1;
}

@keyframes skeleton-pulse-tbl419 {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.gallery-skeleton-tbl419.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Gallery Image */
.gallery-item-img-tbl419 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.gallery-item-img-tbl419.loaded {
    opacity: 1;
}

/* Hover Overlay */
.gallery-item-overlay-tbl419 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item-overlay-tbl419 i {
    color: #fff;
    font-size: 28px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ================================
   Lightbox
   ================================ */
.gallery-lightbox-tbl419 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox-tbl419.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox-overlay-tbl419 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    cursor: pointer;
}

/* Lightbox Navigation */
.lb-nav-tbl419 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 24px;
}

.lb-nav-tbl419:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lb-nav-tbl419:active {
    transform: translateY(-50%) scale(0.95);
}

.lb-prev-tbl419 {
    left: 24px;
}

.lb-next-tbl419 {
    right: 24px;
}

/* Lightbox Close */
.lb-close-tbl419 {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 24px;
}

.lb-close-tbl419:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Lightbox Image Wrapper */
.lb-image-wrapper-tbl419 {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

/* Lightbox Skeleton */
.lb-skeleton-tbl419 {
    position: absolute;
    width: 400px;
    height: 300px;
    max-width: 80vw;
    background: linear-gradient(90deg,
        #2a2a2a 0%,
        #3a3a3a 20%,
        #2a2a2a 40%,
        #2a2a2a 100%);
    background-size: 200% 100%;
    animation: skeleton-pulse-tbl419 1.8s ease-in-out infinite;
    border-radius: 8px;
}

.lb-skeleton-tbl419.hidden {
    display: none;
}

/* Lightbox Image */
.lb-image-tbl419 {
    max-width: 100%;
    max-height: calc(85vh - 100px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lb-image-tbl419.loaded {
    opacity: 1;
}

/* Lightbox Counter */
.lb-counter-tbl419 {
    margin-top: 16px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Lightbox Thumbnails */
.lb-thumbs-tbl419 {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow-x: auto;
    max-width: 90vw;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lb-thumbs-tbl419::-webkit-scrollbar {
    display: none;
}

.lb-thumb-tbl419 {
    flex: 0 0 auto;
    width: 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0;
}

.lb-thumb-tbl419:hover {
    opacity: 0.8;
    border-color: rgba(255, 255, 255, 0.5);
}

.lb-thumb-tbl419.active {
    opacity: 1;
    border-color: #fff;
}

.lb-thumb-tbl419 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 1024px) {
    .gallery-modal-grid-tbl419 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .gallery-modal-content-tbl419 {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .gallery-modal-header-tbl419 {
        padding: 14px 16px;
    }

    .gallery-modal-header-tbl419 h3 {
        font-size: 16px;
    }

    .gallery-modal-grid-tbl419 {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
        padding: 12px;
        max-height: calc(100vh - 60px);
    }

    .gallery-item-tbl419 {
        border-radius: 8px;
    }

    .view-gallery-btn-tbl419 {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    /* Lightbox Mobile */
    .lb-nav-tbl419 {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .lb-prev-tbl419 {
        left: 12px;
    }

    .lb-next-tbl419 {
        right: 12px;
    }

    .lb-close-tbl419 {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .lb-thumbs-tbl419 {
        padding: 8px;
        gap: 6px;
    }

    .lb-thumb-tbl419 {
        width: 56px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-modal-grid-tbl419 {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 10px;
    }

    .gallery-item-tbl419 {
        border-radius: 6px;
    }

    .gallery-item-overlay-tbl419 i {
        font-size: 22px;
    }

    .lb-counter-tbl419 {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* ================================
   Accessibility & Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
    .gallery-modal-content-tbl419,
    .gallery-item-img-tbl419,
    .lb-image-tbl419,
    .gallery-skeleton-tbl419,
    .lb-skeleton-tbl419,
    .lb-nav-tbl419,
    .lb-close-tbl419,
    .gallery-modal-close-tbl419 {
        animation: none;
        transition: none;
    }
}

/* Focus states for keyboard navigation */
.gallery-item-tbl419:focus,
.lb-nav-tbl419:focus,
.lb-close-tbl419:focus,
.lb-thumb-tbl419:focus,
.gallery-modal-close-tbl419:focus {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
}

.gallery-item-tbl419:focus-visible,
.lb-nav-tbl419:focus-visible,
.lb-close-tbl419:focus-visible,
.lb-thumb-tbl419:focus-visible,
.gallery-modal-close-tbl419:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
}

/* ================================
   Dark Mode Support
   ================================ */
@media (prefers-color-scheme: dark) {
    .gallery-modal-content-tbl419 {
        background: #1f2937;
    }

    .gallery-modal-header-tbl419 {
        background: #111827;
        border-bottom-color: #374151;
    }

    .gallery-modal-header-tbl419 h3 {
        color: #f9fafb;
    }

    .gallery-modal-close-tbl419 {
        background: #374151;
        color: #9ca3af;
    }

    .gallery-modal-close-tbl419:hover {
        background: #4b5563;
        color: #f9fafb;
    }

    .gallery-skeleton-tbl419 {
        background: linear-gradient(90deg,
            #374151 0%,
            #4b5563 20%,
            #374151 40%,
            #374151 100%);
    }

    .gallery-modal-grid-tbl419::-webkit-scrollbar-track {
        background: #1f2937;
    }

    .gallery-modal-grid-tbl419::-webkit-scrollbar-thumb {
        background: #4b5563;
    }

    .gallery-modal-grid-tbl419::-webkit-scrollbar-thumb:hover {
        background: #6b7280;
    }
}
