.cipher-tool {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cipher-tool label {
    font-weight: 600;
    margin-bottom: -.5rem;
}

.cipher-tool input,
.cipher-tool textarea,
.cipher-tool select {
    width: 100%;
    padding: .75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}

.cipher-tool textarea {
    min-height: 150px;
    resize: vertical;
}

.code-word {
    text-transform: uppercase;
}

#cipher-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#messages {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.message-box {
    padding: .75rem 1rem;
    border-radius: 8px;
    border-left: 5px solid;
    font-weight: 600;
}

.message-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #842029;
}

.message-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #664d03;
}

.message-info {
    background: #cff4fc;
    border-color: #0dcaf0;
    color: #055160;
}

.message-success {
    background: #d1e7dd;
    border-color: #198754;
    color: #0f5132;
}

#cipher-display {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

.cipher-grid {
    border-collapse: collapse;
    width: max-content;
    text-align: center;
}

.cipher-grid th,
.cipher-grid td {
    width: 5rem;
    height: 5rem;
    border: 2px solid #333;
    vertical-align: middle;
    text-align: center;
    padding: 0;
}

.cipher-grid th {
    background: #fbbb21;
    font-weight: 700;
}

.cipher-grid td {
    position: relative;
    background: #fff;
    cursor: pointer;
    transition: background .15s;
}

.cipher-grid tr:first-child th:first-child {
    background: transparent;
    border: none;
}

.cipher-grid td:hover {
    background: #f5f5f5;
}

.cipher-grid td[data-code]:hover::after {
    content: attr(data-code);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333;
    color: #fff;
    padding: .35rem .6rem;
    border-radius: 6px;
    font-weight: 700;
    white-space: nowrap;
    z-index: 100;
}

.morse-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

.morse-display .cipher-grid {
    width: 100%;
}

.empty-row {
    visibility: hidden;
}

@font-face {
    font-family: "Keilschrift";
    src:
        url("/wp-content/uploads/2026/07/Keilschrift.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Bluemchen";
    src:
        url("/wp-content/uploads/2026/07/BLUMCHEN.ttf") format("truetype");
    font-display: swap;
}

.font-keilschrift {
    font-family: "Keilschrift";
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}


.font-bluemchen {
    font-family: "Bluemchen";
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}


.cipher-font-preview {
    letter-spacing: .15em;
}	

.keilschrift-display {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.keilschrift-raster {
    max-width: 320px !important;
    width: 100%;
    height: auto;
}	