/* =========================================
   Anonyme Beratung – Frontend Chat Styles
   ========================================= */

#anon-counsel-wrap {
    max-width: 700px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#anon-counsel-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    background: #fff;
    border: 1px solid #e5e7eb;
}

/* Header */
#anon-counsel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
    color: #fff;
}

#anon-counsel-header .anon-counsel-icon {
    font-size: 1.6rem;
}

#anon-counsel-header strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

#anon-counsel-status-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
}

#anon-counsel-status-badge.status-open     { background: #22c55e; color: #fff; }
#anon-counsel-status-badge.status-answered { background: #f59e0b; color: #fff; }
#anon-counsel-status-badge.status-closed   { background: #6b7280; color: #fff; }

/* Privacy bar */
#anon-counsel-privacy-bar {
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    padding: 6px 20px;
    font-size: 0.78rem;
    color: #15803d;
    text-align: center;
}

/* Messages area */
#anon-counsel-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
    min-height: 0;
}

.anon-counsel-loading {
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
    padding: 2rem;
}

.anon-counsel-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: break-word;
    position: relative;
}

.anon-counsel-bubble.user {
    align-self: flex-end;
    background: #1e3a5f;
    color: #fff;
    border-bottom-right-radius: 3px;
}

.anon-counsel-bubble.counselor {
    align-self: flex-start;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.anon-counsel-bubble .bubble-meta {
    font-size: 0.7rem;
    opacity: 0.65;
    margin-top: 4px;
    display: block;
}

.anon-counsel-bubble.counselor .bubble-meta { color: #6b7280; }
.anon-counsel-bubble.user .bubble-meta { color: rgba(255,255,255,0.7); text-align: right; }

.anon-counsel-bubble.system {
    align-self: center;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 0.85rem;
    text-align: center;
    max-width: 90%;
}

/* Email area */
#anon-counsel-email-area {
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
}

.anon-counsel-email-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.4;
}

#anon-counsel-email-input-wrap {
    display: flex;
    gap: 8px;
}

#anon-counsel-email {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

#anon-counsel-email:focus {
    border-color: #2d5a8e;
    box-shadow: 0 0 0 3px rgba(45, 90, 142, 0.1);
}

#anon-counsel-email-btn {
    padding: 8px 14px;
    background: #2d5a8e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

#anon-counsel-email-btn:hover { background: #1e3a5f; }

#anon-counsel-email-feedback {
    margin-top: 6px;
    font-size: 0.82rem;
    padding: 5px 10px;
    border-radius: 5px;
}

#anon-counsel-email-feedback.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

#anon-counsel-email-feedback.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Input area */
#anon-counsel-input-area {
    padding: 12px 20px 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

#anon-counsel-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.92rem;
    resize: none;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
    line-height: 1.5;
}

#anon-counsel-input:focus {
    border-color: #2d5a8e;
    box-shadow: 0 0 0 3px rgba(45, 90, 142, 0.1);
}

#anon-counsel-input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

#anon-counsel-char-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

#anon-counsel-send {
    padding: 9px 22px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#anon-counsel-send:hover { background: #2d5a8e; }
#anon-counsel-send:active { transform: scale(0.97); }
#anon-counsel-send:disabled { background: #9ca3af; cursor: not-allowed; }

/* Responsive */
@media (max-width: 480px) {
    #anon-counsel-wrap { margin: 0; border-radius: 0; }
    #anon-counsel-chat { border-radius: 0; }
    .anon-counsel-bubble { max-width: 92%; }
}
