/* ===== COMPONENTS CSS - КОМПОНЕНТЫ ===== */

/* ===== SIDEBAR (DESKTOP) ===== */
.sidebar-agents {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 20;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.agents-section h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms;
    background: white;
    border: 1px solid #e9ecef;
    user-select: none;
}

.agent-item:hover {
    background: #f0f2f5;
    border-color: #dee2e6;
}

.agent-item.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.agent-item input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.agent-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.agent-name {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

/* ===== MESSAGES ===== */
.message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    line-height: 1.5;
    font-size: 14px;
    max-width: 90%;
}

.message.user {
    background: #e7f3ff;
    color: #0c5aa0;
    margin-left: auto;
    text-align: left;
    border-bottom-right-radius: 2px;
}

.message.agent {
    background: #f5f5f5;
    color: #333;
    margin-right: auto;
    border-left: 4px solid #667eea;
    border-bottom-left-radius: 2px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    color: #667eea;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-label {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: #8898aa;
}

.section-value {
    color: #333;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.go,
.badge.fast,
.badge.safe,
.badge.scalable,
.badge.fixable,
.badge.ready {
    background: #d4edda;
    color: #155724;
}

.badge.nogo,
.badge.slow,
.badge.vulnerable,
.badge.manual,
.badge.fatal,
.badge.blocked {
    background: #f8d7da;
    color: #721c24;
}

/* ===== PROGRESS BAR (Confidence) ===== */
.confidence-bar {
    width: 100%;
    height: 18px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 600ms ease-out;
}

.confidence-text {
    position: absolute;
    left: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* ===== CURRENCY VALUE ===== */
.currency-value {
    font-weight: 600;
    color: #667eea;
}

/* ===== DEBUG & SUMMARY BUTTONS ===== */
.debug-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    cursor: pointer;
    margin-top: auto;
    transition: all 0.3s ease;
    user-select: none;
}

.debug-toggle input {
    cursor: pointer;
}

.debug-toggle label {
    cursor: pointer;
    margin: 0;
}

#summaryBtn {
    width: 100%;
    padding: 12px;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    margin-top: 10px;
    transition: opacity 0.2s;
    display: none;
}

#summaryBtn:hover:not(:disabled) {
    background: #6a4196;
}

#summaryBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
