/**
 * Sunshine Gallery Styles - ENHANCED TAGS & FILTERING
 * Author: Corvegas
 * Version: 1.6.0
 */

/* Gallery Container */
.sunshine-gallery-container {
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sunshine-gallery-grid {
    width: 100%;
}

/* Filter Bar */
.sunshine-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 232, 239, 0.3);
    border-radius: 8px;
}

.sunshine-filter-clear {
    padding: 8px 16px;
    background: #FF8605;
    color: #FFFFFF;
    border: 2px solid #FF89C6;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sunshine-filter-clear:hover {
    background: #C868D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sunshine-filter-status {
    font-size: 14px;
    color: #5A3A52;
    font-weight: 500;
}

/* Gallery Items */
.sunshine-gallery-item {
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sunshine-gallery-item.filtered-out {
    display: none !important;
}

.sunshine-gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background: rgba(200, 104, 210, 0.2);
}

.sunshine-gallery-image,
.sunshine-gallery-video-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sunshine-gallery-video-canvas {
    display: block;
    background: #C868D2;
}

.sunshine-gallery-video-thumb-gen {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.sunshine-gallery-link {
    display: block;
    text-decoration: none;
}

/* Video Indicator */
.sunshine-gallery-video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.sunshine-gallery-video-indicator svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Title Styling */
.sunshine-gallery-title {
    font-weight: 600;
    line-height: 1.4;
    word-wrap: break-word;
    text-align: center;
}

/* Content Wrapper */
.sunshine-gallery-content {
    display: flex;
    flex-direction: column;
}

/* Description Styling */
.sunshine-gallery-description {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Credits Styling */
.sunshine-gallery-credits {
    font-size: 12px;
    font-style: italic;
    display: flex;
    align-items: center;
}

.sunshine-gallery-credits svg {
    flex-shrink: 0;
}

.sunshine-gallery-credits a {
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.sunshine-gallery-credits a:hover {
    text-decoration: underline;
}

/* View Count Styling */
.sunshine-gallery-view-count {
    font-size: 12px;
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.sunshine-gallery-view-count svg {
    flex-shrink: 0;
}

/* Enhanced Tags Styling */
.sunshine-gallery-tags {
    display: flex;
    flex-wrap: wrap;
}

.sunshine-gallery-tag {
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
    user-select: none;
    display: inline-block;
}

/* Filterable Tags */
.sunshine-gallery-tag.filterable {
    cursor: pointer;
}

/* Tag Hover Effects */
[data-tag-hover-effect="scale"] .sunshine-gallery-tag.filterable:hover {
    transform: scale(1.1);
}

[data-tag-hover-effect="lift"] .sunshine-gallery-tag.filterable:hover {
    transform: translateY(-3px);
}

.sunshine-gallery-tag.filterable:hover {
    opacity: 0.9;
}

/* Active Tag State */
.sunshine-gallery-tag.active {
    font-weight: 700;
}

/* Hover Effects for Gallery Items */
.sunshine-gallery-item.hover-zoom:hover .sunshine-gallery-image,
.sunshine-gallery-item.hover-zoom:hover .sunshine-gallery-video-canvas {
    transform: scale(1.1);
}

.sunshine-gallery-item.hover-lift:hover {
    transform: translateY(-5px);
}

.sunshine-gallery-item.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 134, 5, 0.6);
}

/* Pagination */
.sunshine-gallery-pagination {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0;
}

.sunshine-gallery-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: #C868D2;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid #FF89C6;
    transition: all 0.3s ease;
}

.sunshine-gallery-pagination .page-numbers:hover,
.sunshine-gallery-pagination .page-numbers.current {
    background: #FF8605;
    border-color: #FF8605;
    transform: translateY(-2px);
}

.sunshine-gallery-pagination .prev,
.sunshine-gallery-pagination .next {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sunshine-gallery-grid[data-columns="6"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .sunshine-gallery-grid[data-columns="5"],
    .sunshine-gallery-grid[data-columns="6"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .sunshine-gallery-grid[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .sunshine-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .sunshine-filter-bar {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .sunshine-gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Lightbox Enhancement */
.sunshine-gallery-link:focus {
    outline: 2px solid #FF8605;
    outline-offset: 2px;
}

/* Loading State */
.sunshine-gallery-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Accessibility */
.sunshine-gallery-item:focus-within {
    outline: 2px solid #FF8605;
    outline-offset: 3px;
}

/* Animation for filtering */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sunshine-gallery-item:not(.filtered-out) {
    animation: fadeIn 0.3s ease-in-out;
}

/* Print Styles */
@media print {
    .sunshine-gallery-pagination,
    .sunshine-filter-bar {
        display: none;
    }
    
    .sunshine-gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}