/*
    Copyright 2026 | DragonPilot alias Alexander, Thomas Niesner | IT seit 1997
    Handgemachtes anstatt ständige Fixes und oder Bug Fehlersuche | statische Webseiten
    seit internet beginns | ex Unternehmung "die-netzwerk-macher.de" ob nun Inviduelle
    Programmierung oder Templates CMS Optimierungen Wordpress; Drupal; Burning Board;
    Woltlab Suite; Jomla; oder sonstige Exoten- somit diese TLD Webseite(n)
    die-foto-macher.de | fpv-de.com, beginn 2026 - 9 Phase TGv1.9.4 <stable> !

   TG CHAT
   --------------------------------------------------
   Eigenständiges Chat-CSS
*/
.tg-chat {
    width: 100%;
    position: relative;
}
.tg-chat-header {
    margin-bottom: 20px;
}
.tg-chat-header h1 {
    margin-bottom: 5px;
}
.tg-chat-header-subtitle {
    font-size: 13px;
    opacity: 0.7;
}
.tg-chat-content {
    width: 100%;
}
.tg-chat-intro {
    margin-bottom: 20px;
}
.tg-chat-area {
    width: 100%;
}
.tg-chat-message {
    margin-bottom: 15px;
    padding: 12px 15px;
}
.tg-chat-message-name {
    font-weight: bold;
    margin-bottom: 5px;
}
/* ==================================================
   TG CHAT – schwebender Avatar
   ================================================== */
.tg-chat-avatar {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 90px;
    height: 90px;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 6px;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
/* Avatar */
.tg-chat-avatar a {
    display: block;
    width: 70px;
    height: 70px;
    padding: 0;
    margin: 0;
}
.tg-chat-avatar a img {
    display: block;
}
/* Name */
#tgChatAvatarName {
    width: 70px;
    margin: 2px 0 0 0;
    font-size: 0.7rem;
    line-height: 1.1;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}
/* ==================================================
   TG CHAT – sanftes Schweben
   ================================================== */
.tg-chat-avatar img {
    display:block;
    width:70px;
    height:70px;
    object-fit:cover;
    margin:0;
    padding:0;
    animation:tgChatSchweben 5.5s ease-in-out infinite;
}
@keyframes tgChatSchweben {
    0% {
        transform: translate3d(0, 5px, 0) rotate(0deg);
    }
    25% {
        transform: translate3d(0, 3px, 0) rotate(-0.5deg);
    }
    50% {
        transform: translate3d(1px, 0, 0) rotate(0.3deg);
    }
    75% {
        transform: translate3d(-1px, 3px, 0) rotate(0.5deg);
    }
    100% {
        transform: translate3d(0, 5px, 0) rotate(0deg);
    }
}
/* Sprechblase */
.sprechblase {
position: relative;
padding: 1rem;
border: 2px solid #C2E6F2FF;
margin:0 auto;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
background: #fff;
}
.sprechblase:before {
content: ' ';
position: absolute;
width: 0;
height: 0;
left: 30px;
top: 100%;
border: 12px solid;
border-color: #C2E6F2FF transparent transparent #C2E6F2FF;
}
.sprechblase:after {
content: ' ';
position: absolute;
width: 0;
height: 0;
left: 34px;
top: 100%;
border: 9px solid;
border-color: #ffffff transparent transparent #ffffff;
}
/*
 * ==================================================
 * TG CHAT
 * KJen Sprechblase
 * ==================================================
 */
.tg-chat-sprechblase {
    position: fixed;
    z-index: 99990;
    width: 400px;
    max-width: calc(100vw - 40px);
 /*   bottom: 110px; // Orginal erster Wert */
    bottom: 48px;
    max-height: 520px;
    padding: 0;
    border: 2px solid #C2E6F2;
    border-radius: 20px;
    background: #000000;
    overflow: hidden;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        visibility 0.15s ease;
}
/*
 * Chat sichtbar
 */
.tg-chat-sprechblase.aktiv {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
/*
 * Kopf
 */
.tg-chat-sprechblase-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 17px 17px 0 0;
    background: #000000;
    color: #ffffff;
}
/*
 * Schließen
 */
.tg-chat-sprechblase-kopf button {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}
/*
 * Inhalt
 */
.tg-chat-sprechblase-inhalt {
    padding: 14px;
    background: #000000;
    color: #C2E6F2;
    max-height: 450px;
    overflow-y: auto;
    box-sizing: border-box;
}
/*
 * Erste KJen-Nachricht
 */
.tg-chat-nachricht {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 16px;
    background: #000000;
    border: 1px solid #C2E6F2;
    color: #C2E6F2;
    line-height: 1.4;
}
.tg-chat-nachricht-kjen {
    margin-top: 4px;
}
/*
 * Pfeil zum Avatar
 */
.tg-chat-sprechblase:before {
    content: '';
    position: absolute;
    left: -12px;
    top: 28px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 12px solid #ffffff;
}
.tg-chat-sprechblase:after {
    content: '';
    position: absolute;
    left: -9px;
    top: 30px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 10px solid #000000;
}
/* user Komunikation */
.tg-chat-nachricht-user {
    display: block;
    width: fit-content;
    max-width: 85%;
    margin: 8px 0 0 auto;
    padding: 10px 14px;
    border-radius: 16px;
    background: #000000;
    border: 1px solid #FFFFFF;
    color: #FFFFFF;
    line-height: 1.4;
    box-sizing: border-box;
}
.tg-chat-eingabe {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
.tg-chat-eingabe input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid #FFFFFF;
    border-radius: 12px;
    background: #000000;
    color: #FFFFFF;
    box-sizing: border-box;
    outline: none;
}
.tg-chat-eingabe input::placeholder {
    color: #C2E6F2;
}
.tg-chat-eingabe button {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid #FFFFFF;
    border-radius: 12px;
    background: #000000;
    color: #FFFFFF;
    cursor: pointer;
    box-sizing: border-box;
}
.tg-chat-eingabe button:hover {
    background: #FFFFFF;
    color: #000000;
}
/* X nur bei Mouseover sichtbar */
#tgChatAvatarClose {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.tg-chat-avatar:hover #tgChatAvatarClose {
    opacity: 1;
    pointer-events: auto;
}
