/* Interactive Component Styles for Documentation */

/* Console Log Component - EXACT MATCH */
.docs-console-log {
  padding: 8px;
  font-size: 12px;
  transition: all 0.2s;
  max-width: 100%;
  border-left: 4px solid;
  margin-bottom: 2px;
  border-radius: 0;
}

.docs-console-log.error {
  border-left-color: #f87171;
  background: #fef2f2;
  color: #dc2626;
}

.docs-console-log.warn {
  border-left-color: #fbbf24;
  background: #fffbeb;
  color: #d97706;
}

.docs-console-log.info {
  border-left-color: #60a5fa;
  background: #eff6ff;
  color: #2563eb;
}

.docs-console-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  margin-bottom: 8px;
}

.docs-console-log-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.docs-console-log-id {
  background: white;
  border-radius: 4px;
  padding: 5px 10px;
  border: 1px solid #9333ea;
  font-size: 12px;
  color: #374151;
}

.docs-include-btn {
  font-size: 12px;
  white-space: nowrap;
  background: #9333ea;
  color: white;
  border: none;
  box-shadow: none;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.docs-include-btn:hover {
  background: #7e22ce;
}

.docs-include-btn.included {
  background: #10b981;
}

.docs-included-badge {
  font-size: 12px;
  background: #d1fae5;
  color: #065f46;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.docs-console-log-level {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  margin-bottom: 9px;
}

.docs-level-badge {
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
}

.docs-level-badge.error {
  background: #fecaca;
  color: #991b1b;
}

.docs-level-badge.warn {
  background: #fef08a;
  color: #92400e;
}

.docs-level-badge.info {
  background: #bfdbfe;
  color: #1e40af;
}

.docs-expand-btn {
  background: orange;
  padding: 8px 10px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.198s;
  font-size: 10px;
  color: white;
}

.docs-expand-btn:hover {
  background: #374151;
}

.docs-expand-btn span {
  color: white;
  font-size: 10px;
}

.docs-console-log-content-wrapper {
  margin-top: 4px;
  min-width: 0;
}

.docs-console-log-content {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 12px;
  word-break: break-word;
  white-space: pre-wrap;
  max-width: 100%;
  overflow: hidden;
}

.docs-console-log-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.docs-console-log-details-item {
  margin-bottom: 4px;
  font-size: 12px;
}

.docs-console-log-details-label {
  font-weight: 500;
  color: #4b5563;
}

.docs-console-log-details-value {
  margin-left: 8px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  word-break: break-all;
  max-width: 100%;
}

/* Network Request Component - EXACT MATCH */
.docs-network-request {
  padding: 8px;
  font-size: 12px;
  transition: all 0.2s;
  border-left: 4px solid #d1d5db;
  background: #f9fafb;
  margin-bottom: 2px;
  border-radius: 0;
}

.docs-network-request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.docs-network-request-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  margin-bottom: 9px;
}

.docs-method-badge {
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
}

.docs-status-badge {
  border-radius: 4px;
  padding: 5px 10px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 500;
}

.docs-status-badge.success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.docs-status-badge.error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.docs-network-request-url {
  margin-top: 8px;
}

.docs-network-request-url-box {
  background: white;
  border-radius: 4px;
  padding: 5px 10px;
  border: 1px solid #e5e7eb;
}

.docs-network-request-url-text {
  font-size: 12px;
  color: #2563eb;
  word-break: break-all;
}

.docs-network-request-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-network-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-network-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-network-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.docs-network-section-content {
  margin-left: 16px;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Tab Status Bar - EXACT MATCH */
.docs-tab-status {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 6px;
  border: 1px solid #d1cec4;
  padding: 8px 12px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  max-width: 320px;
  margin-bottom: 16px;
}

.docs-tab-status-inner {
  display: flex;
  align-items: center;
  flex-grow: 1;
  overflow: hidden;
  min-width: 0;
}

.docs-tab-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.docs-tab-status-dot.connected {
  background: #10b981;
}

.docs-tab-status-dot.disconnected {
  background: #dc2626;
}

.docs-tab-status-dot.running {
  background: #3b82f6;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.docs-tab-status-title {
  font-size: 14px;
  color: #171717;
  cursor: pointer;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.docs-tab-status-title:hover {
  color: #ff5600;
}

.docs-tab-status-refresh {
  margin-left: 8px;
  padding: 4px;
  color: #8a8574;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.docs-tab-status-refresh:hover {
  color: #525252;
  background: #e8e6e0;
}

.docs-tab-status-refresh:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 86, 0, 0.5);
}

.docs-tab-status-refresh.spinning {
  animation: spin 1s linear infinite;
}

.docs-tab-status-refresh svg {
  width: 12px;
  height: 12px;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Minimal Tool Call */
.docs-tool-call {
  border-left: 4px solid;
  border-radius: 0 6px 6px 0;
  margin: 16px 0;
  transition: all 0.3s;
}

.docs-tool-call.pending {
  border-left-color: #0969da;
  background: #f0f8ff;
}

.docs-tool-call.success {
  border-left-color: #1a7f37;
  background: #f0fff4;
}

.docs-tool-call.error {
  border-left-color: #d1242f;
  background: #fff5f5;
}

.docs-tool-call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.docs-tool-call-header:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.docs-tool-call-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-tool-call-icon {
  font-size: 14px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.docs-tool-call-name-text {
  font-size: 14px;
  font-weight: 600;
  color: #24292f;
}

.docs-tool-call-expand {
  font-size: 12px;
  color: #656d76;
}

.docs-tool-call-content {
  padding: 12px 16px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.docs-tool-call-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-tool-call-section-label {
  font-size: 12px;
  color: #656d76;
  font-weight: 500;
  margin-bottom: 8px;
}

.docs-tool-call-code {
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 16px;
  font-size: 12px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  line-height: 1.45;
  overflow-x: auto;
  color: #24292f;
}

.docs-tool-call-result {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
  font-size: 12px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  line-height: 1.45;
  color: #e6edf3;
  max-height: 256px;
  overflow-y: auto;
  overflow-x: auto;
}

/* Pre-reads Button - EXACT MATCH */
.docs-pre-reads-button {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid;
  cursor: pointer;
  margin-bottom: 16px;
}

.docs-pre-reads-button.expanded {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.docs-pre-reads-button.expanded:hover {
  background: #e5e7eb;
}

.docs-pre-reads-button:not(.expanded) {
  background: #f9fafb;
  color: #4b5563;
  border-color: #e5e7eb;
}

.docs-pre-reads-button:not(.expanded):hover {
  background: #f3f4f6;
}

.docs-pre-reads-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
}

.docs-pre-reads-button svg path {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.docs-pre-reads-badge {
  margin-left: 4px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1e40af;
}

/* Pre-reads Section */
.docs-pre-reads {
  border-top: 1px solid #e5e7eb;
  background: white;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-pre-reads-info {
  font-size: 12px;
  color: #4b5563;
  background: #f9fafb;
  padding: 8px;
  border-radius: 4px;
}

.docs-pre-reads-info strong {
  font-weight: 600;
  color: #111827;
}

.docs-pre-reads-selected-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-pre-reads-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-pre-reads-selected-title {
  font-size: 14px;
  font-weight: 500;
}

.docs-pre-reads-deselect-all {
  font-size: 12px;
  color: #2563eb;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.docs-pre-reads-deselect-all:hover {
  color: #1d4ed8;
}

.docs-pre-reads-selected-files {
  max-height: 128px;
  overflow-y: auto;
  border: 1px solid #86efac;
  background: #f0fdf4;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-pre-reads-selected-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.docs-pre-reads-selected-file:hover {
  background: #dcfce7;
}

.docs-pre-reads-selected-file input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.docs-pre-reads-selected-file-path {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  color: #24292f;
}

.docs-pre-reads-search-section {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
}

.docs-pre-reads-search-label {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
  display: block;
}

.docs-pre-reads-search-container {
  display: flex;
  gap: 8px;
}

.docs-pre-reads-search-input {
  flex: 1;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

.docs-pre-reads-search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.docs-pre-reads-search-button {
  padding: 4px 12px;
  font-size: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.docs-pre-reads-search-button:hover {
  background: #1d4ed8;
}

.docs-pre-reads-search-button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.docs-pre-reads-search-help {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.docs-pre-reads-search-help code {
  background: #f3f4f6;
  padding: 2px 4px;
  border-radius: 2px;
}

.docs-pre-reads-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-pre-reads-search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-pre-reads-search-results-title {
  font-size: 14px;
  font-weight: 500;
}

.docs-pre-reads-select-all {
  font-size: 12px;
  color: #2563eb;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.docs-pre-reads-select-all:hover {
  color: #1d4ed8;
}

.docs-pre-reads-search-results-list {
  max-height: 256px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-pre-reads-search-result-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.docs-pre-reads-search-result-file:hover {
  background: #f9fafb;
}

.docs-pre-reads-search-result-file input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.docs-pre-reads-search-result-file-path {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  color: #24292f;
}

/* New Button - EXACT MATCH */
.docs-new-button {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #dbeafe;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  margin-bottom: 16px;
}

.docs-new-button:hover {
  background: #bfdbfe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.docs-new-button svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
}

.docs-new-button svg path {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

/* Record Browser Interactions Button - EXACT MATCH */
.docs-record-button {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid;
  cursor: pointer;
  margin-bottom: 16px;
}

.docs-record-button.recording {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.docs-record-button:not(.recording) {
  background: #f5f5f5;
  color: #4b5563;
  border-color: #d1d5db;
}

.docs-record-button:not(.recording):hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.docs-record-button svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Interactive Demo Container */
.docs-interactive-demo {
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
}

.docs-interactive-demo-title {
  font-size: 14px;
  font-weight: 600;
  color: #24292f;
  margin-bottom: 12px;
}

.docs-interactive-demo-note {
  font-size: 12px;
  color: #656d76;
  margin-top: 12px;
  font-style: italic;
}

