/* ==========================================================================
   falcon77 labs — Discipline-Specific Interactive Widgets
   1. Video Editing & Color Science Timeline (design.php)
   2. Growth Telemetry & Conversion Funnel (marketing.php)
   Theme Adaptive (Light & Dark Mode)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Video Editing Timeline Showcase (design.php)
   -------------------------------------------------------------------------- */
.video-timeline-console {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1.75rem;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

.video-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 1rem;
}

.video-console-timecode {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timecode-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    background: var(--bg-color);
    padding: 0.25rem 0.65rem;
    border-radius: 3px;
    border: 1px solid var(--border-subtle);
}

.video-console-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.video-console-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 3px;
    background: var(--bg-tag);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.video-console-badge--active {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    border-color: var(--accent);
    color: var(--accent);
}

/* Timeline Multi-Track Visualizer */
.video-timeline-tracks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

.timeline-track-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.timeline-track-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: right;
    letter-spacing: 0.05em;
}

.timeline-track-bar {
    position: relative;
    height: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}

.timeline-clip {
    position: absolute;
    height: 100%;
    top: 0;
    border-radius: 2px;
    display: flex;
    align-items: center;
    padding: 0 0.6rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.clip-v3 { left: 15%; width: 55%; background: linear-gradient(90deg, #ec4899, #d946ef); }
.clip-v2 { left: 0%; width: 85%; background: linear-gradient(90deg, #a855f7, #6366f1); }
.clip-v1 { left: 0%; width: 100%; background: linear-gradient(90deg, #3b82f6, #0284c7); }
.clip-a1 { left: 0%; width: 95%; background: linear-gradient(90deg, #10b981, #059669); }

/* Playhead Needle */
.timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 45%;
    width: 2px;
    background: #ef4444;
    z-index: 10;
    pointer-events: none;
}

.timeline-playhead::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -4px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    transform: rotate(45deg);
}

/* Palette Ruler Swatches */
.design-palette-ruler {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.palette-ruler-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.palette-ruler-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.palette-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.65rem;
    background: var(--bg-color);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-main);
}

.palette-chip__color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.15);
}

/* --------------------------------------------------------------------------
   2. Growth Telemetry & Funnel Widget (marketing.php)
   -------------------------------------------------------------------------- */
.marketing-telemetry-console {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1.75rem;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.telemetry-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 1rem;
}

.telemetry-console-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 4-Stage Conversion Funnel */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.funnel-step-card {
    background: var(--bg-color);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 1.25rem 1rem;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.funnel-step-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.funnel-step-num {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    display: block;
}

.funnel-step-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.funnel-step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.funnel-step-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
}

/* Keyword Rank Simulator */
.keyword-rank-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem;
    font-size: 0.82rem;
}

.keyword-rank-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-subtle);
}

.keyword-rank-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.keyword-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

@media (max-width: 900px) {
    .funnel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .funnel-grid {
        grid-template-columns: 1fr;
    }
    .timeline-track-row {
        grid-template-columns: 1fr;
    }
    .timeline-track-label {
        text-align: left;
    }
}
