/* ========================================
   ClipperAI Clip Card Styles
   ======================================== */

/* --- Creations Tab Switcher --- */
.creations-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border: 3px solid var(--ink);
    width: fit-content;
}

.creations-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--ink);
    background: var(--paper);
    border: none;
    cursor: pointer;
    transition: all 0.1s;
    font-weight: 700;
}

.creations-tab + .creations-tab {
    border-left: 3px solid var(--ink);
}

.creations-tab:hover {
    background: var(--bg-dark);
}

.creations-tab.active {
    background: var(--ink);
    color: var(--neon-green);
}

.creations-tab.active svg {
    stroke: var(--neon-green);
}

/* Highlight thumbnail image */
.highlight-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Card Grid Container --- */
.clips-list-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

/* Desktop: grid layout */
@media (min-width: 769px) {
    .clips-list-scroll {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
}

/* --- Card Component --- */
.clip-card {
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
}

.clip-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.clip-card.clip-card-highlight {
    border-color: var(--neon-green);
    box-shadow: var(--glow-green);
}

/* Card Header */
.clip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--ink);
    color: var(--paper);
    font-size: 12px;
}

.clip-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.clip-duration {
    color: var(--neon-cyan);
}

.clip-card-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Video Preview Area */
.clip-video-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: var(--ink);
    overflow: hidden;
}

.clip-video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clip-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
}

.clip-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Hover Overlay */
.clip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.clip-video-preview:hover .clip-overlay {
    opacity: 1;
}

.play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.clip-hover-text {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Info Section */
.clip-content-info {
    padding: 16px;
    flex: 1;
}

.clip-hook {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.4;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clip-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.clip-transcript {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Actions */
.clip-card-actions {
    padding: 12px 16px;
    border-top: 3px solid var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Status States */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 0;
}

.status-dot.completed {
    background: var(--lime);
    box-shadow: var(--glow-green);
}

.status-dot.processing {
    background: var(--neon-cyan);
    animation: pulse 1.5s infinite;
}

.status-dot.failed {
    background: var(--pop);
}

/* --- Loading Spinner --- */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--ink);
    border-top-color: var(--pop);
    border-radius: 0;
    animation: spin 1s linear infinite;
    margin: 24px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
    border: 3px dashed var(--ink);
    background: var(--paper);
    font-weight: 600;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.6;
}

/* --- Score Pills --- */
.score-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-family: var(--font-heading);
    font-size: 12px;
    border: 2px solid var(--ink);
    border-radius: 0;
    letter-spacing: 0.5px;
}

.score-green { background: var(--lime); color: var(--ink); }
.score-yellow { background: var(--amber); color: var(--ink); }
.score-red { background: var(--pop); color: var(--paper); }
.score-blue { background: var(--blue); color: var(--paper); }
.score-purple { background: var(--neon-purple); color: var(--paper); }

/* --- Pagination --- */
.load-more {
    text-align: center;
    padding: 24px;
}

.load-more span {
    padding: 12px 24px;
    font-size: 16px;
}

/* --- Media Query Helper --- */
@media (max-width: 768px) {
    .clips-list-scroll {
        display: flex;
        flex-direction: column;
        gap: 16px;
        overflow-x: auto;
        padding: 16px;
        scroll-snap-type: x mandatory;
    }

    .clip-card {
        width: 100%;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
}
