/* 🦅 FORMATION STATUS WIDGET */
/* Generated by Gemini cloud worker for Treebird Hub */
/* Worker Run ID: e3cc43ff */

.formation-widget {
    background-color: #1a1612;
    color: #e8e4df;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.formation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.formation-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9a958f;
}

.agent-count.badge {
    background-color: #6b9a5b;
    color: #e8e4df;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.collapse-button {
    background: none;
    border: none;
    color: #9a958f;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.collapse-button:hover {
    color: #e8e4df;
}

.agent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.agent {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48px;
}

.agent-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.agent-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #1a1612;
}

.status-dot.online {
    background-color: #6b9a5b;
}

.status-dot.busy {
    background-color: #c9a227;
}

.status-dot.offline {
    background-color: #6b6560;
}

.agent-task {
    font-size: 9px;
    text-align: center;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    color: #9a958f;
}

/* New agent pulse animation */
.new-agent .agent-avatar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #6b9a5b;
    border-radius: 50%;
    animation: pulse 1.5s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Collapsed state */
.formation-widget.collapsed .agent-list {
    display: none;
}

.formation-widget.collapsed .formation-header {
    margin-bottom: 0;
}

.formation-widget.collapsed .formation-title {
    display: none;
}

/* Light theme */
[data-theme="light"] .formation-widget {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .status-dot {
    border-color: #ffffff;
}

[data-theme="light"] .agent-avatar img {
    border-color: rgba(0, 0, 0, 0.1);
}

/* 📱 Mobile Responsive */
@media (max-width: 768px) {
    .formation-widget {
        padding: 10px;
    }

    .agent-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 10px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .agent {
        flex-shrink: 0;
        width: 44px;
    }

    .agent-avatar {
        width: 36px;
        height: 36px;
    }

    .agent-avatar img {
        width: 36px;
        height: 36px;
    }

    .status-dot {
        width: 10px;
        height: 10px;
    }

    .agent-task {
        font-size: 8px;
    }
}