/* =====================================================
   Bots List Page — Compact Liquid Glass
   ===================================================== */

/* Bots Grid */
.bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* Фильтр «Все» (только для админа) */
.bots-show-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
}
.bots-show-all-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ── Compact card overrides for list view ── */

.bots-grid .bot-card {
    padding: 14px 16px;
    min-height: auto;
}

.bots-grid .bot-card:hover {
    transform: translateY(-2px);
}

.bots-grid .bot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.bot-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bots-grid .bot-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.bots-grid .bot-username {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    margin-top: 2px;
    display: block;
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Status dot — inline with name */
.bot-status-dot.active,
.bot-status-dot.inactive {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bot-status-dot.active {
    background: var(--color-success);
    box-shadow: 0 0 6px var(--color-success);
}

.bot-status-dot.inactive {
    background: var(--color-error);
    box-shadow: 0 0 4px rgba(255, 59, 48, 0.3);
}

/* Description — compact, max 2 lines */
.bots-grid .bot-description {
    margin: 6px 0 0;
    line-height: 1.4;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row */
.bots-grid .bot-meta {
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bots-grid .bot-meta-info {
    font-size: 12px;
    color: var(--text-tertiary);
}

.bots-grid .bot-meta-users {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.bots-grid .bot-meta-users .lucide {
    width: 13px;
    height: 13px;
    color: var(--color-primary);
}

/* Action buttons — smaller for compact cards */
.bots-grid .bot-action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-spring);
}

.bots-grid .bot-action-btn .lucide {
    width: 14px;
    height: 14px;
}

.bot-action-btn.start {
    background: rgba(48, 209, 88, 0.1);
    color: var(--color-success);
}

.bot-action-btn.start:hover {
    background: var(--color-success);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(48, 209, 88, 0.3);
}

.bot-action-btn.stop {
    background: rgba(255, 59, 48, 0.1);
    color: var(--color-error);
}

.bot-action-btn.stop:hover {
    background: var(--color-error);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.bot-action-btn.more {
    background: var(--bg-glass-dark);
    color: var(--text-secondary);
}

.bot-action-btn.more:hover {
    background: var(--color-primary);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Loading state */
.loading-state {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* Modal Actions */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.modal-actions .btn {
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .page-actions {
        justify-content: center;
        margin-top: 10px;
    }

    .bots-grid,
    .loading-state {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }
}

/* Staggered card animation */
.bot-card:nth-child(1) { animation-delay: 0.03s; }
.bot-card:nth-child(2) { animation-delay: 0.06s; }
.bot-card:nth-child(3) { animation-delay: 0.09s; }
.bot-card:nth-child(4) { animation-delay: 0.12s; }
.bot-card:nth-child(5) { animation-delay: 0.15s; }
.bot-card:nth-child(6) { animation-delay: 0.18s; }
.bot-card:nth-child(7) { animation-delay: 0.21s; }
.bot-card:nth-child(8) { animation-delay: 0.24s; }
.bot-card:nth-child(9) { animation-delay: 0.27s; }

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
