/* JSON Base64 — tool-specific styles (≤ 5KB) */
/* Only styles not covered by base.css / home.css / tool.css */

/* ── Right Panel Output ── */
.base64-output {
  font-family: var(--font-mono, 'Cascadia Code', 'Fira Code', 'Consolas', monospace);
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-all;
  overflow: auto;
  height: 100%;
  margin: 0;
}

.base64-output.error {
  color: #dc2626;
  background: #fef2f2;
  border-radius: 4px;
}

.base64-output.success {
  color: #059669;
}

/* ── Direction Toggle ── */
.direction-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.direction-btn {
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 4px;
  background: var(--bg-secondary, #f9fafb);
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  line-height: 1.5;
}

.direction-btn:hover {
  border-color: #059669;
  color: #059669;
}

.direction-btn.active {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.direction-arrow {
  font-size: 16px;
  color: #9ca3af;
  user-select: none;
  font-weight: 700;
}

/* ── Right Panel Toolbar ── */
.base64-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
  flex-shrink: 0;
}

.base64-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.base64-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Free Badge (reuse from minifier) ── */
.free-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  color: #7a5c00;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fbbf24 100%);
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
  margin-left: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  box-shadow: 0 1px 3px rgba(245,158,11,0.4);
  position: relative;
  overflow: hidden;
}
.free-badge::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
  animation: shine 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine {
  0%   { transform: translateX(-100%) skewX(-20deg); }
  20%  { transform: translateX(100%) skewX(-20deg); }
  100% { transform: translateX(100%) skewX(-20deg); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .base64-output {
    font-size: 12px;
    padding: 12px;
  }
  .base64-toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }
}
