/* HAR Documentation Specific Styles */

/* Header Actions */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-primary {
  padding: 10px 20px;
  background: #238636;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #2ea043;
}

.btn-secondary {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

/* Upload Zone */
.upload-zone {
  margin: 40px 0;
  padding: 60px 40px;
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-zone:hover {
  border-color: #58a6ff;
  background: var(--bg-tertiary);
}

.upload-zone.drag-over {
  border-color: #238636;
  background: rgba(35, 134, 54, 0.1);
}

.upload-icon {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.upload-icon svg {
  width: 64px;
  height: 64px;
}

.upload-zone h2 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.upload-zone p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 80px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 3px solid var(--border);
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-state p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Main Layout (Three Column) */
.main-layout {
  display: grid;
  grid-template-columns: 250px 400px 1fr;
  gap: 20px;
  margin-top: 20px;
  height: calc(100vh - 200px);
}

/* Sidebar (Base URLs) */
.sidebar {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.count-badge {
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-primary);
}

.base-url-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.base-url-item {
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  word-break: break-all;
  font-size: 12px;
}

.base-url-item:hover {
  background: var(--bg-hover);
  border-color: #58a6ff;
}

.base-url-item.active {
  background: var(--bg-hover);
  border-color: #58a6ff;
}

.base-url-item .url-text {
  color: var(--text-primary);
  margin-bottom: 4px;
}

.base-url-item .endpoint-count {
  color: var(--text-secondary);
  font-size: 11px;
}

/* Endpoint List */
.endpoint-list {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
  overflow-y: auto;
}

.endpoint-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.endpoint-list-header h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.export-actions {
  display: flex;
  gap: 8px;
}

.btn-export {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-export:hover {
  background: #238636;
  border-color: #238636;
}

.endpoint-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.endpoint-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.endpoint-card:hover {
  border-color: #58a6ff;
  background: var(--bg-hover);
}

.endpoint-card.active {
  border-color: #58a6ff;
  background: var(--bg-hover);
}

.endpoint-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.endpoint-card .method-badge {
  font-size: 10px;
  padding: 3px 6px;
}

.endpoint-card .status-badge {
  font-size: 10px;
  padding: 3px 6px;
}

.endpoint-path {
  color: var(--text-primary);
  font-size: 13px;
  word-break: break-all;
}

.endpoint-timestamp {
  color: var(--text-secondary);
  font-size: 11px;
  margin-top: 4px;
}

/* Detail Panel */
.detail-panel-container {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.detail-panel-har {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
}

.detail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-align: center;
}

.detail-header-har {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-header-har h2 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-url {
  color: var(--text-secondary);
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-tab:hover {
  color: var(--text-primary);
}

.detail-tab.active {
  color: var(--text-primary);
  border-bottom-color: #58a6ff;
}

.detail-tab-content {
  display: none;
}

.detail-tab-content.active {
  display: block;
}

.detail-section-har {
  margin-bottom: 20px;
}

.detail-section-har h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.detail-section-har pre {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  font-size: 12px;
  max-height: 400px;
}

.detail-section-har pre code {
  color: var(--text-primary);
}

.curl-command {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--bg-hover);
}

.copy-btn.copied {
  background: #238636;
  border-color: #238636;
}

.query-params, .headers-list {
  list-style: none;
  padding: 0;
}

.query-param, .header-item {
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}

.query-param .param-name, .header-item .header-name {
  color: #58a6ff;
  font-weight: 500;
}

.query-param .param-value, .header-item .header-value {
  color: var(--text-primary);
  word-break: break-all;
}

/* Empty State */
.empty-state-har {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state-har h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

/* Filter Bar */
.filter-bar {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-search {
  position: relative;
  width: 100%;
}

.filter-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.filter-search input:focus {
  outline: none;
  border-color: #58a6ff;
  background: var(--bg-tertiary);
}

.filter-search input::placeholder {
  color: var(--text-secondary);
}

.filter-pills {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  min-width: 50px;
  letter-spacing: 0.5px;
}

.pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 5px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  background: var(--bg-hover);
  border-color: #58a6ff;
}

.filter-pill.active {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #ffffff;
}

.filter-pill.method-get.active { background: #238636; border-color: #238636; }
.filter-pill.method-post.active { background: #1f6feb; border-color: #1f6feb; }
.filter-pill.method-put.active { background: #bc4c00; border-color: #bc4c00; }
.filter-pill.method-delete.active { background: #da3633; border-color: #da3633; }
.filter-pill.method-patch.active { background: #8250df; border-color: #8250df; }

.filter-pill.status-success.active { background: #238636; border-color: #238636; }
.filter-pill.status-redirect.active { background: #0969da; border-color: #0969da; }
.filter-pill.status-client-error.active { background: #d29922; border-color: #d29922; }
.filter-pill.status-server-error.active { background: #da3633; border-color: #da3633; }

.filter-results {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.filter-count {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn-clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-filters:hover {
  background: var(--bg-hover);
  color: #da3633;
  border-color: #da3633;
}

@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .filter-group label { min-width: auto; }
  .filter-results {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 200px 350px 1fr;
  }
}

@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar, .endpoint-list, .detail-panel-container {
    max-height: 500px;
  }
}

@media (max-width: 768px) {
  .upload-zone {
    padding: 40px 20px;
  }

  .endpoint-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ========================================
   Quick Actions Panel
   ======================================== */
.quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-action-btn:hover {
  background: var(--bg-hover);
  border-color: #58a6ff;
}

.quick-action-btn svg {
  width: 14px;
  height: 14px;
}

.quick-action-btn.replay-btn {
  background: #238636;
  border-color: #238636;
}

.quick-action-btn.replay-btn:hover {
  background: #2ea043;
  border-color: #2ea043;
}

.quick-action-btn.variables-btn.active {
  background: #58a6ff;
  border-color: #58a6ff;
}

/* ========================================
   Variables Panel (Slide-in)
   ======================================== */
.variables-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.variables-panel.open {
  right: 0;
}

.variables-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.variables-panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.variables-panel-close {
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.variables-panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.variables-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.variable-group {
  margin-bottom: 20px;
}

.variable-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.variable-type-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.variable-type-indicator.bearer-token { background: #a371f7; }
.variable-type-indicator.api-key { background: #58a6ff; }
.variable-type-indicator.session-id { background: #3fb950; }
.variable-type-indicator.uuid { background: #e3b341; }

.variable-group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.variable-group-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
}

.variable-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}

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

.variable-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.variable-name-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  width: 120px;
}

.variable-name-input:focus {
  outline: none;
  border-color: #58a6ff;
}

.variable-value {
  font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 8px;
  border-radius: 4px;
  word-break: break-all;
  max-height: 60px;
  overflow-y: auto;
}

.variable-occurrences {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.variable-occurrences-title {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.variable-occurrence {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: var(--bg-secondary);
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s;
}

.variable-occurrence:hover {
  background: var(--bg-hover);
}

.variable-occurrence .method-badge {
  font-size: 9px;
  padding: 2px 4px;
}

.variable-occurrence-path {
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variable-occurrence-location {
  color: var(--text-secondary);
  font-size: 10px;
}

.no-variables {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.no-variables svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ========================================
   Variable Highlighting in Code
   ======================================== */
.var-highlight {
  padding: 1px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.var-highlight:hover {
  filter: brightness(1.2);
}

.var-highlight.bearer-token {
  background: rgba(163, 113, 247, 0.3);
  border: 1px solid #a371f7;
  color: #a371f7;
}

.var-highlight.api-key {
  background: rgba(88, 166, 255, 0.3);
  border: 1px solid #58a6ff;
  color: #58a6ff;
}

.var-highlight.session-id {
  background: rgba(63, 185, 80, 0.3);
  border: 1px solid #3fb950;
  color: #3fb950;
}

.var-highlight.uuid {
  background: rgba(227, 179, 65, 0.3);
  border: 1px solid #e3b341;
  color: #e3b341;
}

/* ========================================
   Replay Modal
   ======================================== */
.replay-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.replay-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.replay-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.replay-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.replay-modal-close {
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.replay-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.replay-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.replay-form-group {
  margin-bottom: 16px;
}

.replay-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.replay-form-row {
  display: flex;
  gap: 12px;
}

.replay-form-row .replay-method-select {
  width: 120px;
}

.replay-form-row .replay-url-input {
  flex: 1;
}

.replay-method-select,
.replay-url-input,
.replay-textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  width: 100%;
}

.replay-textarea {
  font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
  font-size: 12px;
  min-height: 120px;
  resize: vertical;
}

.replay-method-select:focus,
.replay-url-input:focus,
.replay-textarea:focus {
  outline: none;
  border-color: #58a6ff;
}

.replay-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.btn-replay-cancel {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-replay-cancel:hover {
  background: var(--bg-hover);
}

.btn-replay-send {
  padding: 10px 20px;
  background: #238636;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-replay-send:hover {
  background: #2ea043;
}

.btn-replay-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-replay-send .spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ========================================
   Replay Response / Diff View
   ======================================== */
.replay-response {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.replay-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.replay-response-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.replay-timing {
  font-size: 12px;
  color: var(--text-secondary);
}

.replay-status-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.replay-status-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  flex: 1;
}

.replay-status-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.replay-status-value {
  font-size: 16px;
  font-weight: 600;
}

.replay-status-value.status-match {
  color: #3fb950;
}

.replay-status-value.status-mismatch {
  color: #da3633;
}

.diff-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.diff-panel {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.diff-panel-header {
  background: var(--bg-tertiary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.diff-panel-content {
  padding: 12px;
  max-height: 300px;
  overflow: auto;
}

.diff-panel-content pre {
  margin: 0;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
}

.diff-added {
  background: rgba(63, 185, 80, 0.2);
  color: #3fb950;
}

.diff-removed {
  background: rgba(218, 54, 51, 0.2);
  color: #da3633;
}

/* ========================================
   Token Warning Banner
   ======================================== */
.token-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(210, 153, 34, 0.15);
  border: 1px solid #d29922;
  border-radius: 6px;
  margin-bottom: 16px;
}

.token-warning svg {
  width: 20px;
  height: 20px;
  color: #d29922;
  flex-shrink: 0;
}

.token-warning-text {
  font-size: 13px;
  color: #d29922;
}

.token-warning-text strong {
  font-weight: 600;
}

/* ========================================
   Variables Toggle Button in Header
   ======================================== */
.btn-variables-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-variables-toggle:hover {
  background: var(--bg-hover);
  border-color: #58a6ff;
}

.btn-variables-toggle.active {
  background: #58a6ff;
  border-color: #58a6ff;
  color: #fff;
}

.btn-variables-toggle svg {
  width: 16px;
  height: 16px;
}

.variables-count-badge {
  background: rgba(255,255,255,0.2);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.btn-variables-toggle:not(.active) .variables-count-badge {
  background: var(--bg-hover);
}

/* Panel overlay for mobile */
.variables-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.variables-panel-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Copy Feedback
   ======================================== */
.copy-feedback {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #238636;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.3s ease;
  z-index: 1002;
}

.copy-feedback svg {
  width: 18px;
  height: 18px;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 992px) {
  .variables-panel {
    width: 100%;
    right: -100%;
  }

  .diff-view {
    grid-template-columns: 1fr;
  }

  .replay-modal-content {
    width: 95%;
    max-height: 95vh;
  }
}

@media (max-width: 768px) {
  .quick-actions {
    flex-direction: column;
  }

  .quick-action-btn {
    width: 100%;
    justify-content: center;
  }

  .replay-form-row {
    flex-direction: column;
  }

  .replay-form-row .replay-method-select {
    width: 100%;
  }
}

/* ========================================
   Mock Server Generator Styles
   ======================================== */

/* Mock Server Button */
.btn-mock-server {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.btn-mock-server:hover {
  background: #8250df;
  border-color: #8250df;
  color: #fff;
}

/* Mock Loading Overlay */
.mock-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.mock-loading-content {
  text-align: center;
  color: #fff;
}

.mock-loading-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #8250df;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.mock-loading-content p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Mock Modal */
.mock-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
}

.mock-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.mock-modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

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

.mock-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.mock-success-icon {
  width: 40px;
  height: 40px;
  background: #238636;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-success-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.mock-modal-header h3 {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.mock-modal-close {
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.mock-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mock-modal-body {
  padding: 24px;
}

.mock-modal-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.mock-url-section {
  margin-bottom: 20px;
}

.mock-url-section label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.mock-url-input-group {
  display: flex;
  gap: 8px;
}

.mock-url-input {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
  font-size: 13px;
}

.mock-url-input:focus {
  outline: none;
  border-color: #8250df;
}

.btn-copy-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #8250df;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy-url:hover {
  background: #9966e0;
}

.btn-copy-url.copied {
  background: #238636;
}

.btn-copy-url svg {
  flex-shrink: 0;
}

/* Mock Stats */
.mock-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.mock-stat {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.mock-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #8250df;
  margin-bottom: 4px;
}

.mock-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Mock Example */
.mock-example {
  margin-bottom: 4px;
}

.mock-example label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.mock-example pre {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  margin: 0;
  overflow-x: auto;
}

.mock-example code {
  font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
  font-size: 12px;
  color: var(--text-primary);
}

/* Mock Modal Footer */
.mock-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
  display: flex;
  justify-content: flex-end;
}

.btn-mock-close {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mock-close:hover {
  background: var(--bg-hover);
}

/* Responsive Mock Modal */
@media (max-width: 600px) {
  .mock-modal-content {
    width: 95%;
  }

  .mock-url-input-group {
    flex-direction: column;
  }

  .btn-copy-url {
    width: 100%;
    justify-content: center;
  }

  .mock-stats {
    flex-direction: column;
    gap: 12px;
  }
}
