/* agent.css — www agent detail page (light-theme port of store-agent.css) */

/* ── Layout ── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { order: -1; }
}

/* Hero skeleton */
.hero-skeleton {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  margin-bottom: 1.5rem;
}

/* Skeleton animation */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
}
.skeleton-row { height: 14px; }
@keyframes skeleton-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Cards */
.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-header {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: .88rem;
}
.card-body { padding: 1rem; }

/* Tab bar */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  margin-bottom: 1rem;
  overflow-x: auto;
}
.tab-btn {
  background: none;
  border: none;
  padding: .6rem 1rem;
  font-size: .82rem;
  font-weight: 600;
  color: #5f6368;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: #1f1f1f; }
.tab-btn.active { color: #a855f7; border-bottom-color: #a855f7; }

/* Tab panes */
.tab-pane { display: none; font-size: .84rem; }
.tab-pane.active { display: block; }

/* Tab description content */
#tabDescription {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #3c4043;
}
#tabDescription p { margin-bottom: 0.85rem; }

/* Params table */
.params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  margin: .5rem 0 .75rem;
}
.params-table th {
  text-align: left;
  padding: .4rem .6rem;
  background: rgba(0,0,0,.02);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5f6368;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.params-table td {
  padding: .4rem .6rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
  vertical-align: top;
  color: #3c4043;
}
.params-table tr:last-child td { border-bottom: none; }

/* Similar agents mini card */
.similar-card {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  color: inherit;
}
.similar-card:hover { background: rgba(0,0,0,.03); }
.similar-card img {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(99,102,241,0.08);
  flex-shrink: 0;
}
.similar-card-info { flex: 1; min-width: 0; }
.similar-card-name { font-weight: 600; font-size: .9rem; }
.similar-card-dev  { font-size: .78rem; color: #5f6368; }
.similar-card-rating { font-size: .78rem; color: #5f6368; margin-top: .15rem; }

/* Hero actions panel */
.agent-detail-actions {
  border-left: 1px solid rgba(0,0,0,.08);
  padding-left: 1rem;
  min-width: 170px;
}
@media (max-width: 600px) {
  .agent-detail-actions {
    border-left: none;
    border-top: 1px solid rgba(0,0,0,.08);
    padding-left: 0;
    padding-top: .75rem;
    min-width: 0;
    width: 100%;
    align-items: flex-start !important;
  }
}

/* Version select row */
.version-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.version-row label { font-weight: 600; font-size: .9rem; white-space: nowrap; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 600;
}
.badge-neutral {
  background: rgba(0,0,0,.05);
  color: #5f6368;
  border: 1px solid rgba(0,0,0,.08);
}
.badge-primary {
  background: rgba(168,85,247,.1);
  color: #a855f7;
  border: 1px solid rgba(168,85,247,.25);
}

/* Health badges */
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .55rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 600;
  margin-left: .4rem;
  vertical-align: middle;
}
.health-badge--warned { background: rgba(245,158,11,.1); color: #d97706; border: 1px solid rgba(245,158,11,.25); }
.health-badge--disabled { background: rgba(239,68,68,.1); color: #dc2626; border: 1px solid rgba(239,68,68,.25); }

/* Suspended banner */
.agent-disabled-banner {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem 1rem;
  background: rgba(239,68,68,.06);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px;
  color: #dc2626;
  font-size: .82rem;
  line-height: 1.5;
}
.agent-disabled-banner i { margin-top: .15rem; flex-shrink: 0; }
.agent-disabled-banner code { background: rgba(239,68,68,.08); padding: .1rem .35rem; border-radius: 4px; font-size: .78rem; }

/* ── Report modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay .modal {
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 18px;
  padding: 1.5rem;
  width: 100%;
  box-shadow: 0 10px 48px rgba(0,0,0,.15);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: #1f1f1f; font-family: 'IBM Plex Sans', sans-serif; margin: 0; }
.modal-close { background: rgba(0,0,0,.05); border: none; width: 28px; height: 28px; border-radius: 8px; font-size: .9rem; cursor: pointer; color: #5f6368; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: rgba(0,0,0,.1); color: #1f1f1f; }
.modal-footer { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.25rem; }
.form-label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; color: #3c4043; }

/* Methods-at-a-glance */
.methods-glance {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: .6rem .85rem;
  border-radius: 8px;
  background: rgba(0,0,0,.015);
  border: 1px solid rgba(0,0,0,.08);
}
.methods-glance-group {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}
.methods-glance-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #5f6368;
  white-space: nowrap;
  padding-right: .15rem;
}
.methods-glance-sep {
  width: 1px;
  height: 1rem;
  background: rgba(0,0,0,.1);
  flex-shrink: 0;
}
.methods-glance-item {
  font-size: .74rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 5px;
  cursor: pointer;
  transition: filter .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  white-space: nowrap;
}
.methods-glance-item:hover { filter: brightness(.85); }
.methods-glance-item--tool     { background: rgba(168,85,247,0.1); color: #a855f7; border: 1px solid rgba(168,85,247,0.25); }
.methods-glance-item--resource { background: rgba(56,189,248,0.1); color: #0ea5e9; border: 1px solid rgba(56,189,248,0.25); }
.methods-glance-item--prompt   { background: rgba(251,146,60,0.1); color: #ea580c; border: 1px solid rgba(251,146,60,0.25); }
.methods-glance-item--skill    { background: rgba(16,185,129,0.1); color: #059669; border: 1px solid rgba(16,185,129,0.25); }

/* Function cards */
.function-card {
  background: rgba(0,0,0,.015);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: .85rem 1rem;
}

/* Buttons (www variants) */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 9999px; font-weight: 600; font-size: .85rem; cursor: pointer; border: 1px solid transparent; transition: transform .12s, background .12s; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #a855f7, #ec4899); box-shadow: 0 2px 8px -2px rgba(168,85,247,.4); border: none; }
.btn-outline { color: #3c4043; background: #fff; border: 1px solid rgba(0,0,0,.15); }
.btn-outline:hover { background: rgba(0,0,0,.03); }
.btn-ghost { color: #3c4043; background: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }

/* Filter select */
.filter-select {
  padding: .4rem .7rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  background: #fff;
  color: #1f1f1f;
  font-size: .82rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: #a855f7; box-shadow: 0 0 0 2px rgba(168,85,247,.15); }

/* State boxes */
.state-box {
  text-align: center;
  padding: 2rem 1rem;
  color: #5f6368;
}
.state-box .state-icon { font-size: 2rem; margin-bottom: .75rem; opacity: .4; }
.state-box p { margin: 0; font-size: .88rem; }
.state-box.error .state-icon { color: #dc2626; }

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1rem;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgba(0,0,0,.08);
}
.toast-success { border-left: 3px solid #10b981; }
.toast-success i { color: #10b981; }
.toast-error { border-left: 3px solid #ef4444; }
.toast-error i { color: #ef4444; }
.toast-info { border-left: 3px solid #6366f1; }
.toast-info i { color: #6366f1; }

/* Markdown body */
.markdown-body { font-size: .84rem; line-height: 1.7; color: #3c4043; }
.markdown-body a { color: #6366f1; }
