/* ai-control-center.css — AI Control Center styles
   Extends the shared dark-theme palette from style.css.
   Uses only CSS custom properties already defined in :root (style.css).
   No inline styles, no !important abuse, no @import. */

/* ---- AI Control Center root container ---- */
.aicc-root {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin-top: var(--s4);
}

/* ---- Tab bar ---- */
.aicc-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s2);
  margin-bottom: var(--s3);
}

.aicc-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px var(--s4);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}

.aicc-tab-btn:hover {
  background: var(--panel);
  color: var(--text);
}

.aicc-tab-btn.active {
  background: var(--panel);
  border-color: var(--line);
  border-bottom-color: var(--panel);
  color: var(--text);
}

/* ---- Pane wrap ---- */
.aicc-pane-wrap {
  min-width: 0;
}

.aicc-pane {
  min-width: 0;
}

.aicc-pane.hidden {
  display: none;
}

/* ---- Providers table wrapper ---- */
.aicc-providers-wrap {
  margin-top: var(--s3);
  overflow-x: auto;
}

/* ---- Add provider form section ---- */
.aicc-add-provider {
  margin-top: var(--s4);
}

/* ---- AI mode section ---- */
.aicc-mode-section {
  margin-top: var(--s4);
}

/* ---- Disk budget bar ---- */
.aicc-disk-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s3);
}

.aicc-disk-bar-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: 13px;
}

.aicc-disk-bar-label {
  min-width: 200px;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

.aicc-disk-bar-row .cc-meter {
  flex: 1;
  max-width: 320px;
  width: auto;
}

/* ---- Worker status badges already use existing badge classes ---- */

/* ---- Responsive adjustments ---- */
@media (max-width: 860px) {
  .aicc-tab-bar {
    gap: var(--s1);
  }

  .aicc-tab-btn {
    padding: 7px var(--s3);
    font-size: 12px;
  }

  .aicc-disk-bar-label {
    min-width: 120px;
  }
}

@media (max-width: 600px) {
  .aicc-tab-bar {
    flex-direction: column;
    border-bottom: none;
  }

  .aicc-tab-btn {
    border-radius: 8px;
    border: 1px solid var(--line);
  }

  .aicc-tab-btn.active {
    border-bottom-color: var(--line);
    background: #192b45;
    border-color: #2e4c74;
  }

  .aicc-disk-bar-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s1);
  }

  .aicc-disk-bar-row .cc-meter {
    max-width: 100%;
    width: 100%;
  }
}

/* Chọn camera được phép gửi khung hình ra ngoài */
.aicc-cam-all { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.aicc-cam-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 12px;
  max-height: 160px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}
.aicc-cam-list.is-muted { opacity: 0.45; }
.aicc-cam-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.aicc-cam-list.is-muted .aicc-cam-item { cursor: default; }
