/* AutoThread Module Styles */

/* --- Card Grid --- */
.at-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    padding-bottom: 2rem;
}

/* --- Channel Card --- */
.at-card {
    background: rgba(30, 41, 59, 0.4);
    /* Dark blue/slate base */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.at-card:hover {
    background: rgba(30, 41, 59, 0.7);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.at-card.active {
    background: rgba(99, 102, 241, 0.15);
    /* Indigo tint */
    border-color: #6366f1;
    /* Indigo 500 */
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.at-card.active:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: translateY(-4px);
}

/* Glow Effect for Active */
.at-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.1);
    pointer-events: none;
}

/* --- Card Content --- */
.at-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
    /* Text truncation fix */
}

.at-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #94a3b8;
    /* Slate 400 */
    transition: all 0.2s ease;
}

.at-card:hover .at-icon-box {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.at-card.active .at-icon-box {
    background: #6366f1;
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.at-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.at-channel-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.at-card.active .at-channel-name {
    color: white;
}

.at-status {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.at-card.active .at-status {
    color: #a5b4fc;
    /* Indigo 200 */
}


/* --- Modern Toggle --- */
.at-toggle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.at-toggle i {
    font-size: 12px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.at-card.active .at-toggle {
    background: #22c55e;
    /* Green 500 */
    border-color: #22c55e;
}

.at-card.active .at-toggle i {
    opacity: 1;
    transform: scale(1);
}

/* --- Empty State --- */
.at-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #94a3b8;
}

/* --- V2 List Items --- */
.at-v2-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.at-v2-item:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #6366f1;
}

.at-v2-info h5 {
    margin: 0;
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 600;
}

.at-v2-info small {
    color: #94a3b8;
}

.at-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-family: monospace;
}