/* css/validator.css — YAML Validator modal */

/* ── Sidebar trigger ── */
.validator-trigger {
  margin: 4px 12px 8px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #065f46, #0f766e);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  width: calc(100% - 24px);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: var(--sans);
}
.validator-trigger:hover { opacity: 0.88; }
.validator-trigger .vt-icon { font-size: 15px; }

/* ── Overlay ── */
.validator-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
}
.validator-overlay.open { display: flex; }

/* ── Modal ── */
.validator-modal {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 14px;
  width: 1060px;
  max-width: 96vw;
  height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,0.7);
}

/* ── Header ── */
.vm-header {
  padding: 16px 22px;
  border-bottom: 1px solid #21262d;
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.vm-title {
  font-size: 15px; font-weight: 700; color: #e6edf3;
  display: flex; align-items: center; gap: 9px; flex: 1;
}
.vm-title-icon { font-size: 18px; }
.vm-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 99px; transition: all 0.2s;
}
.vm-status-pill .sp-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.sp-idle    { background: #161b22; color: #484f58; border: 1px solid #21262d; }
.sp-idle    .sp-dot { background: #484f58; }
.sp-valid   { background: rgba(22,163,74,0.15); color: #4ade80; border: 1px solid rgba(22,163,74,0.3); }
.sp-valid   .sp-dot { background: #4ade80; }
.sp-error   { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.sp-error   .sp-dot { background: #f87171; }
.sp-warn    { background: rgba(234,179,8,0.15);  color: #fbbf24; border: 1px solid rgba(234,179,8,0.3); }
.sp-warn    .sp-dot { background: #fbbf24; }

.vm-close {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid #21262d; background: transparent;
  color: #8b949e; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.vm-close:hover { background: #161b22; color: #e6edf3; }

/* ── Body: 2 columns ── */
.vm-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  flex: 1; overflow: hidden; min-height: 0;
}

/* ── Left: editor ── */
.vm-editor-col {
  display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid #21262d;
}

/* Snippet bar */
.vm-snippet-bar {
  padding: 8px 14px; border-bottom: 1px solid #21262d;
  display: flex; align-items: center; gap: 7px;
  flex-shrink: 0; overflow-x: auto; background: #0d1117;
}
.vm-snippet-bar::-webkit-scrollbar { height: 0; }
.vm-snippet-label {
  font-size: 10px; font-weight: 700; color: #484f58;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.vm-snippet-btn {
  font-size: 11px; font-weight: 600;
  background: #161b22; border: 1px solid #21262d;
  color: #8b949e; border-radius: 6px; padding: 4px 10px;
  cursor: pointer; white-space: nowrap; font-family: var(--sans);
  transition: all 0.1s;
}
.vm-snippet-btn:hover,
.vm-snippet-btn.active { background: rgba(37,99,235,0.15); color: #93c5fd; border-color: rgba(37,99,235,0.4); }

/* Toolbar */
.vm-toolbar {
  padding: 8px 14px; border-bottom: 1px solid #21262d;
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.vm-tool-btn {
  font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 7px;
  cursor: pointer; transition: all 0.12s; font-family: var(--sans);
}
.vm-tool-btn.primary { background: #2563eb; color: #fff; border: none; }
.vm-tool-btn.primary:hover { background: #1d4ed8; }
.vm-tool-btn.secondary { background: #161b22; color: #8b949e; border: 1px solid #21262d; }
.vm-tool-btn.secondary:hover { background: #21262d; color: #e6edf3; }
.vm-tool-btn.danger { background: rgba(239,68,68,0.08); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.vm-tool-btn.danger:hover { background: rgba(239,68,68,0.18); }
.vm-line-count {
  margin-left: auto; font-size: 11px; color: #484f58; font-family: var(--mono);
}

/* Textarea */
.vm-editor-wrap { flex: 1; overflow: hidden; position: relative; }
.vm-textarea {
  width: 100%; height: 100%;
  background: #040810; color: #e6edf3;
  border: none; outline: none; resize: none;
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  padding: 16px 18px; tab-size: 2;
}
.vm-textarea::placeholder { color: #30363d; }
.vm-textarea::-webkit-scrollbar { width: 4px; }
.vm-textarea::-webkit-scrollbar-thumb { background: #21262d; border-radius: 99px; }

/* ── Right: results ── */
.vm-results-col {
  display: flex; flex-direction: column; overflow: hidden;
  background: #040810;
}
.vm-results-header {
  padding: 11px 16px; border-bottom: 1px solid #21262d;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.vm-results-title { font-size: 12px; font-weight: 600; color: #8b949e; }
.vm-issue-count {
  font-size: 11px; color: #484f58;
  background: #0d1117; border: 1px solid #21262d;
  border-radius: 99px; padding: 2px 9px; font-family: var(--mono);
}
.vm-issue-count b { color: #93c5fd; }

.vm-results-body {
  flex: 1; overflow-y: auto; padding: 14px;
}
.vm-results-body::-webkit-scrollbar { width: 3px; }
.vm-results-body::-webkit-scrollbar-thumb { background: #21262d; border-radius: 99px; }

/* Meta cards */
.vm-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px;
}
.vm-meta-card {
  background: #0d1117; border: 1px solid #21262d; border-radius: 7px; padding: 9px 12px;
}
.vm-meta-label { font-size: 9px; font-weight: 700; color: #484f58; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.vm-meta-value { font-size: 12.5px; font-family: var(--mono); color: #c9d1d9; font-weight: 500; word-break: break-all; }

/* Issue items */
.vm-issues-heading {
  font-size: 10px; font-weight: 700; color: #484f58;
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 9px;
}
.vm-issue {
  padding: 10px 12px; border-radius: 7px;
  margin-bottom: 7px; border-left: 3px solid; font-size: 12.5px; line-height: 1.55;
}
.vm-issue-tag {
  font-size: 9px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; margin-bottom: 3px;
}
.vm-issue.error  { background: rgba(239,68,68,0.08);  border-color: #ef4444; color: #fca5a5; }
.vm-issue.error  .vm-issue-tag  { color: #f87171; }
.vm-issue.warn   { background: rgba(234,179,8,0.08);  border-color: #eab308; color: #fde68a; }
.vm-issue.warn   .vm-issue-tag  { color: #fbbf24; }
.vm-issue.info   { background: rgba(59,130,246,0.08); border-color: #3b82f6; color: #93c5fd; }
.vm-issue.info   .vm-issue-tag  { color: #60a5fa; }

/* Valid box */
.vm-valid-box {
  background: rgba(22,163,74,0.1); border: 1px solid rgba(22,163,74,0.3);
  border-radius: 8px; padding: 14px 16px; color: #4ade80;
  font-size: 13px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}

/* Empty state */
.vm-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 200px; gap: 10px; color: #30363d; font-size: 13px; text-align: center;
}
.vm-empty-icon { font-size: 32px; opacity: 0.3; }

/* ── Footer ── */
.vm-footer {
  padding: 13px 22px; border-top: 1px solid #21262d;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; gap: 14px;
}
.vm-footer-hint { font-size: 11px; color: #484f58; }
.vm-footer-hint b { color: #8b949e; }
.vm-footer-actions { display: flex; gap: 8px; }
.vm-footer-btn {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  padding: 7px 16px; border-radius: 7px; cursor: pointer; transition: all 0.12s;
}
.vm-footer-btn.copy { background: #161b22; color: #8b949e; border: 1px solid #21262d; }
.vm-footer-btn.copy:hover { background: #21262d; color: #e6edf3; }
.vm-footer-btn.validate { background: #2563eb; color: #fff; border: none; }
.vm-footer-btn.validate:hover { background: #1d4ed8; }
