/**
 * Frontend Styles for SampleShots Gallery
 * Modern 2026 Design - Matches conclusion-recommendations style
 */

/* =============================================
   GALLERY WRAPPER
   ============================================= */
.sampleshots-gallery-wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 2.5rem;
    margin: 3rem 0;
}

/* =============================================
   GALLERY HEADER
   ============================================= */
.sampleshots-gallery-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 0;
    border-bottom: none;
}

.sampleshots-gallery-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #2d3748 !important;
    margin: 0 0 0.5rem 0 !important;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sampleshots-gallery-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sampleshots-gallery-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* =============================================
   GALLERY GRID
   ============================================= */
.sampleshots-gallery-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 2rem;
}

.sampleshots-gallery-grid[data-columns="1"] {
    grid-template-columns: repeat(1, 1fr);
}

.sampleshots-gallery-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.sampleshots-gallery-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.sampleshots-gallery-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.sampleshots-gallery-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.sampleshots-gallery-grid[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sampleshots-gallery-wrapper {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .sampleshots-gallery-header {
        margin-bottom: 1.5rem;
    }

    .sampleshots-gallery-title {
        font-size: 1.25rem !important;
    }

    .sampleshots-gallery-link {
        font-size: 0.8125rem;
    }

    .sampleshots-gallery-grid,
    .sampleshots-gallery-grid[data-columns="2"],
    .sampleshots-gallery-grid[data-columns="3"],
    .sampleshots-gallery-grid[data-columns="4"],
    .sampleshots-gallery-grid[data-columns="5"],
    .sampleshots-gallery-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .sampleshots-gallery-wrapper {
        padding: 1.25rem;
    }

    .sampleshots-gallery-title {
        font-size: 1.125rem !important;
    }

    .sampleshots-gallery-grid,
    .sampleshots-gallery-grid[data-columns="2"],
    .sampleshots-gallery-grid[data-columns="3"],
    .sampleshots-gallery-grid[data-columns="4"],
    .sampleshots-gallery-grid[data-columns="5"],
    .sampleshots-gallery-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* =============================================
   GALLERY ITEM (Card Style)
   ============================================= */
.sampleshots-gallery-item {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sampleshots-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.sampleshots-gallery-link-image {
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    aspect-ratio: 4 / 3;
}

.sampleshots-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sampleshots-gallery-item:hover .sampleshots-gallery-image {
    transform: scale(1.05);
}

/* =============================================
   GALLERY OVERLAY
   ============================================= */
.sampleshots-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sampleshots-gallery-link-image:hover .sampleshots-gallery-overlay {
    opacity: 1;
}

.sampleshots-gallery-zoom-icon {
    font-size: 2rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.sampleshots-gallery-link-image:hover .sampleshots-gallery-zoom-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* =============================================
   GALLERY CAPTION
   ============================================= */
.sampleshots-gallery-caption {
    padding: 0.625rem 0.75rem;
    font-size: 0.6875rem;
    color: #4a5568;
    line-height: 1.4;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sampleshots-gallery-caption a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sampleshots-gallery-caption a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* =============================================
   VIEW MORE BUTTON
   ============================================= */
.sampleshots-gallery-view-more {
    text-align: center;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    padding-top: 2rem;
    margin-top: 0;
}

.sampleshots-view-more-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #f6ad55;
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sampleshots-view-more-btn:hover {
    background-color: #ed8936;
    color: white !important;
    text-decoration: none !important;
}

/* =============================================
   ERROR/EMPTY STATES
   ============================================= */
.sampleshots-gallery-error,
.sampleshots-gallery-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #4a5568;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sampleshots-gallery-error {
    background: #fff3cd;
    color: #856404;
}

/* =============================================
   LIGHTBOX STYLES
   ============================================= */
.sampleshots-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.sampleshots-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.sampleshots-lightbox-content {
    position: relative;
    z-index: 2;
    width: 90%;
    height: 90%;
    max-width: 1400px;
    max-height: 900px;
    display: flex;
    flex-direction: column;
}

.sampleshots-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sampleshots-lightbox-close:hover {
    opacity: 1;
}

.sampleshots-lightbox-prev,
.sampleshots-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 20px 15px;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
    line-height: 1;
    border-radius: 8px;
}

.sampleshots-lightbox-prev:hover,
.sampleshots-lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.sampleshots-lightbox-prev {
    left: 20px;
}

.sampleshots-lightbox-next {
    right: 20px;
}

.sampleshots-lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.sampleshots-lightbox-image.zoom-fit {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sampleshots-lightbox-image.zoom-actual {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
}

.sampleshots-lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.sampleshots-lightbox-caption-text {
    margin: 0;
}

.sampleshots-lightbox-caption a {
    color: #f6ad55;
    text-decoration: none;
}

.sampleshots-lightbox-caption a:hover {
    text-decoration: underline;
}

.sampleshots-lightbox-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

.sampleshots-lightbox-zoom-fit,
.sampleshots-lightbox-zoom-actual {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.sampleshots-lightbox-zoom-fit:hover,
.sampleshots-lightbox-zoom-actual:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.sampleshots-lightbox-zoom-fit.active,
.sampleshots-lightbox-zoom-actual.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

/* Mobile adjustments for lightbox */
@media (max-width: 768px) {
    .sampleshots-lightbox-content {
        width: 95%;
        height: 95%;
    }

    .sampleshots-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 30px;
        height: 30px;
        line-height: 30px;
    }

    .sampleshots-lightbox-prev,
    .sampleshots-lightbox-next {
        font-size: 30px;
        padding: 10px 8px;
    }

    .sampleshots-lightbox-prev {
        left: 5px;
    }

    .sampleshots-lightbox-next {
        right: 5px;
    }

    .sampleshots-lightbox-caption {
        font-size: 12px;
        padding: 5px;
    }

    .sampleshots-lightbox-controls {
        gap: 5px;
        padding: 5px;
    }

    .sampleshots-lightbox-zoom-fit,
    .sampleshots-lightbox-zoom-actual {
        padding: 6px 12px;
        font-size: 11px;
    }
}
