/* ── Base64 Encoder V2 ──────────────────────────────────────────────────── */

/* Tabs */
.zt-tool--base64-encoder-v2 .zt-b64v2-tabs {
    display: flex;
    border-bottom: 1px solid var(--zt-border);
    margin-bottom: 1.25rem;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-tab {
    padding: 8px 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--zt-text-muted);
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-tab:hover {
    color: var(--zt-text);
}

.zt-tool--base64-encoder-v2 .zt-b64v2-tab--active {
    color: var(--zt-text);
    border-bottom-color: var(--zt-text);
    font-weight: 500;
}

/* Panel visibility */
.zt-tool--base64-encoder-v2 .zt-b64v2-panel--hidden {
    display: none;
}

/* Output box — textarea + copy button */
.zt-tool--base64-encoder-v2 .zt-b64v2-output-wrap {
    margin-top: 1rem;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-output-box {
    position: relative;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-output-box .zt-textarea {
    padding-right: 42px;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-copy {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Dropzone */
.zt-tool--base64-encoder-v2 .zt-b64v2-dropzone {
    border: 1.5px dashed var(--zt-border);
    border-radius: var(--zt-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--zt-bg-secondary);
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-dropzone--over {
    border-color: var(--zt-accent, #2563eb);
    background: var(--zt-bg-hover, #eff6ff);
}

.zt-tool--base64-encoder-v2 .zt-b64v2-dropzone__icon {
    display: block;
    margin: 0 auto 0.75rem;
    color: var(--zt-text-muted);
}

.zt-tool--base64-encoder-v2 .zt-b64v2-dropzone__text {
    font-size: 14px;
    color: var(--zt-text-muted);
    margin-bottom: 0.75rem;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-dropzone__hint {
    font-size: 12px;
    color: var(--zt-text-faint, #9ca3af);
    margin-top: 0.6rem;
}

/* Hidden real file input */
.zt-tool--base64-encoder-v2 .zt-b64v2-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* File meta row */
.zt-tool--base64-encoder-v2 .zt-b64v2-file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.75rem;
    padding: 8px 12px;
    background: var(--zt-bg-secondary);
    border: 1px solid var(--zt-border);
    border-radius: var(--zt-radius);
    font-size: 13px;
    color: var(--zt-text);
}

.zt-tool--base64-encoder-v2 .zt-b64v2-file-meta svg {
    flex-shrink: 0;
    color: var(--zt-text-muted);
}

.zt-tool--base64-encoder-v2 .zt-b64v2-file-meta__name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-file-meta__size {
    color: var(--zt-text-muted);
    white-space: nowrap;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-file-meta__remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--zt-text-muted);
    padding: 0 2px;
    margin-left: 4px;
    transition: color 0.15s;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-file-meta__remove:hover {
    color: var(--zt-text);
}

/* Data URI checkbox row */
.zt-tool--base64-encoder-v2 .zt-b64v2-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    font-size: 13px;
    color: var(--zt-text);
    cursor: pointer;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-checkbox-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--zt-accent, #2563eb);
}

.zt-tool--base64-encoder-v2 .zt-b64v2-checkbox-hint {
    color: var(--zt-text-muted);
    font-size: 12px;
}

/* Status line */
.zt-tool--base64-encoder-v2 .zt-b64v2-status {
    margin-top: 8px;
    min-height: 20px;
    font-size: 13px;
}

/* Status with icons */
.zt-tool--base64-encoder-v2 .zt-b64v2-status.is-success::before {
    content: '✓';
    margin-right: 5px;
    font-weight: 600;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-status.is-error::before {
    content: '✕';
    margin-right: 5px;
    font-weight: 600;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-status.is-info::before {
    content: '·';
    margin-right: 5px;
    font-weight: 600;
}

/* Character counter */
.zt-tool--base64-encoder-v2 .zt-b64v2-counter {
    font-size: 12px;
    color: var(--zt-text-muted);
    text-align: right;
    min-height: 18px;
    margin-top: 4px;
}

/* MIME badge in file meta */
.zt-tool--base64-encoder-v2 .zt-b64v2-file-meta__mime {
    font-size: 11px;
    color: var(--zt-text-muted);
    background: var(--zt-bg-hover, rgba(0,0,0,0.06));
    border-radius: 3px;
    padding: 2px 6px;
    white-space: nowrap;
    font-family: var(--zt-font-mono, monospace);
}

/* Decode section */
.zt-tool--base64-encoder-v2 .zt-b64v2-decode-section {
    margin-top: 1.5rem;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--zt-text-muted);
}

.zt-tool--base64-encoder-v2 .zt-b64v2-section-divider::before,
.zt-tool--base64-encoder-v2 .zt-b64v2-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--zt-border);
}

/* Decode actions row */
.zt-tool--base64-encoder-v2 .zt-b64v2-decode-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-ext-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
    max-width: 260px;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-ext-wrap--hidden {
    display: none;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-ext-input {
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
}

.zt-tool--base64-encoder-v2 .zt-b64v2-download-btn {
    white-space: nowrap;
    height: 38px;
}
