/* Creatives Carousel Styles */

/* Creative Cards Styles */
.creative-video-container {
    position: relative;
    max-width: 320px;
    max-height: 180px;
    aspect-ratio: 16/9;
    border-radius: 12px 12px 0 0;
    overflow: visible; /* Allow native controls to show */
    background: var(--bg-color);
    cursor: default; /* Override any drag cursor */
}

.creative-video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--bg-color);
    object-fit: cover;
    border-radius: 12px 12px 0 0; /* Apply radius to video instead */
    cursor: default; /* Ensure video itself doesn't show drag cursor */
    transition: object-fit 0.3s cubic-bezier(0.4,0,0.2,1);
}

.creative-video.fit {
    object-fit: contain !important;
    background: #000;
}

/* Video Overlay with Main Play Button */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 5; /* Lower z-index so native controls can be on top */
    border-radius: 12px 12px 0 0;
    cursor: default; /* Override any drag cursor */
}

.video-overlay.hidden {
    display: none !important;
    pointer-events: none;
}

.main-play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--animation-fast) ease;
    position: relative;
}

.main-play-button:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.main-play-button:active {
    transform: scale(0.95);
}

.main-play-button .play-icon {
    width: 24px;
    height: 24px;
    color: var(--bg-color);
    margin-left: 3px; /* Optical alignment */
}

.main-play-button .play-icon svg {
    width: 100%;
    height: 100%;
}

/* Hide all other custom controls - native controls will show */
.creative-controls {
    display: none; /* Hide all other custom controls */
}

/* Creative Card Content */
.creative-card-content {
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--glass-border);
    border-top: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.creative-card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 4px 4px;
}

.creative-main-info {
    flex: 1;
    margin-bottom: 1.5rem;
}

.creative-title-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.creative-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.publisher-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: fit-content;
    transition: all 0.2s ease;
}

.publisher-badge:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.publisher-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.publisher-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.creative-stats {
    background: var(--gradient-primary);
    padding: 0.8rem;
    border-radius: 12px;
    margin: -0.5rem -0.5rem -0.5rem -0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.creative-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.stats-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.stats-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bg-color);
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-label {
    font-size: 0.75rem;
    color: rgba(29, 29, 32, 0.8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Disable drag cursor for creative cards */
#creativesGrid .creative-card {
    cursor: default;
}

#creativesGrid .creative-card:active {
    cursor: default;
}

/* Creative Cards Container */
#creativesGrid .game-card {
    display: flex;
    flex-direction: column;
    background: rgba(51, 51, 56, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    overflow: visible !important; /* Override games.css overflow: hidden to allow video controls */
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 400px;
}

/* Ensure native video controls are fully accessible */
.creative-video::-webkit-media-controls-panel {
    z-index: 20 !important;
}

.creative-video::-webkit-media-controls {
    z-index: 20 !important;
}

/* Make sure video controls are not clipped */
.creative-video[controls] {
    position: relative;
    z-index: 10;
    cursor: default; /* Ensure no drag cursor when controls are active */
}

/* Prevent drag cursor on video controls */
.creative-video::-webkit-media-controls,
.creative-video::-webkit-media-controls-panel {
    cursor: default !important;
}

/* Mobile Responsive Video - Simplified */
@media (max-width: 768px) {
    .main-play-button {
        width: 50px;
        height: 50px;
    }
    
    .main-play-button .play-icon {
        width: 20px;
        height: 20px;
    }/* Responsive adjustments for creative cards */
    .creative-title {
        font-size: 1.25rem;
    }
    
    .publisher-badge {
        padding: 0.375rem 0.625rem;
    }
    
    .creative-card-content {
        padding: 1rem;
    }
    
    .creative-stats {
        padding: 1rem;
    }
    
    .stats-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .creative-title {
        font-size: 1.125rem;
    }
    
    .publisher-name {
        font-size: 0.8rem;
    }
    
    .publisher-icon {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px;
        min-height: 18px;
        max-width: 18px;
        max-height: 18px;
    }
    
    .publisher-badge {
        padding: 0.25rem 0.5rem;
        gap: 0.375rem;
    }
    
    .creative-card-content {
        padding: 0.875rem;
    }
    
    .creative-stats {
        padding: 0.875rem;
    }
    
    .stats-value {
        font-size: 1.5rem;
    }
}
