/* ============================================================
   CODE DIAGNOSIS MODAL  (diag.css)
   ============================================================ */
.chip-diag {
  background: linear-gradient(135deg, #2d1b4e, #1a3a5c) !important;
  color: #c8a8ff !important;
  border-color: #6b3fa0 !important;
}
.chip-diag:hover {
  background: linear-gradient(135deg, #6b3fa0, #1e5a8a) !important;
  color: #fff !important;
  border-color: #8b5fd0 !important;
}

.diag-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
}
.diag-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 96vw);
  max-height: 85vh;
  background: #1a1a2e;
  border: 1px solid #3d3d6b;
  border-radius: 12px;
  z-index: 201;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.diag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #12122a;
  border-bottom: 1px solid #3d3d6b;
  font-size: 1rem;
  font-weight: 600;
  color: #c8a8ff;
  flex-shrink: 0;
}
.diag-close {
  background: none; border: none;
  color: #888; cursor: pointer;
  font-size: 1.1rem; padding: 2px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.diag-close:hover { color: #fff; background: #3d3d6b; }

.diag-loading {
  display: flex; align-items: center; gap: 14px;
  padding: 44px; justify-content: center;
  color: #888; font-size: 0.95rem;
}
.diag-spinner {
  width: 26px; height: 26px;
  border: 3px solid #3d3d6b;
  border-top-color: #7c5cbf;
  border-radius: 50%;
  animation: diagSpin 0.8s linear infinite;
}
@keyframes diagSpin { to { transform: rotate(360deg); } }

.diag-content {
  flex: 1; overflow-y: auto;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.diag-section { display: flex; flex-direction: column; gap: 6px; }
.diag-section-title {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #7c5cbf;
}
.diag-text {
  background: #12122a;
  border: 1px solid #2d2d50;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.84rem;
  color: #ccc;
  white-space: pre-wrap;
  line-height: 1.6;
  font-family: 'Noto Sans KR', monospace;
}
.diag-copy-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 4px; flex-wrap: wrap; gap: 8px;
}
.diag-copy-hint { font-size: 0.76rem; color: #555; }
.diag-copy-btn {
  background: #3a2a6e; border: 1px solid #6b3fa0;
  color: #c8a8ff; border-radius: 8px;
  padding: 6px 14px; cursor: pointer; font-size: 0.84rem;
  transition: background 0.2s;
}
.diag-copy-btn:hover { background: #6b3fa0; color: #fff; }
.diag-copy-area {
  width: 100%; height: 120px;
  background: #0d0d1a; border: 1px solid #2d2d50;
  border-radius: 8px; padding: 10px;
  color: #999; font-size: 0.76rem;
  resize: vertical; font-family: monospace;
  box-sizing: border-box;
  line-height: 1.5;
}
.diag-copy-status {
  text-align: center; color: #4caf50;
  font-size: 0.85rem; font-weight: 700;
  padding: 4px 0;
}
