/* Container chính */
.aibio-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    /* CẬP NHẬT: Bỏ max-width và font-family để thừa hưởng từ theme */
    width: 100%; 
    margin: 0;
    color: #333;
    box-sizing: border-box; /* Đảm bảo padding không làm vỡ layout */
}

/* Biến màu sắc */
:root {
    --aibio-primary: #58c0a8; /* CẬP NHẬT: Mã màu mới */
    --aibio-primary-light: rgba(88, 192, 168, 0.15); /* Màu nền nhạt dựa trên màu chính */
    --aibio-primary-hover: #4aa38f; /* Màu hover đậm hơn chút */
}

/* CỘT TRÁI: CHAT */
.aibio-chat-col {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 600px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.aibio-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff; 
}

/* CẬP NHẬT: Avatar hình ảnh */
.aibio-avatar img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    padding: 4px;
    border-radius: 50%;
    background: var(--aibio-primary-light);
    border: 1px solid rgba(88, 192, 168, 0.2);
}

.aibio-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #2E4033;
}
.aibio-title span {
    font-size: 15px;
    color: #666;
}

.aibio-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Bong bóng chat */
.aibio-msg {
    display: flex;
    gap: 12px;
    max-width: 85%;
}
.aibio-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* Avatar nhỏ trong tin nhắn */
.aibio-msg-avatar img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: var(--aibio-primary-light);
    border-radius: 50%;
    padding: 4px;
}
/* Avatar user vẫn dùng SVG mặc định cho gọn, hoặc ẩn nếu không cần */
.aibio-msg.user .aibio-msg-avatar svg {
    width: 32px;
    height: 32px;
    color: #fff;
    background: #333;
    padding: 6px;
    border-radius: 50%;
}

.aibio-msg-content {
    background: var(--aibio-primary-light); 
    padding: 12px 16px;
    border-radius: 12px;
    border-top-left-radius: 2px;
    font-size: 14px;
    line-height: 1.8;
    color: #2E4033;
}
.aibio-msg.user .aibio-msg-content {
    background: #E0E0E0;
    border-top-left-radius: 12px;
    border-top-right-radius: 2px;
}

/* Khung nhập liệu */
.aibio-input-area {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    background: #fff;
}
.aibio-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border 0.3s;
    background: #fff;
}
.aibio-input-area input:focus {
    border-color: var(--aibio-primary);
}
.aibio-input-area button {
    background: var(--aibio-primary); /* CẬP NHẬT MÀU */
    color: white;
    border: none;
    width: 48px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.aibio-input-area button:hover {
    background: var(--aibio-primary-hover);
}
.aibio-input-area button svg {
    width: 20px;
    height: 20px;
}

/* CỘT PHẢI: SIDEBAR */
.aibio-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aibio-card {
    background: #fff;
    border: 1px solid #E0E0E0;
    padding: 20px;
    border-radius: 12px;
}

.aibio-card h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #000000;
    font-weight: 500;
}

/* Gợi ý (Chips) */
.aibio-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.aibio-chip {
    background: #fff;
    border: 1px solid #E0E0E0;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.aibio-chip:hover {
    border-color: var(--aibio-primary);
    background: var(--aibio-primary-light);
    transform: translateX(5px);
}
.aibio-chip .icon { color: var(--aibio-primary); }

/* Danh sách Capability */
.aibio-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.aibio-list li {
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    color: #555;
    line-height: 1.5;
    margin-left: 0px !important;
}
.aibio-list li .check {
    color: var(--aibio-primary);
    font-weight: bold;
    background: var(--aibio-primary-light);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0; /* Tránh méo hình tròn */
}

/* Thiết bị - CẬP NHẬT */
.sub-text {
    font-size: 12px;
    color: #888;
    margin-top: -10px;
    margin-bottom: 15px;
}
.aibio-devices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Style cho thẻ Link (a) */
.device-item {
    background: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.device-item:hover {
    border-color: var(--aibio-primary);
    color: var(--aibio-primary);
    background: var(--aibio-primary-light);
}
.d-icon { font-size: 16px; }

/* Responsive */
@media (max-width: 768px) {
    .aibio-wrapper {
        grid-template-columns: 1fr;
    }
}