﻿.templates-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.17rem; /* ein Drittel des früheren Abstands zur Liste darunter */
}

.templates-toolbar__btn {
    width: 34px;
    height: 29px; /* um ein Drittel niedriger (früher 44px) */
    box-sizing: border-box;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #1e5fbf;
    border-radius: 8px;
    background: white;
    color: #1e5fbf;
    cursor: pointer;
    flex-shrink: 0;
}

    .templates-toolbar__btn:hover {
        background: #eaf1fb;
    }

    .templates-toolbar__btn--text {
        background: #dce8f8;
        font-weight: 600;
        font-size: 0.95rem;
    }

    /* Noch nicht belegt (leerer Link-Knopf, keine Vorlage, kein Bild): gestrichelt */
    .templates-toolbar__btn--leer {
        border-style: dashed;
        background: white;
        color: #888;
    }

    .templates-toolbar__btn svg {
        width: 18px;
        height: 18px;
    }

.templates-panel {
    border: 2px solid #1e5fbf;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #f7f9fc;
}

.templates-panel__actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.templates-panel__empty {
    font-size: 0.9rem;
    color: #555;
}

.templates-panel__settings {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #333;
}

.templates-panel__lines-input {
    width: 4rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 0.3rem;
}

.templates-panel__scroll {
    overflow: auto;
    resize: both;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: white;
    min-width: 200px;
    min-height: 100px;
    box-sizing: border-box;
}

.templates-panel__columns {
    column-gap: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.templates-panel__line {
    break-inside: avoid;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    white-space: pre-wrap;
    cursor: pointer;
    position: relative;
    user-select: none;
}

    .templates-panel__line:hover {
        background: #e0ecfb;
    }

.templates-panel__color-input {
    width: 2.2rem;
    height: 1.6rem;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-left: 0.3rem;
    vertical-align: middle;
    cursor: pointer;
}

.templates-panel__copied {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e5fbf;
}

/* DSL-Editor: nutzt templates-panel / templates-panel__scroll, hier nur die Abweichungen */
.dsl-editor__box {
    padding: 0;
    overflow: hidden;
}

.dsl-editor__textarea {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.dsl-editor__errors {
    margin: 0.75rem 0 0 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: #c0392b;
}

.dsl-editor__actions {
    margin-top: 0.75rem;
}
