/* Custom styles for Winter 2026 Photo Gallery */

/* Background with transparency overlay */
body {
    background-image: url('/static/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: -1;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Masonry grid */
.gallery-masonry {
    margin: 0 auto;
}

.gallery-masonry .grid-sizer,
.gallery-masonry .gallery-item {
    width: calc(50% - 6px);
}

@media (min-width: 640px) {
    .gallery-masonry .grid-sizer,
    .gallery-masonry .gallery-item {
        width: calc(33.333% - 8px);
    }
}

@media (min-width: 768px) {
    .gallery-masonry .grid-sizer,
    .gallery-masonry .gallery-item {
        width: calc(25% - 9px);
    }
}

@media (min-width: 1024px) {
    .gallery-masonry .grid-sizer,
    .gallery-masonry .gallery-item {
        width: calc(20% - 10px);
    }
}

@media (min-width: 1280px) {
    .gallery-masonry .grid-sizer,
    .gallery-masonry .gallery-item {
        width: calc(16.666% - 10px);
    }
}

@media (min-width: 1536px) {
    .gallery-masonry .grid-sizer,
    .gallery-masonry .gallery-item {
        width: calc(14.285% - 10px);
    }
}

/* Gallery item card styles - Padlet style */
.gallery-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    margin-bottom: 12px;
}

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

.gallery-item-media {
    position: relative;
    overflow: hidden;
}

.gallery-item-media img,
.gallery-item-media video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-media img,
.gallery-item:hover .gallery-item-media video {
    transform: scale(1.03);
}

/* Instagram-style uploader overlay */
.gallery-item-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-item-footer {
    opacity: 1;
}

.gallery-item-footer img,
.gallery-item-footer .avatar-placeholder {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.gallery-item-footer .avatar-placeholder {
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    color: white;
}

.gallery-item-footer span {
    color: white;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Comment section */
.gallery-item-comment {
    padding: 0.5rem 0.75rem;
    background: white;
}

.gallery-item-comment p {
    font-size: 0.75rem;
    color: #374151;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Upload progress bar */
.progress-bar {
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #6366f1;
    transition: width 0.3s ease;
}

/* Drag and drop active state */
.drop-zone-active {
    border-color: #6366f1 !important;
    background-color: #eef2ff !important;
}

/* Lightbox */
#lightbox {
    backdrop-filter: blur(4px);
}

/* Video play indicator */
.video-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .video-indicator {
    opacity: 1;
}

.gallery-item-media .video-indicator {
    pointer-events: none;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

