.emmaus-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Work Sans", Arial, sans-serif;
}

.emmaus-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff6464;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.emmaus-chat-toggle:hover { transform: scale(1.06); }

.emmaus-chat-panel {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.22);
    overflow: hidden;
    border: 1px solid #eee;
}

.emmaus-chat-panel--floating {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 340px;
    height: 460px;
    max-width: calc(100vw - 40px);
    max-height: 70vh;
}

.emmaus-chat-panel--full {
    width: 100%;
    max-width: 720px;
    height: 640px;
    max-height: 80vh;
    margin: 0 auto;
}

.emmaus-chat-header {
    background: #071f1b;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.emmaus-chat-header strong { font-size: 16px; }
.emmaus-chat-header span { font-size: 12px; opacity: 0.75; }
.emmaus-chat-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.emmaus-chat-speak,
.emmaus-chat-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.75;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.emmaus-chat-speak.is-active { opacity: 1; }
.emmaus-chat-speak svg,
.emmaus-chat-close svg { display: block; flex: none; }

.emmaus-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #faf6f6;
}

.emmaus-chat-msg {
    max-width: 85%;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.emmaus-chat-msg--assistant {
    background: #fff;
    border: 1px solid #eee;
    align-self: flex-start;
    color: #071f1b;
}
.emmaus-chat-msg--user {
    background: #ff6464;
    color: #fff;
    align-self: flex-end;
}
.emmaus-chat-msg--error {
    background: #fff3f3;
    border: 1px solid #f5c2c2;
    color: #a33;
    align-self: flex-start;
}
.emmaus-chat-msg--thinking {
    background: #fff;
    border: 1px solid #eee;
    align-self: flex-start;
    color: #888;
    font-style: italic;
}

.emmaus-chat-disclaimer {
    font-size: 11px;
    color: #888;
    padding: 6px 16px;
    background: #faf6f6;
    border-top: 1px solid #eee;
}

.emmaus-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee;
    background: #fff;
}
.emmaus-chat-input {
    flex: 1;
    resize: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    max-height: 90px;
}
.emmaus-chat-send {
    background: #ff6464;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
.emmaus-chat-send:disabled { opacity: 0.5; cursor: default; }

.emmaus-chat-mic {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 40px;
    flex: none;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}
.emmaus-chat-mic svg { display: block; flex: none; }
.emmaus-chat-mic.is-listening {
    background: #ff6464;
    border-color: #ff6464;
    color: #fff;
    animation: emmaus-chat-pulse 1.2s ease-in-out infinite;
}
@keyframes emmaus-chat-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,100,100,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(255,100,100,0); }
}

.emmaus-chat-login-notice {
    padding: 14px;
    background: #faf6f6;
    border: 1px solid #eee;
    border-radius: 10px;
    text-align: center;
}

@media (max-width: 480px) {
    .emmaus-chat-panel--floating {
        width: calc(100vw - 24px);
        right: -8px;
    }
}

/* Chat-Seite: Info-Box + eingebettetes Login-Formular */

.emmaus-chat-page {
    max-width: 720px;
    margin: 0 auto 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Work Sans", Arial, sans-serif;
}

.emmaus-chat-info-box {
    background: #faf6f6;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 22px;
}
.emmaus-chat-info-title {
    margin-top: 0;
    color: #071f1b;
}
.emmaus-chat-info-subtitle {
    margin: 16px 0 8px;
    color: #071f1b;
    font-size: 15px;
}
.emmaus-chat-info-list {
    margin: 0;
    padding-left: 20px;
}
.emmaus-chat-info-list li {
    margin-bottom: 6px;
    line-height: 1.5;
}
.emmaus-chat-info-list--limits li {
    color: #555;
}
.emmaus-chat-disclaimer--static {
    font-size: 12px;
    color: #888;
    border-top: 1px solid #e2dede;
    padding-top: 12px;
    margin: 18px 0 0;
}

.emmaus-chat-login-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 26px;
    max-width: 380px;
    margin: 0 auto;
    text-align: center;
}
.emmaus-chat-login-box h3 {
    margin-top: 0;
    color: #071f1b;
}
.emmaus-chat-login-box > p {
    color: #555;
    font-size: 14px;
    margin-top: 0;
}
.emmaus-chat-login-box form p {
    text-align: left;
    margin: 0 0 14px;
}
.emmaus-chat-login-box label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #333;
}
.emmaus-chat-login-box input[type="text"],
.emmaus-chat-login-box input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.emmaus-chat-login-box .login-remember {
    font-size: 13px;
}
.emmaus-chat-login-box .login-remember label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    font-weight: normal;
}
.emmaus-chat-login-box .login-remember input[type="checkbox"] {
    margin: 0;
}
.emmaus-chat-login-box .login-submit {
    margin-bottom: 0;
}
.emmaus-chat-login-box .login-submit input[type="submit"] {
    width: 100%;
    background: #ff6464;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.emmaus-chat-login-box .login-submit input[type="submit"]:hover {
    opacity: 0.92;
}
