/* File: assets/enhanced-gallery.css */

.abd-enhanced-gallery {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Featured Image */
.abd-gallery-featured {
    margin-bottom: 20px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.abd-gallery-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
}

.abd-featured-image {
    position: relative;
    aspect-ratio: 16/10;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.abd-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.abd-featured-image:hover img {
    transform: scale(1.05);
}

.abd-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.abd-featured-image:hover .abd-image-overlay {
    opacity: 1;
}

.abd-zoom-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.abd-zoom-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.abd-image-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.abd-image-counter {
    color: white;
    font-weight: 600;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.abd-share-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.abd-share-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Thumbnail Gallery */
.abd-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.abd-gallery-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.abd-gallery-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.abd-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.abd-gallery-thumb:hover img {
    transform: scale(1.1);
}

.abd-thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abd-gallery-thumb:hover .abd-thumb-overlay {
    opacity: 1;
}

.abd-thumb-zoom {
    color: white;
    font-size: 16px;
}

/* Empty Gallery */
.abd-gallery-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 2px dashed #dee2e6;
}

.abd-empty-gallery-icon .dashicons {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 15px;
}

.abd-gallery-empty p {
    color: #6c757d;
    margin: 0;
    font-size: 16px;
}

/* Upgrade Notice */
.abd-gallery-upgrade-notice {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    text-align: center;
}

.abd-gallery-upgrade-notice p {
    margin: 0 0 10px 0;
}

.abd-upgrade-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.abd-upgrade-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Lightbox Modal */
.abd-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.abd-lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.abd-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.abd-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    margin: 5% auto;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.abd-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.abd-lightbox-title {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.abd-lightbox-controls {
    display: flex;
    gap: 10px;
}

.abd-lightbox-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abd-lightbox-controls button:hover {
    background: rgba(255,255,255,0.2);
}

.abd-lightbox-close {
    font-size: 24px;
    font-weight: 300;
}

.abd-lightbox-body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.abd-lightbox-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abd-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.abd-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.7);
    padding: 8px;
    border-radius: 25px;
    backdrop-filter: blur(5px);
}

.abd-zoom-controls button {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.abd-zoom-controls button:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.abd-lightbox-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.abd-nav-prev, .abd-nav-next {
    width: 60px;
    height: 60px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    font-weight: 300;
    pointer-events: auto;
    backdrop-filter: blur(5px);
}

.abd-nav-prev:hover, .abd-nav-next:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.abd-lightbox-footer {
    padding: 20px;
    background: #2d2d2d;
    border-top: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.abd-image-counter {
    color: white;
    font-weight: 600;
}

.abd-share-options {
    display: flex;
    gap: 10px;
}

.abd-share-options button {
    padding: 8px 16px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
}

.abd-share-options button:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .abd-gallery-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .abd-lightbox-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
    
    .abd-lightbox-header {
        padding: 15px;
    }
    
    .abd-lightbox-title {
        font-size: 16px;
    }
    
    .abd-lightbox-controls button {
        width: 36px;
        height: 36px;
    }
    
    .abd-nav-prev, .abd-nav-next {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .abd-lightbox-footer {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    .abd-share-options {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .abd-featured-image {
        aspect-ratio: 4/3;
    }
    
    .abd-gallery-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }
    
    .abd-zoom-icon {
        width: 48px;
        height: 48px;
    }
    
    .abd-lightbox-content {
        border-radius: 0;
        width: 100%;
        height: 100%;
        margin: 0;
    }
}

/* Tier-specific styling */
.abd-enhanced-gallery[data-tier="free"] .abd-gallery-featured {
    border: 2px solid #f8f9fa;
}

.abd-enhanced-gallery[data-tier="business"] .abd-gallery-featured {
    border: 2px solid #28a745;
}

.abd-enhanced-gallery[data-tier="enterprise"] .abd-gallery-featured {
    border: 2px solid #6f42c1;
}

/* Loading states */
.abd-gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.abd-gallery-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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