/*
 * JUSTICE APEX - AGENT CARD STYLES
 * =================================
 * Shared styles for agent cards across all pages.
 * Include this CSS along with agents-data.js
 * 
 * Usage:
 *   <link rel="stylesheet" href="/components/agent-cards.css">
 */

/* ============================================
   AGENT CARD CONTAINER
   ============================================ */
.agent-card {
    background: linear-gradient(145deg, #0d1424 0%, rgba(var(--agent-color-rgb, 0, 240, 255), 0.02) 100%);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    font-family: 'Space Grotesk', system-ui, sans-serif;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--agent-color, #00f0ff), var(--agent-color-secondary, #22c55e));
}

.agent-card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--agent-color, #00f0ff) 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

/* ============================================
   AGENT HEADER
   ============================================ */
.agent-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.agent-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--agent-color, #00f0ff), var(--agent-color-secondary, #22c55e));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 30px rgba(var(--agent-color-rgb, 0, 240, 255), 0.3);
    overflow: hidden;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.agent-emoji {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f0f4f8;
    margin-bottom: 0.25rem;
}

.agent-role {
    color: var(--agent-color, #00f0ff);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

.agent-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-status .pulse-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse-blink 1s ease-in-out infinite;
}

@keyframes pulse-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   AGENT DESCRIPTION
   ============================================ */
.agent-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   PROGRESS SECTIONS
   ============================================ */
.progress-section {
    margin-bottom: 1.25rem;
}

.progress-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.progress-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.35rem 0;
    color: #6b7280;
}

.progress-list .bullet {
    flex-shrink: 0;
    font-size: 0.75rem;
    width: 16px;
    text-align: center;
}

.progress-list .bullet.done { color: #00ff88; }
.progress-list .bullet.active { color: #00f0ff; }
.progress-list .bullet.pending { color: #6b7280; }

.progress-list .done-text { color: #c9d1d9; }
.progress-list .active-text { color: #00f0ff; }

/* ============================================
   SUB-AGENTS SECTION
   ============================================ */
.sub-agents {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-agents-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6b7280;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.sub-agents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.sub-agent {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.sub-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #c9d1d9;
}

.sub-desc {
    font-size: 0.65rem;
    color: #6b7280;
}

/* ============================================
   AGENT STATS
   ============================================ */
.agent-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.agent-stat {
    flex: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
}

.agent-stat .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--agent-color, #00f0ff);
    display: block;
}

.agent-stat .stat-label {
    font-size: 0.65rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   DUAL AGENT LAYOUT
   For pages showing 2 agents side by side
   ============================================ */
.agents-showcase {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.agents-showcase .agent-card {
    /* Full width in column layout */
}

/* Tabbed view for mobile */
.agent-tabs {
    display: none;
    margin-bottom: 1rem;
}

.agent-tab {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.agent-tab:first-child {
    border-radius: 8px 0 0 8px;
}

.agent-tab:last-child {
    border-radius: 0 8px 8px 0;
}

.agent-tab.active {
    background: var(--agent-color, #00f0ff);
    color: #000;
    border-color: var(--agent-color, #00f0ff);
}

.agent-tab-content {
    display: block;
}

.agent-tab-content.hidden {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .agent-card {
        padding: 1.5rem;
    }

    .agent-header {
        flex-direction: column;
        text-align: center;
    }

    .agent-avatar {
        margin: 0 auto;
    }

    .agent-info {
        text-align: center;
    }

    .agent-status {
        justify-content: center;
    }

    .sub-agents-grid {
        grid-template-columns: 1fr;
    }

    .agent-stats {
        flex-wrap: wrap;
    }

    .agent-stat {
        flex: 1 1 45%;
    }

    /* Show tabs on mobile */
    .agent-tabs {
        display: flex;
    }
}

@media (max-width: 480px) {
    .agent-name {
        font-size: 1.2rem;
    }

    .agent-role {
        font-size: 0.75rem;
    }

    .progress-list li {
        font-size: 0.75rem;
    }
}

/* ============================================
   COLOR VARIANTS
   Use with style="--agent-color: #xxx"
   ============================================ */

/* Jade Green */
.agent-card[data-agent="jade"] {
    --agent-color: #22c55e;
    --agent-color-secondary: #00f0ff;
}

/* Lumi Cyan */
.agent-card[data-agent="lumi"] {
    --agent-color: #00f0ff;
    --agent-color-secondary: #a855f7;
}

/* Defintel Orange */
.agent-card[data-agent="defintel"] {
    --agent-color: #ff6b35;
    --agent-color-secondary: #fbbf24;
}

/* Mira Pink */
.agent-card[data-agent="mira"] {
    --agent-color: #ec4899;
    --agent-color-secondary: #a855f7;
}

/* Atlas Blue */
.agent-card[data-agent="atlas"] {
    --agent-color: #3b82f6;
    --agent-color-secondary: #22c55e;
}

/* ============================================
   PROGRESS LINK (Compact Mode)
   ============================================ */
.agent-progress-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--agent-color, #00f0ff);
    border-radius: 8px;
    color: var(--agent-color, #00f0ff);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.agent-progress-link:hover {
    background: rgba(0, 240, 255, 0.2);
    transform: translateX(4px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

/* Apex Purple */
.agent-card[data-agent="apex"] {
    --agent-color: #a855f7;
    --agent-color-secondary: #00f0ff;
}
