/* ==========================================================================
   TRACEAI - WebMCP Live Inspector & Agent Simulator Styles
   ========================================================================== */

.webmcp-drawer {
  position: fixed;
  top: 0;
  left: -580px;
  right: auto;
  width: 560px;
  max-width: 90vw;
  height: 100vh;
  background: #1E1E2E;
  color: #CDD6F4;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-right: 1px solid #313244;
  border-left: none;
  font-family: 'Outfit', monospace, sans-serif;
}

.webmcp-drawer.open {
  left: 0;
}

.drawer-header {
  padding: 18px 24px;
  background: #181825;
  border-bottom: 1px solid #313244;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title {
  font-size: 16px;
  font-weight: 800;
  color: #CBA6F7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.standard-tag {
  background: #313244;
  color: #A6E3A1;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.btn-close-drawer {
  background: #313244;
  border: none;
  color: #CDD6F4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s ease;
}

.btn-close-drawer:hover {
  background: #45475A;
  color: #FFFFFF;
}

/* Demo Control Bar */
.demo-control-bar {
  padding: 16px 24px;
  background: #11111B;
  border-bottom: 1px solid #313244;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-run-scenario {
  background: linear-gradient(135deg, #A6E3A1 0%, #94E2D5 100%);
  color: #11111B;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(166, 227, 161, 0.3);
  transition: all 0.2s ease;
}

.btn-run-scenario:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(166, 227, 161, 0.45);
}

.btn-run-scenario:disabled,
.btn-run-scenario.running {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.demo-scenario-desc {
  font-size: 11px;
  color: #A6ADC8;
  line-height: 1.4;
}

/* Drawer Content Scroll */
.drawer-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #89B4FA;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-clear-link {
  background: none;
  border: none;
  color: #F38BA8;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}

/* Tool List Cards */
.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-item-card {
  background: #181825;
  border: 1px solid #313244;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-badge {
  background: #89B4FA;
  color: #11111B;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.tool-name {
  font-weight: 700;
  font-size: 14px;
  color: #CBA6F7;
  font-family: monospace;
}

.btn-run-tool {
  background: #313244;
  color: #CDD6F4;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-run-tool:hover {
  background: #A6E3A1;
  color: #11111B;
}

.tool-desc {
  font-size: 12px;
  color: #BAC2DE;
  line-height: 1.35;
}

/* Log Entries */
.logs-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.log-entry {
  background: #181825;
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 4px solid #89B4FA;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  animation: slideInLog 0.25s ease-out;
}

.log-entry.log-thought {
  border-left-color: #F9E2AF;
  background: #1E1E2E;
}

.log-entry.log-error {
  border-left-color: #F38BA8;
}

.log-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #A6ADC8;
}

.log-caller {
  background: #313244;
  padding: 1px 6px;
  border-radius: 3px;
  color: #89DCEB;
}

.log-duration {
  color: #A6E3A1;
  font-family: monospace;
}

.log-title {
  font-weight: 700;
  color: #FAB387;
  font-family: monospace;
  font-size: 13px;
}

.log-thought-box {
  background: rgba(249, 226, 175, 0.1);
  border: 1px solid rgba(249, 226, 175, 0.25);
  color: #F9E2AF;
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.45;
  font-style: italic;
}

.log-payloads {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.log-block pre {
  background: #11111B;
  border: 1px solid #313244;
  padding: 8px 10px;
  border-radius: 6px;
  color: #A6E3A1;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  overflow-x: auto;
  max-height: 140px;
}

.log-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #6C7086;
  font-weight: 700;
}

@keyframes slideInLog {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Google Gemini Live Connection Styles
   ========================================================================== */
.gemini-connection-card {
  background: linear-gradient(135deg, rgba(137, 180, 250, 0.08) 0%, rgba(203, 166, 247, 0.12) 100%);
  border: 1px solid rgba(203, 166, 247, 0.35);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.gemini-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gemini-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  color: #CBA6F7;
}

.gemini-sparkle {
  font-size: 16px;
  animation: pulseSparkle 2s infinite ease-in-out;
}

@keyframes pulseSparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.25) rotate(15deg); }
}

.gemini-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: #313244;
  color: #BAC2DE;
  transition: all 0.2s ease;
}

.gemini-status-pill.connected {
  background: rgba(166, 227, 161, 0.2);
  color: #A6E3A1;
  border: 1px solid rgba(166, 227, 161, 0.4);
}

.gemini-status-pill.disconnected {
  background: rgba(243, 139, 168, 0.18);
  color: #F38BA8;
  border: 1px solid rgba(243, 139, 168, 0.4);
}

.gemini-card-sub {
  font-size: 11.5px;
  color: #BAC2DE;
  line-height: 1.45;
  margin: 0;
}

.gemini-card-sub strong {
  color: #F9E2AF;
}

.gemini-inputs-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gemini-input-wrap {
  flex: 1;
  display: flex;
  background: #11111B;
  border: 1px solid #45475A;
  border-radius: 6px;
  overflow: hidden;
}

.gemini-key-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 10px;
  color: #CDD6F4;
  font-size: 12px;
  font-family: monospace;
  outline: none;
}

.gemini-key-input::placeholder {
  color: #6C7086;
}

.btn-gemini-save {
  background: #313244;
  color: #CDD6F4;
  border: none;
  border-left: 1px solid #45475A;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gemini-save:hover {
  background: #89B4FA;
  color: #11111B;
}

.gemini-model-select {
  background: #181825;
  border: 1px solid #45475A;
  color: #CDD6F4;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.gemini-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gemini-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #A6ADC8;
  cursor: pointer;
}

.gemini-toggle-label input {
  accent-color: #CBA6F7;
  cursor: pointer;
}

.btn-gemini-ask {
  background: linear-gradient(135deg, #CBA6F7 0%, #89B4FA 100%);
  color: #11111B;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(203, 166, 247, 0.25);
}

.btn-gemini-ask:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(203, 166, 247, 0.4);
}

.btn-gemini-ask:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

