/* Media-specific styles - kept separate for better organization */

/* Mobile-optimized photo grids */
@media (max-width: 768px) {
    .media-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
    }
    
    .media-card {
        border-radius: 8px;
        overflow: hidden;
        min-height: 140px;
    }
    
    .media-thumbnail {
        width: 100%;
        height: 140px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .media-info {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .media-title {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }
    
    /* Photo detail view mobile optimization */
    .photo-detail-container {
        flex-direction: column;
    }
    
    .photo-main {
        width: 100% !important;
        margin-bottom: 1rem;
    }
    
    .photo-sidebar {
        width: 100% !important;
    }
    
    .photo-image {
        max-height: 60vh;
        width: 100%;
        object-fit: contain;
    }
    
    /* Gallery view adjustments */
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.25rem !important;
    }
    
    .gallery-item {
        aspect-ratio: 1;
        border-radius: 4px;
        overflow: hidden;
    }
    
    .gallery-thumbnail {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .media-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.25rem !important;
        padding: 0.25rem !important;
    }
    
    .media-card {
        min-height: 120px;
    }
    
    .media-thumbnail {
        height: 120px;
        border-radius: 6px;
    }
    
    .media-info {
        padding: 0.375rem;
        font-size: 0.8rem;
    }
    
    .media-title {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    /* Very small screens - single column for complex content */
    .photo-detail-container {
        padding: 0.5rem;
    }
    
    .photo-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .photo-actions .btn {
        width: 100%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .media-card {
        cursor: default;
    }
    
    .media-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .media-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .favorite-btn {
        width: 44px;
        height: 44px;
        top: 4px;
        right: 4px;
    }
    
    .favorite-btn i {
        font-size: 24px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .main-content {
        margin-top: 48px;
    }
    
    .app-bar {
        height: 48px;
    }
    
    .toolbar-spacer {
        min-height: 48px;
    }
    
    .media-container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .photo-image {
        max-height: 50vh;
    }
}

.media-checkbox:disabled {
    opacity: 0.5;
}

.media-placeholder {
    height: 200px;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-player {
    width: 100%;
}
