
.toolbar {
    display: flex;
    gap: 0.8em;
    flex-wrap: nowrap; /* wichtig: verhindert Umbruch */
    align-items: stretch;
}

.toolbar label,
.toolbar button {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toolbar label select,
.toolbar button {
    width: 100%;
    padding: 0.6em;
    font-size: 1em;
    box-sizing: border-box;
}

.toolbar button {
    cursor: pointer;
}
    .button-row {
        flex-direction: column;
        gap: 0.8em;
    }

    .button-row button {
        width: 100%;
    }

.square-button {
    aspect-ratio: 1 / 1;
    padding: 0.6em;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.square-button {
    aspect-ratio: 1 / 1;
    height: 2.5em; /* gleiche Höhe wie die Selects */
    padding: 0;
    font-size: 1.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    align-self: flex-end; /* Wichtig: ausrichten an Unterkante */
}

.square-button:hover {
    background-color: #e0e0e0;
}

#editor {
    border: 2px solid #ccc;
    padding: 1em;
    min-height: 300px;
    font-family: monospace;
    font-size: 1rem;
    background-color: #fefefe;
    overflow-y: auto;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: border-color 0.3s;
}

#editor:focus {
    border-color: #0077cc;
    background-color: #ffffff;
}

.char-counter-row {
    display: flex;
    align-items: center;
    gap: 1em;
    margin: 1em 0;
    font-family: sans-serif;
    flex-wrap: wrap;
}

.char-counter-row label {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.char-counter-row input {
    width: 100px;
}

.remaining-info {
    font-size: 1em;
}
@media (max-width: 600px) {
    html, body {
        margin: 0;
        padding: 0;
        height: auto;
        overflow-y: scroll;
    }

    .mobile-wrapper {
        display: block;
        width: 100%;
    }

    #editor {
        height: 300px;
        overflow-y: auto;
        font-size: 0.95rem;
        background: #fff;
        border: 2px solid #ccc;
        margin-bottom: 1em;
    }

    .toolbar label,
    .toolbar button,
    .char-counter-row label,
    .char-counter-row input,
    .button-row button {
        width: 100%;
        display: block;
    }

    .toolbar,
    .char-counter-row,
    .button-row {
        flex-wrap: wrap;
    }
    #clearFormatBtn {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  align-self: flex-end;
}

}
