.context-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

.additional-metrics-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.metric-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.metric-checkbox-label:hover {
  background: #f6f8fa;
}

.metric-checkbox-label input[type="checkbox"] {
  cursor: pointer;
}

.metric-checkbox-label input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.metric-checkbox-label span {
  font-size: 13px;
  color: #24292e;
  user-select: none;
}

.context-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px 11px 16px;
  border-bottom: 1px solid #e1e4e8;
  background: #f6f8fa;
}

.context-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #24292e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-panel-close-btn {
  padding: 4px 8px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #57606a;
  font-size: 16px;
  transition: all 0.2s;
}

.context-panel-close-btn:hover {
  background: #e1e4e8;
  color: #24292e;
}

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

.context-section {
  margin-bottom: 24px;
}

.context-section:last-child {
  margin-bottom: 0;
}

.context-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #57606a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

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

.context-form-group:last-child {
  margin-bottom: 0;
}

.context-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #24292e;
  margin-bottom: 6px;
}

.context-form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  font-size: 13px;
  color: #24292e;
  background: #ffffff;
  transition: all 0.2s;
}

.context-form-input:hover {
  border-color: #d0d7de;
}

.context-form-input:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.context-form-input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 4px;
  cursor: pointer;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
}

.context-form-input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.context-form-input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.context-form-input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 4px;
}

.context-form-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  font-size: 13px;
  color: #24292e;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.context-form-select:hover {
  border-color: #d0d7de;
}

.context-form-select:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.context-form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  font-size: 13px;
  color: #24292e;
  background: #ffffff;
  transition: all 0.2s;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.context-form-textarea:hover {
  border-color: #d0d7de;
}

.context-form-textarea:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.context-form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.context-form-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #0969da;
}

.context-form-checkbox label {
  font-size: 13px;
  color: #24292e;
  cursor: pointer;
}

.context-filter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.context-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  font-size: 12px;
}

.context-filter-item-text {
  flex: 1;
  color: #24292e;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-filter-item-remove {
  padding: 2px 6px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #57606a;
  font-size: 14px;
  transition: all 0.2s;
}

.context-filter-item-remove:hover {
  background: #e1e4e8;
  color: #dc3545;
}

.context-add-filter-btn {
  width: 100%;
  padding: 6px 12px;
  border: 1px dashed #e1e4e8;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: #57606a;
  margin-top: 8px;
}

.context-add-filter-btn:hover {
  border-color: #0969da;
  color: #0969da;
  background: #f0f7ff;
}

.context-color-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.context-color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #e1e4e8;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.context-color-swatch:hover {
  border-color: #24292e;
  transform: scale(1.1);
}

.context-color-swatch.active {
  border-color: #0969da;
  border-width: 3px;
}

.context-panel-footer {
  border-top: 1px solid #e1e4e8;
  padding: 16px;
  display: flex;
  gap: 8px;
}

.context-footer-btn {
  flex: 1;
  padding: 8px 16px;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #24292e;
}

.context-footer-btn:hover {
  background: #f6f8fa;
  border-color: #d0d7de;
}

.context-footer-btn.primary {
  background: #0969da;
  color: #ffffff;
  border-color: #0969da;
}

.context-footer-btn.primary:hover {
  background: #0860ca;
}

.context-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f6f8fa;
}

.context-info-row:last-child {
  border-bottom: none;
}

.context-info-label {
  font-size: 12px;
  color: #57606a;
}

.context-info-value {
  font-size: 13px;
  font-weight: 500;
  color: #24292e;
}

.context-action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.context-action-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #24292e;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-action-btn:hover {
  background: #f6f8fa;
  border-color: #d0d7de;
}

.context-action-btn.danger {
  color: #dc3545;
}

.context-action-btn.danger:hover {
  background: #fff1f0;
  border-color: #dc3545;
}

.context-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.context-empty-icon {
  font-size: 48px;
  color: #d0d7de;
  margin-bottom: 12px;
}

.context-empty-text {
  font-size: 13px;
  color: #57606a;
  line-height: 1.5;
}

.context-slider-group {
  margin-top: 8px;
}

.context-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e1e4e8;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.context-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0969da;
  cursor: pointer;
  transition: all 0.2s;
}

.context-slider::-webkit-slider-thumb:hover {
  background: #0860ca;
  transform: scale(1.2);
}

.context-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0969da;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.context-slider::-moz-range-thumb:hover {
  background: #0860ca;
  transform: scale(1.2);
}

.context-slider-value {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #57606a;
  margin-top: 4px;
}
