/* ============================================
   TextServiceDesign.css — /admin/texte
   Bewusst deutlich kompakter als AdminArtikelEditDesign.css:
   kleinere Schrift, engere Abstaende, keine grossen Multi-Section-Modals.
   Nutzt dieselben --ze-* Variablen wie ZEAdminDesign.css (global geladen).
   ============================================ */

.TextService-page-header {
    margin-bottom: 1rem;
}

.TextService-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ze-text, #f1f5f9);
    margin: 0 0 0.15rem;
}

.TextService-page-subtitle {
    font-size: 0.8rem;
    color: var(--ze-text-muted, #9ca3af);
    margin: 0;
}

.TextService-message {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.TextService-message-success {
    background: rgba(var(--ze-success-rgb, 74, 222, 128), 0.12);
    color: var(--ze-success, #4ade80);
    border: 1px solid rgba(var(--ze-success-rgb, 74, 222, 128), 0.3);
}

.TextService-message-error {
    background: rgba(var(--ze-danger-rgb, 239, 68, 68), 0.12);
    color: var(--ze-danger, #ef4444);
    border: 1px solid rgba(var(--ze-danger-rgb, 239, 68, 68), 0.3);
}

.TextService-section {
    background: var(--ze-bg-card, rgba(17, 24, 39, 0.6));
    border: 1px solid var(--ze-border, rgba(55, 65, 81, 0.5));
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.TextService-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.TextService-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ze-text, #f1f5f9);
    margin: 0;
}

.TextService-empty {
    font-size: 0.8rem;
    color: var(--ze-text-muted, #9ca3af);
    padding: 0.5rem 0;
    margin: 0;
}

/* ── Table ── */
.TextService-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

    .TextService-table th {
        text-align: left;
        font-weight: 600;
        color: var(--ze-text-muted, #9ca3af);
        padding: 0.35rem 0.5rem;
        border-bottom: 1px solid var(--ze-border, rgba(55, 65, 81, 0.5));
        white-space: nowrap;
    }

    .TextService-table td {
        padding: 0.35rem 0.5rem;
        border-bottom: 1px solid var(--ze-border, rgba(55, 65, 81, 0.5));
        color: var(--ze-text, #f1f5f9);
        vertical-align: middle;
    }

    .TextService-table tr:last-child td {
        border-bottom: none;
    }

.TextService-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(var(--ze-primary-rgb, 56, 189, 255), 0.12);
    color: var(--ze-primary, #38bdff);
}

/* ── Buttons ── */
.TextService-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--ze-border, rgba(55, 65, 81, 0.5));
    background: transparent;
    color: var(--ze-text, #f1f5f9);
    cursor: pointer;
}

    .TextService-btn:hover {
        border-color: var(--ze-border-hover, rgba(55, 65, 81, 0.8));
    }

    .TextService-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.TextService-btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
}

.TextService-btn-primary {
    background: var(--ze-gradient, linear-gradient(135deg, #38bdff 0%, #a78bfa 100%));
    border-color: transparent;
    color: #0a0a0f;
}

.TextService-btn-danger {
    border-color: rgba(var(--ze-danger-rgb, 239, 68, 68), 0.4);
    color: var(--ze-danger, #ef4444);
}

/* ── Forms ── */
.TextService-form-group {
    margin-bottom: 0.55rem;
}

    .TextService-form-group label {
        display: block;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--ze-text, #f1f5f9);
        margin-bottom: 0.2rem;
    }

.TextService-input,
.TextService-textarea {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--ze-border, rgba(55, 65, 81, 0.5));
    background: var(--ze-bg-input, rgba(0, 0, 0, 0.4));
    color: var(--ze-text, #f1f5f9);
    box-sizing: border-box;
}

.TextService-textarea {
    resize: vertical;
    min-height: 2.2rem;
}

.TextService-hint {
    font-size: 0.68rem;
    color: var(--ze-text-muted, #9ca3af);
    margin: 0 0 0.3rem;
}

.TextService-add-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
    align-items: end;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--ze-border, rgba(55, 65, 81, 0.5));
}

.TextService-add-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.TextService-editor-container {
    background: var(--ze-bg-input, rgba(0, 0, 0, 0.4));
    border: 1px solid var(--ze-border, rgba(55, 65, 81, 0.5));
    border-radius: 6px;
    min-height: 160px;
}

/* Dark-theme skin for the Quill 'snow' editor to match the rest of /admin/texte */
.TextService-editor-container .ql-toolbar.ql-snow {
    background: var(--ze-bg-card, rgba(17, 24, 39, 0.6));
    border-color: var(--ze-border, rgba(55, 65, 81, 0.5));
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.TextService-editor-container .ql-container.ql-snow {
    background: var(--ze-bg-input, rgba(0, 0, 0, 0.4));
    border-color: var(--ze-border, rgba(55, 65, 81, 0.5));
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    color: var(--ze-text, #f1f5f9);
}

.TextService-editor-container .ql-editor {
    color: var(--ze-text, #f1f5f9);
}

.TextService-editor-container .ql-editor.ql-blank::before {
    color: var(--ze-text-muted, #9ca3af);
}

.TextService-editor-container .ql-snow .ql-stroke {
    stroke: var(--ze-text-muted, #9ca3af);
}

.TextService-editor-container .ql-snow .ql-fill,
.TextService-editor-container .ql-snow .ql-stroke.ql-fill {
    fill: var(--ze-text-muted, #9ca3af);
}

.TextService-editor-container .ql-picker-label {
    color: var(--ze-text-muted, #9ca3af);
}

.TextService-editor-container .ql-picker-options {
    background: var(--ze-bg-card, rgba(17, 24, 39, 0.6));
    border-color: var(--ze-border, rgba(55, 65, 81, 0.5));
}

.TextService-editor-container .ql-picker-item {
    color: var(--ze-text, #f1f5f9);
}

.TextService-editor-container .ql-snow.ql-toolbar button:hover .ql-stroke,
.TextService-editor-container .ql-snow .ql-toolbar button:hover .ql-stroke,
.TextService-editor-container .ql-snow .ql-picker-label:hover .ql-stroke {
    stroke: var(--ze-primary, #38bdff);
}

.TextService-editor-container .ql-snow.ql-toolbar button:hover .ql-fill,
.TextService-editor-container .ql-snow .ql-toolbar button:hover .ql-fill {
    fill: var(--ze-primary, #38bdff);
}

.TextService-editor-container .ql-snow .ql-picker-label:hover {
    color: var(--ze-primary, #38bdff);
}

/* ── Edit Modal (Page Texts) ── */
.TextService-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.TextService-modal {
    background: var(--ze-bg-page, #0a0a0f);
    border: 1px solid var(--ze-border, rgba(55, 65, 81, 0.5));
    border-radius: 10px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0.9rem 1rem;
}

.TextService-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

    .TextService-modal-header h3 {
        font-size: 0.95rem;
        margin: 0;
        color: var(--ze-text, #f1f5f9);
    }

.TextService-modal-close {
    background: transparent;
    border: none;
    color: var(--ze-text-muted, #9ca3af);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.15rem;
}

.TextService-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

@media (max-width: 600px) {
    .TextService-add-form {
        grid-template-columns: 1fr;
    }
}

/* ── FAQ Region (touch-target sizing per app-shell standard) ── */
.TextService-faq-controls {
    max-width: 320px;
}

.TextService-faq-table td {
    vertical-align: top;
}

.TextService-faq-actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    white-space: nowrap;
}

.TextService-faq-section select,
.TextService-faq-section input,
.TextService-faq-section textarea,
.TextService-faq-section button {
    min-height: 44px;
}
