/* JWT Decoder — tool-specific styles */

/* Right panel scrolls independently */
#outputPanel { overflow-y: auto; }

/* Color-coded token preview */
.token-preview {
  flex-shrink: 0;
  padding: 12px 16px;
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: 12px;
  line-height: 1.7;
  word-break: break-all;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.jwt-part-h { color: #e11d48; }
.jwt-part-p { color: #7c3aed; }
.jwt-part-s { color: #0891b2; }
.jwt-dot    { color: #94a3b8; }

/* Empty state */
.jwt-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 13px;
  padding: 32px;
  text-align: center;
}

/* Decoded sections */
#jwtDecoded {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.jwt-section {
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.jwt-section:last-child { border-bottom: none; }

/* Section headers */
.jwt-section-head {
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.jwt-section-head .copy-btn { margin-left: auto; }

.jwt-head-accent { color: #e11d48; }
.jwt-pay-accent  { color: #7c3aed; }
.jwt-sig-accent  { color: #0891b2; }

.jwt-dot-marker {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.jwt-dot-marker.h { background: #e11d48; }
.jwt-dot-marker.p { background: #7c3aed; }
.jwt-dot-marker.s { background: #0891b2; }

/* Exp badge in section header */
.exp-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.exp-valid   { background: #dcfce7; color: #16a34a; }
.exp-expired { background: #fee2e2; color: #dc2626; }

/* JSON output */
.jwt-json {
  padding: 14px 16px;
  overflow-x: auto;
}
.jwt-json pre {
  margin: 0;
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre;
  color: #1e293b;
}

/* Claim annotations */
.jwt-claims {
  border-top: 1px solid #f1f5f9;
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.claim-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  line-height: 1.6;
  flex-wrap: wrap;
}
.claim-key {
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: 11px;
  color: #7c3aed;
  min-width: 34px;
  flex-shrink: 0;
}
.claim-label {
  color: #94a3b8;
  font-size: 11px;
  min-width: 130px;
  flex-shrink: 0;
}
.claim-val { color: #1e293b; flex: 1; word-break: break-all; }
.claim-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  white-space: nowrap;
}
.claim-valid   { background: #dcfce7; color: #16a34a; }
.claim-expired { background: #fee2e2; color: #dc2626; }
.claim-notyet  { background: #fef3c7; color: #d97706; }

/* Signature section */
.jwt-sig-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sig-alg {
  display: inline-block;
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: 11px;
  font-weight: 700;
  background: #eff6ff;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
}
.sig-raw {
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: 11px;
  color: #0891b2;
  word-break: break-all;
  line-height: 1.6;
}
.sig-note {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

@media (max-width: 768px) {
  .claim-label { min-width: 100px; }
  .claim-row { gap: 6px; }
}
