/* ===================================
   GigSoul Agent Depot — Page Styles
   Matches theme.css: obsidian/amber/teal palette
   =================================== */

/* ── Layout containers ─────────────────────────────────── */
.depot-page { padding-bottom: 80px; }

.depot-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ─────────────────────────────────────────────── */
.depot-hero {
  padding: 72px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.depot-badge {
  display: inline-block;
  background: var(--amber-glow);
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.depot-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.depot-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ── Search ──────────────────────────────────────────── */
.depot-search {
  display: flex;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}

.search-wrap {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.depot-search-input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s;
}

.depot-search-input:focus {
  border-color: var(--amber);
}

.depot-search-input::placeholder { color: var(--text-faint); }

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-btn {
  padding: 12px 20px;
  background: var(--amber);
  color: var(--obsidian);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
}

.search-btn:hover { background: var(--amber-dim); }

/* ── Main layout: sidebar + main ─────────────────────── */
.depot-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding-top: 40px;
}

@media (max-width: 768px) {
  .depot-layout { grid-template-columns: 1fr; gap: 24px; }
  .depot-sidebar { display: none; }
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 32px;
}

.category-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.category-link:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.category-link.active {
  background: var(--amber-glow);
  color: var(--amber);
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-all { background: var(--text-muted); }
.category-link.active .cat-dot { background: var(--amber); }

.cat-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-faint);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 10px;
}

.how-it-works {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.how-it-works h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.how-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: steps;
}

.how-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  counter-increment: steps;
}

.how-steps li::before {
  content: counter(steps);
  width: 20px;
  height: 20px;
  background: var(--amber-glow);
  color: var(--amber);
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Results bar ─────────────────────────────────────── */
.depot-results-bar {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Category sections ────────────────────────────────── */
.agent-section { margin-bottom: 48px; }

.section-header { margin-bottom: 20px; }

.section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.section-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text);
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Agent grid ───────────────────────────────────────── */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Agent card ───────────────────────────────────────── */
.agent-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.agent-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.depot-api-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.depot-api-note a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.depot-api-note a:hover { opacity: 0.75; }

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.agent-price-badge {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--amber);
  font-family: var(--font-display);
}

.agent-category-tag {
  font-size: 0.6875rem;
  color: var(--text-muted);
  background: var(--surface-raised);
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.agent-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.agent-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.agent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.agent-call-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber);
}

/* ── Empty state ──────────────────────────────────────── */
.depot-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}

.depot-empty p { margin-bottom: 16px; }

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

/* ── Agent detail page ────────────────────────────────── */
.agent-page { padding-bottom: 80px; }

.agent-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 0.8125rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--amber); }
.breadcrumb-sep { color: var(--text-faint); }
.breadcrumb span:last-child { color: var(--text); }

.agent-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .agent-layout { grid-template-columns: 1fr; }
}

/* ── Agent info ───────────────────────────────────────── */
.agent-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.agent-price-lg {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--amber);
}

.price-per {
  font-size: 1rem;
  color: var(--text-muted);
  align-self: flex-end;
  margin-bottom: 4px;
}

.agent-method-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--surface-raised);
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 4px;
  padding: 3px 8px;
}

.agent-title-lg {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.agent-role-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 24px;
}

.agent-full-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 32px;
}

.agent-params-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
}

.params-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.params-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.params-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.params-list li:last-child { border-bottom: none; }

.param-name { color: var(--text); }
.param-optional {
  font-size: 0.6875rem;
  color: var(--text-faint);
  background: var(--surface-raised);
  padding: 2px 6px;
  border-radius: 4px;
}

.agent-how {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
}

.agent-how h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.how-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--surface-raised);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.flow-num {
  width: 20px;
  height: 20px;
  background: var(--amber-glow);
  color: var(--amber);
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-arrow {
  color: var(--text-faint);
  font-size: 1.25rem;
}

.payment-note {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.back-link:hover { color: var(--amber); }

/* ── Call panel ───────────────────────────────────────── */
.agent-call-panel {
  position: sticky;
  top: 80px;
}

.call-panel-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.call-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

/* ── Form ─────────────────────────────────────────────── */
.agent-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.required-star { color: var(--amber); margin-left: 2px; }
.optional-tag {
  font-size: 0.6875rem;
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 4px;
  background: var(--surface-raised);
  padding: 1px 5px;
  border-radius: 4px;
}

.form-input {
  padding: 10px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus { border-color: var(--amber); }
.form-input::placeholder { color: var(--text-faint); }

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.no-inputs-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Payment summary ──────────────────────────────────── */
.payment-summary {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 3px 0;
}

.payment-amount { font-weight: 600; color: var(--text); }

.payment-network { border-top: 1px solid var(--border-subtle); margin-top: 4px; padding-top: 8px; }

.payment-total {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 700;
  color: var(--amber);
}

/* ── Wallet connect ───────────────────────────────────── */
.wallet-connect-section {
  padding: 14px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius);
}

.wallet-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.btn-connect-wallet {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-connect-wallet:hover { background: #2563eb; }
.btn-connect-wallet.wallet-ready { background: #16a34a; }

.wallet-hint {
  font-size: 0.6875rem;
  color: var(--text-faint);
  margin-top: 8px;
}

.wallet-hint a { color: var(--teal); }

/* ── Call button ──────────────────────────────────────── */
.btn-call-agent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--amber);
  color: var(--obsidian);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-call-agent:not(:disabled):hover { background: var(--amber-dim); }
.btn-call-agent:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-loading {
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result section ───────────────────────────────────── */
.result-section {
  margin-top: 16px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.result-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal);
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 5px 10px;
  cursor: pointer;
}

.btn-copy:hover { border-color: var(--amber); color: var(--amber); }

.result-content {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.875rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.7;
}

/* ── Error section ────────────────────────────────────── */
.error-section { margin-top: 16px; }

.error-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 16px;
}

.error-box h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f87171;
  margin-bottom: 6px;
}

.error-box p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn-retry {
  background: none;
  border: 1px solid #f87171;
  border-radius: var(--radius);
  color: #f87171;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
}

.btn-retry:hover { background: rgba(239, 68, 68, 0.1); }