/**
 * Scootercam Sunset Gallery - Frontend Styles
 * Mobile-first responsive design
 */

/* ==================== Gallery Container ==================== */
.scsg-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== Month Selector ==================== */
.scsg-month-selector {
    margin-bottom: 30px;
    text-align: center;
}

.scsg-month-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.scsg-month-dropdown {
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.scsg-month-dropdown:hover,
.scsg-month-dropdown:focus {
    border-color: #0073aa;
    outline: none;
}

/* ==================== Gallery Grid ==================== */
.scsg-gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 600px) {
    .scsg-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ==================== Sunset Cards ==================== */
.scsg-sunset-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.scsg-sunset-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.scsg-poster-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #f0f0f0;
    overflow: hidden;
}

.scsg-poster-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scsg-poster-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.scsg-poster-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.7;
}

/* Play Overlay */
.scsg-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scsg-sunset-card:hover .scsg-play-overlay {
    opacity: 1;
}

.scsg-play-icon {
    width: 64px;
    height: 64px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Card Info */
.scsg-card-info {
    padding: 15px;
}

.scsg-card-date {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.scsg-card-cameras {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.scsg-camera-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scsg-camera-ptz {
    background: #667eea;
    color: white;
}

.scsg-camera-reo {
    background: #f093fb;
    color: white;
}

.scsg-camera-amc {
    background: #4facfe;
    color: white;
}

.scsg-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-indent: -9999px;
}

/* ==================== No Results ==================== */
.scsg-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.scsg-no-results p {
    font-size: 18px;
    color: #666;
    margin: 10px 0;
}

/* ==================== Video Player Modal ==================== */
.scsg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.scsg-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.scsg-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-height: 700px) {
    .scsg-modal-content {
        margin: 20px auto;
    }
}

.scsg-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.scsg-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.scsg-player-wrapper {
    position: relative;
}

.scsg-player-title {
    color: white;
    margin: 0 0 20px 0;
    font-size: 24px;
    text-align: center;
}

/* Camera Selector */
.scsg-camera-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.scsg-camera-button {
    padding: 10px 20px;
    border: 2px solid #555;
    background: #2a2a2a;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.scsg-camera-button:hover {
    border-color: #888;
    background: #3a3a3a;
}

.scsg-camera-button.active {
    border-color: #667eea;
    background: #667eea;
}

/* Video Container */
.scsg-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: black;
    border-radius: 8px;
    overflow: hidden;
}

.scsg-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scsg-video-info {
    margin-top: 15px;
    color: #ccc;
    text-align: center;
}

.scsg-current-camera {
    font-size: 14px;
    margin: 0;
}

/* ==================== Latest Sunset Widget ==================== */
.scsg-latest-sunset {
    margin-bottom: 20px;
}

.scsg-latest-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.scsg-latest-link:hover {
    opacity: 0.9;
}

.scsg-latest-poster {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.scsg-latest-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scsg-latest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scsg-latest-link:hover .scsg-latest-overlay {
    opacity: 1;
}

.scsg-latest-play {
    width: 48px;
    height: 48px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.scsg-latest-info {
    text-align: center;
}

.scsg-latest-date {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.scsg-latest-cameras {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.scsg-latest-cta {
    display: inline-block;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
}

/* ==================== Accessibility ==================== */
.scsg-sunset-card:focus-within,
.scsg-latest-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ==================== Loading State ==================== */
.scsg-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.scsg-loading::after {
    content: '...';
    animation: scsg-dots 1.5s steps(4, end) infinite;
}

@keyframes scsg-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
