/* Base64 / URL Encoder-Decoder */
#b64-tool { font-family: var(--font-main); }

.b64-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}

.b64-mode-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-main);
  border: none;
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.15s;
  border-right: 1px solid rgba(0,0,0,0.08);
}

.b64-mode-tab:last-child { border-right: none; }

.b64-mode-tab input[type="radio"] { display: none; }

.b64-mode-tab:has(input:checked),
.b64-mode-tab.active {
  background: var(--primary);
  color: #fff;
}

.b64-panels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

@media (max-width: 700px) {
  .b64-panels { grid-template-columns: 1fr; }
  .b64-swap-col { display: flex; justify-content: center; }
}

.b64-panel-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.b64-textarea {
  width: 100%;
  height: 220px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-body);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.b64-textarea:focus { outline: none; border-color: var(--primary); }
.b64-textarea[readonly] { background: #fafafa; cursor: default; }

.b64-swap-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.b64-swap-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--bg-card);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.b64-swap-btn:hover { border-color: var(--primary); color: var(--primary); }

.b64-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.b64-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-main);
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.15s;
}

.b64-btn:hover { border-color: var(--primary); color: var(--primary); }
.b64-btn--primary { background: var(--gradient-main); color: #fff; border-color: transparent; }
.b64-btn--primary:hover { opacity: 0.85; color: #fff; }
.b64-btn--secondary { background: var(--bg-body); }
.b64-btn:disabled { opacity: 0.4; cursor: default; }

.b64-status {
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 22px;
  margin-bottom: 4px;
}

.b64-status--ok    { color: #059669; }
.b64-status--error { color: #dc2626; }

.b64-stats {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.b64-file-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.b64-file-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}
