/* PraxisDial KI-Hilfe Styles - Interaktives Learning-by-Doing Widget */
.help-q-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    margin-left: 6px;
    vertical-align: middle;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1;
}
.help-q-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
    transform: scale(1.1);
}

/* Schwebender Button unten rechts */
.floating-ai-help-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    border: 1px solid #1e40af;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    font-size: 13.5px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.2s ease;
}
.floating-ai-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
}
.floating-ai-help-btn .ai-icon {
    font-size: 17px;
}

/* Obere schlanke Sprach-Leiste: Volle Übersicht & Bedienbarkeit des Portals mit Pause-Button */
#praxisdial-voice-coach-bar {
    display: none;
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    padding: 8px 18px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    border: 2px solid #38bdf8;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    animation: fadeInDown 0.25s ease-out;
}
#praxisdial-voice-coach-bar.visible {
    display: block;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translate(-50%, -15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
.voice-coach-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
}
.voice-coach-inner .voice-wave {
    font-size: 18px;
    animation: pulseWave 1s infinite alternate;
}
@keyframes pulseWave {
    from { transform: scale(1); }
    to { transform: scale(1.25); }
}
.voice-coach-label {
    font-weight: 650;
    color: #f1f5f9;
}
.voice-coach-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 0;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.15s ease;
}
.voice-coach-btn.pause {
    background: #f59e0b;
    color: #000000;
}
.voice-coach-btn.pause.is-paused {
    background: #10b981;
    color: #ffffff;
    animation: pulseBtn 1s infinite alternate;
}
@keyframes pulseBtn {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}
.voice-coach-btn.show-text {
    background: #334155;
    color: #f8fafc;
}
.voice-coach-btn.show-text:hover {
    background: #475569;
}
.voice-coach-btn.stop {
    background: #ef4444;
    color: #ffffff;
}
.voice-coach-btn.stop:hover {
    background: #dc2626;
}

/* ==========================================
   VISUELLES MODAL-FENSTER FÜR BEBILDERTE SCHRITTE
   ========================================== */
.visual-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 999990;
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.visual-modal-backdrop.open {
    display: flex;
}
.visual-modal-card {
    max-width: 680px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    border: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    animation: zoomModal 0.2s ease-out;
}
@keyframes zoomModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.visual-modal-head {
    padding: 20px 24px 14px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
}
.visual-modal-kicker {
    display: block;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    color: #2563eb;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.visual-modal-head h2 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}
.visual-modal-close {
    border: 0;
    background: transparent;
    font-size: 26px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}
.visual-modal-close:hover {
    color: #0f172a;
}
.visual-modal-body {
    padding: 20px 24px;
    flex: 1;
}
.visual-steps-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}
.vm-step-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.vm-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vm-step-text {
    flex: 1;
}
.vm-step-title {
    font-size: 13.5px;
    margin-bottom: 3px;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vm-step-desc {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}
.visual-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.vm-voice-btn {
    padding: 10px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    font-size: 13px;
    font-weight: 750;
    border: 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.vm-voice-btn:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
}
.vm-link-manual {
    font-size: 12.5px;
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}
.vm-link-manual:hover {
    text-decoration: underline;
}

/* Diagramm-Boxen im Modal */
.manual-flow-diagram {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}
.flow-step {
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    flex: 1;
    min-width: 120px;
}
.flow-step.orange { background: #fff7ed; border: 1.5px solid #fed7aa; color: #9a3412; }
.flow-step.blue { background: #eff6ff; border: 1.5px solid #bfdbfe; color: #1e40af; }
.flow-step.purple { background: #faf5ff; border: 1.5px solid #e9d5ff; color: #6b21a8; }
.flow-step.green { background: #f0fdf4; border: 1.5px solid #bbf7d0; color: #166534; }
.flow-arrow {
    font-size: 16px;
    color: #94a3b8;
    font-weight: 800;
}
.manual-box-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}
.preview-field {
    padding: 8px 10px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.preview-field span { display: block; font-size: 10px; color: #64748b; margin-bottom: 2px; }
.preview-field strong { font-size: 12px; color: #1e293b; }

/* Badges */
.badge { display:inline-block; padding:3px 7px; border-radius:999px; font-size:10px; font-weight:750; }
.badge-orange { background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; }
.badge-blue { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
.badge-purple { background:#faf5ff; color:#7e22ce; border:1px solid #e9d5ff; }
.badge-green { background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }
.badge-neutral { background:#f1f5f9; color:#475569; border:1px solid #cbd5e1; }

/* Chat-Drawer */
#praxisdial-ai-help-drawer {
    display: none;
}
#praxisdial-ai-help-drawer.open {
    display: block;
}
.ai-help-content {
    position: fixed;
    right: 20px;
    bottom: 80px;
    top: 90px;
    width: 410px;
    max-width: 90vw;
    background: #ffffff;
    z-index: 99990;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.22s ease-out;
    pointer-events: auto;
}
@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.ai-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 14px 14px 0 0;
}
.ai-help-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    color: #0f172a;
}
.ai-help-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ai-help-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.ai-help-close:hover {
    color: #0f172a;
}
.ai-help-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
}
.ai-help-welcome {
    padding: 12px 14px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.5;
}
.ai-msg {
    display: flex;
    flex-direction: column;
    max-width: 90%;
}
.ai-msg-user {
    align-self: flex-end;
}
.ai-msg-user .ai-msg-bubble {
    background: #2563eb;
    color: #ffffff;
    border-radius: 14px 14px 2px 14px;
}
.ai-msg-assistant {
    align-self: flex-start;
}
.ai-msg-assistant .ai-msg-bubble {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    border-radius: 14px 14px 14px 2px;
}
.ai-msg-bubble {
    padding: 11px 14px;
    font-size: 13px;
    line-height: 1.55;
}
.ai-msg-actions {
    margin-top: 6px;
}
.ai-speak-btn {
    padding: 6px 12px;
    border: 1px solid #2563eb;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.ai-speak-btn:hover {
    background: #1d4ed8;
}
.ai-speak-btn.playing {
    background: #f59e0b;
    border-color: #d97706;
    color: #000000;
}
.ai-speak-btn.loading {
    opacity: 0.6;
    cursor: wait;
}
.ai-help-footer {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 14px 14px;
}
.ai-help-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-help-input-row input {
    flex: 1;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
}
.ai-mic-btn {
    padding: 8px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
}
.ai-mic-btn.recording {
    background: #fee2e2;
    border-color: #ef4444;
    animation: pulseMic 1s infinite alternate;
}
@keyframes pulseMic {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}
.ai-send-btn {
    padding: 9px 13px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 750;
    cursor: pointer;
}
.ai-send-btn:hover {
    background: #1d4ed8;
}
.ai-help-speech-status {
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    border: 1px solid #fde68a;
}
.ai-help-speech-status.recording {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
    animation: pulseStatus 1.5s infinite;
}
@keyframes pulseStatus {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.ai-quick-prompts {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.ai-quick-label {
    font-size: 11px;
    font-weight: 750;
    color: #475569;
    width: 100%;
    margin-bottom: 2px;
}
.ai-quick-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e40af;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}
.ai-quick-chip:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e3a8a;
    transform: translateY(-1px);
}

.ai-help-header-link {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    padding: 4px 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.ai-help-header-link:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.nav-ai-assist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #ffffff !important;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12.5px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
    transition: all 0.15s ease;
    text-decoration: none;
}
.nav-ai-assist-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

