/* Guest Photo Uploader - Frontend Styles */

.gpu-upload-form {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.gpu-upload-area {
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gpu-upload-area:hover,
.gpu-upload-area.gpu-dragover {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.gpu-upload-icon {
    color: #666;
    margin-bottom: 1rem;
}

.gpu-upload-area h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.5rem;
}

.gpu-upload-area p {
    margin: 0.5rem 0;
    color: #666;
}

.gpu-file-info {
    font-size: 0.9rem;
    color: #999;
}

.gpu-uploader-name {
    padding: 0 2rem 2rem;
}

.gpu-uploader-name label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.gpu-uploader-name input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.gpu-upload-preview {
    padding: 2rem;
    border-top: 1px solid #eee;
}

.gpu-upload-preview h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.gpu-preview-list {
    margin-bottom: 2rem;
}

.gpu-file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.gpu-file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.gpu-file-size {
    color: #666;
    font-size: 0.9rem;
}

.gpu-remove-file {
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.gpu-upload-progress {
    padding: 2rem;
    text-align: center;
}

.gpu-progress-bar {
    width: 100%;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.gpu-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    width: 0%;
    transition: width 0.3s ease;
}

.gpu-upload-results {
    padding: 2rem;
}

/* Modern Gallery Styles - Matching React App */
.gpu-gallery {
    margin: 20px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gpu-no-uploads {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gpu-no-uploads-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
    color: #999;
}

.gpu-no-uploads p:first-of-type {
    font-size: 18px;
    font-weight: 500;
    color: #666;
    margin: 0 0 8px 0;
}

.gpu-no-uploads p:last-of-type {
    font-size: 14px;
    color: #999;
    margin: 0;
}

.gpu-gallery-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (min-width: 640px) {
    .gpu-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (min-width: 768px) {
    .gpu-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .gpu-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

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

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

@media (max-width: 768px) {
    .gpu-gallery-grid[data-columns="2"],
    .gpu-gallery-grid[data-columns="3"],
    .gpu-gallery-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gpu-gallery-grid[data-columns="2"],
    .gpu-gallery-grid[data-columns="3"],
    .gpu-gallery-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
}

.gpu-gallery-item {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}

.gpu-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.gpu-media-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.gpu-media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    display: block;
}

.gpu-gallery-item:hover .gpu-media-container img {
    transform: scale(1.05);
}

.gpu-media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f0f0f0;
    border-radius: 8px 8px 0 0;
}

.gpu-media-container video::-webkit-media-controls {
    display: none !important;
}

.gpu-media-container video::-webkit-media-controls-start-playbook-button {
    display: none !important;
}

.gpu-video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.gpu-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gpu-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpu-info-section {
    padding: 4px 16px;
    min-height: 25px;
    display: flex;
    align-items: center;
}

.gpu-uploader-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
    line-height: 1;
    margin: 0;
}

.gpu-uploader-label {
    font-weight: normal;
}

.gpu-uploader-name {
    color: #666;
}

.gpu-date-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #888;
    line-height: 1.2;
}

.gpu-date-icon {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

/* Modern Lightbox Styles - Matching React App */
.gpu-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gpu-lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.gpu-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.gpu-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.gpu-lightbox-prev,
.gpu-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    z-index: 10001;
}

.gpu-lightbox-prev {
    left: 16px;
}

.gpu-lightbox-next {
    right: 16px;
}

.gpu-lightbox-prev:hover,
.gpu-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.gpu-lightbox-prev:disabled,
.gpu-lightbox-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gpu-lightbox-prev:disabled:hover,
.gpu-lightbox-next:disabled:hover {
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
}

.gpu-lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 16px;
}

.gpu-lightbox-media img,
.gpu-lightbox-media video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.gpu-lightbox-info {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 24px 16px 16px;
    text-align: center;
}

.gpu-lightbox-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.gpu-lightbox-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    opacity: 0.9;
}

.gpu-lightbox-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

/* Prevent body scroll when lightbox is open */
body.gpu-lightbox-open {
    overflow: hidden;
}

/* Animation classes */
.gpu-fade-in {
    opacity: 0;
    animation: gpu-fadeIn 0.3s ease forwards;
}

.gpu-fade-out {
    opacity: 1;
    animation: gpu-fadeOut 0.3s ease forwards;
}

@keyframes gpu-fadeIn {
    to { opacity: 1; }
}

@keyframes gpu-fadeOut {
    to { opacity: 0; }
}

.gpu-scale-in {
    transform: scale(0.9);
    animation: gpu-scaleIn 0.3s ease forwards;
}

@keyframes gpu-scaleIn {
    to { transform: scale(1); }
}

/* Admin interface styles for mobile formats */
.gpu-video-placeholder,
.gpu-mobile-image-placeholder,
.gpu-file-placeholder {
    font-size: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
}

.gpu-mobile-image-placeholder small,
.gpu-video-placeholder small,
.gpu-file-placeholder small {
    font-size: 10px;
    color: #666;
    font-weight: normal;
}

.gpu-download-btn {
    display: inline-block;
    margin-top: 4px;
    text-decoration: none;
    font-size: 14px;
    color: #0073aa;
}

.gpu-download-btn:hover {
    color: #005177;
}

/* Upload form styles */
.gpu-upload-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.gpu-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gpu-upload-area:hover,
.gpu-upload-area.gpu-dragover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.gpu-upload-icon {
    margin-bottom: 16px;
    color: #666;
}

.gpu-upload-area h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.gpu-upload-area p {
    margin: 0 0 8px 0;
    color: #666;
}

.gpu-file-info {
    font-size: 14px;
    color: #999;
}

.gpu-uploader-name {
    margin: 20px 0;
}

.gpu-uploader-name label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.gpu-uploader-name input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.gpu-upload-preview {
    margin: 20px 0;
}

.gpu-preview-list {
    margin: 16px 0;
}

.gpu-file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fff;
}

.gpu-file-info strong {
    display: block;
    margin-bottom: 4px;
}

.gpu-file-size {
    font-size: 14px;
    color: #666;
}

.gpu-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.gpu-upload-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.gpu-upload-button:hover {
    background: #005177;
}

.gpu-upload-progress {
    margin: 20px 0;
}

.gpu-progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.gpu-progress-fill {
    height: 100%;
    background: #0073aa;
    transition: width 0.3s ease;
    width: 0%;
}

.gpu-upload-result {
    margin: 20px 0;
    padding: 16px;
    border-radius: 4px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.gpu-converted-label {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(0, 123, 255, 0.8);
    color: white;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gpu-upload-form {
        margin: 1rem;
        border-radius: 4px;
    }
    
    .gpu-upload-area {
        padding: 2rem 1rem;
        margin: 1rem;
    }
    
    .gpu-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
    
    .gpu-gallery-grid[data-columns="2"],
    .gpu-gallery-grid[data-columns="4"] {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .gpu-lightbox-prev,
    .gpu-lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .gpu-lightbox-prev {
        left: 12px;
    }
    
    .gpu-lightbox-next {
        right: 12px;
    }
    
    .gpu-lightbox-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    
    .gpu-lightbox-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }
    
    .gpu-lightbox-info {
        padding: 20px 12px 12px;
    }
    
    .gpu-lightbox-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .gpu-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .gpu-gallery-grid[data-columns="2"],
    .gpu-gallery-grid[data-columns="3"],
    .gpu-gallery-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
}

/* WordPress theme compatibility */
.gpu-upload-form .button {
    background: var(--wp--preset--color--primary, #0073aa);
    border-color: var(--wp--preset--color--primary, #0073aa);
    color: #fff;
}

.gpu-upload-form .button:hover {
    background: var(--wp--preset--color--primary-dark, #005a87);
    border-color: var(--wp--preset--color--primary-dark, #005a87);
}

.gpu-upload-form .regular-text {
    max-width: 100%;
}