/* Base64 Encode/Decode — Tool Styles (~1.3KB) */

/* Layout */
.b64__layout {
    display: flex;
    flex: 1;
    gap: 1px;
    background: var(--c-border);
    min-height: 0
}

.b64__pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    min-width: 0
}

.b64__pane .tool__input {
    flex: 1;
    min-height: 280px
}

.b64__pane-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--c-border);
    font-size: .6875rem;
}

.b64__pane-title {
    font-weight: 600;
    color: var(--c-text)
}

.b64__pane-info {
    color: var(--c-text-2);
    margin-right: auto
}

/* Mode & direction toggles */
.b64__mode-toggle,
.b64__dir-toggle {
    display: flex;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden
}

.b64__mode,
.b64__dir {
    font-size: .6875rem;
    padding: 4px 12px;
    background: var(--c-bg);
    color: var(--c-text-2);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}

.b64__mode:not(:last-child),
.b64__dir:not(:last-child) {
    border-right: 1px solid var(--c-border)
}

.b64__mode:hover,
.b64__dir:hover {
    color: var(--c-accent)
}

.b64__mode--active,
.b64__dir--active {
    background: var(--c-accent);
    color: #fff
}

.b64__sep {
    width: 1px;
    height: 20px;
    background: var(--c-border);
    margin: 0 4px
}

.b64__toggle-label {
    font-size: .6875rem;
    color: var(--c-text-2);
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer
}

/* Drop zone */
.b64__dropzone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--c-border);
    border-radius: var(--radius);
    margin: 8px;
    color: var(--c-text-2);
    gap: 8px;
    min-height: 200px;
    transition: border-color .2s, background .2s;
}

.b64__dropzone.dragover {
    border-color: var(--c-accent);
    background: color-mix(in srgb, var(--c-accent) 5%, transparent)
}

.b64__browse {
    color: var(--c-accent);
    text-decoration: underline;
    cursor: pointer
}

.b64__drop-hint {
    font-size: .6875rem;
    opacity: .6
}

/* File preview */
.b64__preview {
    padding: 8px 12px;
    border-top: 1px solid var(--c-border)
}

.b64__preview img {
    max-width: 100%;
    max-height: 120px;
    border-radius: var(--radius);
    object-fit: contain
}

.b64__preview .file-info {
    font-size: .6875rem;
    color: var(--c-text-2);
    margin-top: 4px
}

/* Status bar */
.b64__status {
    font-size: .6875rem;
    padding: 4px 12px;
    color: var(--c-text-2);
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
}

.b64__status.error {
    color: var(--c-error)
}

.b64__status.success {
    color: var(--c-accent)
}

/* Responsive */
@media(max-width:768px) {
    .b64__layout {
        flex-direction: column;
        background: transparent;
        gap: 0
    }

    .b64__pane .tool__input {
        min-height: 180px
    }

    .b64__sep {
        display: none
    }

    .tool__toolbar {
        flex-wrap: wrap
    }
}