/**
 * FilmsPage Component Styles
 */

/* Override body overflow for films page */
body.films-view {
    overflow-y: auto !important;
    height: auto !important;
}

/* Films Page Container */
.films-page {
    min-height: 100vh;
    width: 100%;
    background: #000000;
    padding-top: 5rem;
}

/* Header */
.films-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Sort Controls */
.films-controls {
    display: flex;
    justify-content: flex-end;
    padding: 0 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .films-controls {
        max-width: calc(100vw - 8rem);
    }
}

@media (min-width: 1728px) {
    .films-controls {
        max-width: 1600px;
    }
}

.films-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.films-sort label {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6b7280;
}

.films-sort select {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: transparent;
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    outline: none;
}

.films-sort select:hover {
    border-color: #6b7280;
}

.films-sort select:focus {
    border-color: #ffffff;
}

.films-sort select option {
    background: #111;
    color: #ffffff;
}

.films-upload-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
    font-family: system-ui, -apple-system, sans-serif;
}

.films-upload-link:hover {
    background: #2563eb;
}

/* Video Grid - single column, scales with viewport */
.films-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 1rem 4rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Scale up on larger screens */
@media (min-width: 1200px) {
    .films-grid {
        max-width: calc(100vw - 8rem);
    }
}

@media (min-width: 1728px) {
    .films-grid {
        max-width: 1600px;
    }
}

/* Individual Film Item */
.film-item {
    position: relative;
}

/* Video Container */
.film-video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #111;
}

.film-video-container stream,
.film-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Processing State */
.film-processing {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #666;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Film Info */
.film-info {
    padding: 1rem 0;
}

.film-title {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.film-date {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    color: #6b7280;
    margin: 0;
}

/* Delete Button (Admin) */
.film-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
}

.film-item:hover .film-delete-btn {
    opacity: 1;
}

.film-delete-btn svg {
    width: 20px;
    height: 20px;
    stroke: #dc2626;
    stroke-width: 2;
    fill: none;
}

.film-delete-btn:hover svg {
    stroke: #b91c1c;
}

/* Empty State */
.films-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Error State */
.films-error {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Responsive - smaller padding on mobile */
@media (max-width: 768px) {
    .films-controls {
        padding: 0 1rem 1rem;
    }

    .films-grid {
        padding: 1rem 1rem 3rem;
        gap: 2rem;
    }

    .films-header {
        padding: 1.5rem 1rem;
    }
}
