/* Modernes Farbschema */
:root {
--primary: #4A90E2;
--primary-hover: #357ABD;
--background: #FFFFFF;
--text: #2C3E50;
--border: #E0E7ED;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
/* Hauptcontainer */
.modern-chat-container {
background: var(--background);
border-radius: 12px;
box-shadow: var(--shadow);
padding: 1rem;
font-family: 'Inter', system-ui, sans-serif;
position: relative;
max-width: 500px;
margin: 0 auto;
}
/* Nachrichtenbereich */
.modern-chat-messages {
list-style: none;
padding: 0;
margin: 0 0 1rem;
max-height: 350px;
overflow-y: auto;
}
/* Einzelne Nachricht */
.modern-chat-message {
display: flex;
gap: 10px;
margin-bottom: 1rem;
animation: fadeIn 0.3s ease-out;
position: relative;
}
.modern-chat-message .message-content {
position: relative;
}
/* Eigene Nachrichten */
.modern-chat-message.own-message {
flex-direction: row-reverse;
}
/* Username */
.modern-chat-username {
color: var(--primary);
font-weight: 600;
font-size: 0.875rem;
margin-bottom: 4px;
position: relative;
z-index: 1;
}
/* Nachrichtentext */
.modern-chat-text {
background: #F8FAFC;
padding: 10px 10px;
border-radius: 18px;
max-width: 70%;
line-height: 1.4;
position: relative;
}
.own-message .modern-chat-text {
background: var(--primary);
color: white;
}
/* Zeitangabe */
.modern-chat-time {
font-size: 0.75rem;
color: #94A3B8;
margin-top: 4px;
display: block;
}
/* Eingabebereich */
.modern-chat-input-group {
display: flex;
gap: 8px;
position: relative;
}
/* Textfeld */
.modern-chat-message-input {
flex: 1;
padding: 10px 14px;
border: 2px solid var(--border);
border-radius: 8px;
font-size: 1rem;
transition: all 0.2s;
}
.modern-chat-message-input:focus {
border-color: var(--primary);
outline: none;
box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}
/* Emoji-Button (Beispiel) */
.modern-chat-emoji-btn {
width: 44px;
height: 44px;
background: #F1F5F9;
color: var(--text);
border: none;
border-radius: 8px;
font-size: 1.2rem;
cursor: pointer;
margin-right: 0.5rem;
}
/* Senden-Button */
.modern-chat-submit-btn {
width: 44px;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
background: var(--primary);
color: white;
}
.modern-chat-submit-btn:hover {
background: var(--primary-hover);
}
/* Tippen-Indikator */
#typing-indicator {
font-size: 0.85rem;
color: var(--primary);
margin-top: 4px;
min-height: 20px;
}
/* Moderationstools */
.report-btn,
.block-btn,
.edit-btn,
.delete-btn {
position: absolute;
z-index: 10;
background: transparent;
border: none;
cursor: pointer;
display: none;
font-size: 0.7rem;
}
.report-btn {
bottom: 2px;
right: 4px;
color: #e67e22;
}
.block-btn {
bottom: 2px;
right: 50px;
color: #c0392b;
}
.edit-btn {
top: 2px;
right: 24px;
color: #3498db;
font-size: 0.7rem;
}
.delete-btn {
top: 2px;
right: 4px;
color: #e74c3c;
padding: 2px 4px;
}
.modern-chat-message:hover .report-btn,
.modern-chat-message:hover .block-btn,
.own-message:hover .edit-btn,
.own-message:hover .delete-btn {
display: block;
}
/* Sound-Toggle */
.chat-sound-toggle {
display: inline-flex;
align-items: center;
margin-right: 0.5rem;
cursor: pointer;
user-select: none;
font-size: 0.8rem;
color: var(--text);
}
.chat-sound-toggle input[type="checkbox"] {
display: none;
}
.chat-sound-toggle .toggle-label {
margin-left: 0.25rem;
position: relative;
padding-left: 32px;
}
/* Optional Schalter-Stil */
.chat-sound-toggle .toggle-label::before {
content: '';
position: absolute;
left: 0;
top: -1px;
width: 28px;
height: 14px;
background: #ccc;
border-radius: 14px;
transition: background 0.2s;
}
.chat-sound-toggle .toggle-label::after {
content: '';
position: absolute;
left: 0;
top: -3px;
width: 18px;
height: 18px;
background: #fff;
border-radius: 50%;
transition: transform 0.2s;
box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
/* Aktiviert: Schalter nach rechts */
.chat-sound-toggle input[type="checkbox"]:checked + .toggle-label::before {
background: var(--primary);
}
.chat-sound-toggle input[type="checkbox"]:checked + .toggle-label::after {
transform: translateX(10px);
}
/* Animationen */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* Mobile Chat Toggle Icon (schwebendes Symbol) */
.mobile-chat-toggle {
display: none;
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background: var(--primary);
color: white;
border-radius: 50%;
border: none;
z-index: 10000;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
font-size: 1.5rem;
align-items: center;
justify-content: center;
cursor: pointer;
}
/* Badge für neue Nachrichten */
.mobile-chat-toggle .badge {
position: absolute;
top: -5px;
left: 2px;
background: red;
color: #fff;
border-radius: 50%;
padding: 2px 6px;
font-size: 0.7rem;
z-index: 10001;
}
/* Mobile Chat Modal */
.mobile-chat-modal {
display: none;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
max-height: 90%;
background: white;
z-index: 10001;
box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.3);
overflow-y: auto;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
animation: slideUp 0.3s ease-out;
}
/* Schließen-Button im Modal */
.mobile-chat-modal .close-btn {
position: absolute;
top: 10px;
right: 10px;
background: transparent;
border: none;
font-size: 1.5rem;
cursor: pointer;
z-index: 10002;
}
/* Nur mobil: Widget in Sidebar ausblenden und Mobile-Icon anzeigen */
@media screen and (max-width: 768px) {
.mobile-chat-toggle {
display: flex;
}
/* Falls das Chat-Widget in der Sidebar eingebunden ist, ausblenden */
.sidebar .modern-chat-container {
display: none;
}
}
@keyframes slideUp {
from { transform: translateY(100%); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}