/* ============================================================
   NOVAUTILS — tools/base64-encoder/base64-encoder.css
   ============================================================ */

.b64-layout { display: flex; flex-direction: column; gap: 14px; }

/* ── Mode toggle ── */
.b64-mode-wrap {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
}
.b64-mode-group { display: flex; gap: 6px; flex-wrap: wrap; }
.b64-mode-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-dim); font-family: var(--font-head);
  font-size: 0.82rem; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s;
}
.b64-mode-btn:hover { border-color: var(--border2); color: var(--text); }
.b64-mode-btn.active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(79,140,255,0.25);
}

/* Status */
.b64-status { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-dim); font-weight: 600; }
.b64-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dimmer); flex-shrink: 0; }
.b64-status-dot.ok      { background: var(--green);  box-shadow: 0 0 6px var(--green); }
.b64-status-dot.error   { background: var(--red);    box-shadow: 0 0 6px var(--red); }
.b64-status-dot.ready   { background: var(--text-dimmer); }

/* ── Editors ── */
.b64-editors {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0; align-items: stretch; min-height: 320px;
}
.b64-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden;
}
.b64-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.b64-panel-title { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.b64-panel-actions { display: flex; align-items: center; gap: 8px; }
.b64-char-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dimmer); }

.b64-icon-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 5px; color: var(--text-dim);
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.b64-icon-btn:hover { color: var(--text); border-color: var(--border2); }
.b64-icon-btn.copied { color: var(--green); border-color: rgba(54,211,153,0.4); }

.b64-editor {
  flex: 1; resize: none; width: 100%;
  background: var(--bg); border: none; outline: none;
  color: var(--text); font-family: var(--font-mono);
  font-size: 0.82rem; line-height: 1.7; padding: 16px;
}
.b64-editor::placeholder { color: var(--text-dimmer); }
.b64-output-editor { color: var(--blue); cursor: default; }

/* Swap button column */
.b64-swap-col {
  display: flex; align-items: center; justify-content: center;
}
.b64-swap-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 50%; color: var(--text-dim); cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.3s;
}
.b64-swap-btn:hover { color: var(--blue); border-color: rgba(79,140,255,0.4); transform: rotate(180deg); }

/* ── File mode ── */
.b64-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 50px 20px;
  background: var(--surface); border: 2px dashed var(--border2);
  border-radius: var(--radius); cursor: pointer; text-align: center;
  transition: border-color 0.2s, background 0.2s; position: relative;
}
.b64-dropzone:hover, .b64-dropzone.dragover {
  border-color: var(--blue); background: var(--blue-dim);
}
.b64-dropzone svg { color: var(--text-dimmer); opacity: 0.5; }
.b64-drop-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.b64-drop-sub   { font-size: 0.82rem; color: var(--text-dim); }
.b64-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

.b64-file-result { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.b64-file-info {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim);
  display: flex; gap: 20px; flex-wrap: wrap;
}
.b64-file-info span { color: var(--text); }

/* ── Info bar ── */
.b64-info-bar {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 20px; flex-wrap: wrap; gap: 0;
}
.b64-info-item { display: flex; flex-direction: column; gap: 3px; padding: 0 16px; }
.b64-info-item:first-child { padding-left: 0; }
.b64-info-label { font-size: 0.62rem; font-weight: 700; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.08em; }
.b64-info-val { font-family: var(--font-mono); font-size: 0.88rem; color: var(--text); }
.b64-info-sep { width: 1px; height: 32px; background: var(--border); align-self: center; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .b64-editors { grid-template-columns: 1fr; grid-template-rows: 1fr auto 1fr; }
  .b64-swap-col { padding: 4px 0; }
  .b64-swap-btn { transform: rotate(90deg); }
  .b64-swap-btn:hover { transform: rotate(270deg); }
  .b64-editor { min-height: 160px; }
  .b64-mode-group { flex-direction: column; }
}
