/* Chat-Fenster des Toughcon-Beratungs-Assistenten: Flieder aus dem Toughcon-Logo, eigenstaendig gegenueber dem Seitenlayout */
.tca { position: fixed; right: 18px; bottom: 84px; z-index: 2147483000; font: 15px/1.45 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; color: #1B1C21; }
.tca *, .tca *::before, .tca *::after { box-sizing: border-box; }
.tca [hidden] { display: none !important; }
/* Steckergesicht als Schaltflaeche: winkt alle zwoelf Sekunden kurz und zeigt dabei eine kleine Sprechblase */
.tca-button { width: 102px; height: 83px; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; display: block; margin-left: auto; overflow: visible; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .3)); transition: transform .15s ease; animation: tca-hop 12s ease-in-out infinite; }
.tca-button:hover, .tca-button:focus-visible { transform: scale(1.08); outline: none; animation: none; }
.tca-button:focus-visible .tca-face { outline: 3px solid #6C6CA6; outline-offset: 2px; border-radius: 12px; }
.tca-face { display: block; overflow: visible; }
.tca-arm { transform-box: fill-box; transform-origin: 0% 100%; animation: tca-wave 12s ease-in-out infinite; }
.tca-button:hover .tca-arm { animation: tca-wave-now 1s ease-in-out infinite; }
.tca-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: tca-blink 5s linear infinite; }
.tca-hint { position: absolute; right: 108px; bottom: 36px; white-space: nowrap; background: #FFFFFF; color: #1B1C21; border: 1px solid #C4C4D2; border-radius: 14px 14px 4px 14px; padding: 6px 12px; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); pointer-events: none; opacity: 0; animation: tca-hint 12s ease-in-out infinite; }
.tca-open .tca-button, .tca-open .tca-hint, .tca-seen .tca-hint { display: none; }
@keyframes tca-wave { 0%, 3% { transform: rotate(0); } 6% { transform: rotate(-20deg); } 9% { transform: rotate(14deg); } 12% { transform: rotate(-20deg); } 15% { transform: rotate(14deg); } 18% { transform: rotate(-12deg); } 21%, 100% { transform: rotate(0); } }
@keyframes tca-wave-now { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(14deg); } }
@keyframes tca-hop { 0%, 2% { transform: translateY(0); } 5% { transform: translateY(-7px); } 8%, 100% { transform: translateY(0); } }
@keyframes tca-blink { 0%, 95%, 100% { transform: scaleY(1); } 97.5% { transform: scaleY(.1); } }
@keyframes tca-hint { 0%, 2% { opacity: 0; transform: translateX(8px); } 6%, 32% { opacity: 1; transform: translateX(0); } 38%, 100% { opacity: 0; transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .tca-button, .tca-arm, .tca-eyes { animation: none; } .tca-hint { animation: none; opacity: 1; } }
.tca-panel { width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 110px)); display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid #C4C4D2; border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .3); overflow: hidden; }
.tca-head { display: flex; align-items: center; gap: 6px; padding: 12px 12px 12px 16px; background: #6C6CA6; color: #FFFFFF; }
.tca-head > div { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.tca-head strong { font-size: 1.05rem; }
.tca-head span { font-size: .8rem; opacity: .9; }
.tca-icon { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #FFFFFF; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.tca-icon:hover, .tca-icon:focus-visible { background: rgba(255, 255, 255, .2); outline: none; }
.tca-log { flex: 1 1 auto; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #F4F4F7; }
.tca-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; overflow-wrap: anywhere; }
.tca-msg p { margin: 0 0 6px; }
.tca-msg p:last-child { margin-bottom: 0; }
.tca-msg ul { margin: 0 0 6px; padding-left: 18px; }
.tca-user { align-self: flex-end; background: #6C6CA6; color: #FFFFFF; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.tca-assistant { align-self: flex-start; background: #FFFFFF; border: 1px solid #DDDDE6; border-bottom-left-radius: 4px; }
.tca-wait { color: #55586A; font-style: italic; }
.tca-error { border-color: #B3261E; color: #B3261E; }
.tca-sources { margin-top: 8px; padding-top: 6px; border-top: 1px solid #DDDDE6; font-size: .8rem; color: #55586A; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tca-sources em, .tca-sources a { font-style: normal; background: #EDEDF3; border-radius: 10px; padding: 1px 8px; }
.tca-sources a { color: #4B4B94; text-decoration: none; }
.tca-sources a:hover { text-decoration: underline; }
.tca-link { display: inline-block; margin-top: 8px; color: #4B4B94; font-weight: 600; text-decoration: none; }
.tca-link:hover { text-decoration: underline; }
.tca-consent { background: #FFFFFF; border: 1px solid #DDDDE6; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.tca-consent p { margin: 0; font-size: .92rem; }
.tca-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #DDDDE6; background: #FFFFFF; }
.tca-form textarea { flex: 1 1 auto; resize: none; min-height: 40px; max-height: 110px; padding: 9px 10px; border: 1px solid #C4C4D2; border-radius: 10px; font: inherit; color: inherit; background: #FFFFFF; }
.tca-form textarea:focus { outline: 2px solid #6C6CA6; outline-offset: 1px; }
.tca-send { border: 0; border-radius: 10px; background: #6C6CA6; color: #FFFFFF; font: inherit; font-weight: 600; padding: 9px 14px; cursor: pointer; align-self: flex-start; }
.tca-send:hover, .tca-send:focus-visible { background: #5A5A94; outline: none; }
.tca-send:disabled { opacity: .55; cursor: default; }
.tca-note { margin: 0; padding: 0 12px 8px; font-size: .74rem; color: #55586A; background: #FFFFFF; }
/* Mobilgeräte: kleinere Figur, Chat-Fenster über fast den ganzen Bildschirm, Sprechblase nur die ersten Male */
@media (max-width: 640px) { .tca-panel { width: calc(100vw - 16px); height: min(640px, calc(100dvh - 90px)); } .tca-form textarea { font-size: 16px; } .tca-icon { width: 40px; height: 40px; } .tca-send { min-height: 42px; } .tca-hint { font-size: 14px; animation-iteration-count: 3; } }
@media (max-width: 480px) { .tca { right: 8px; bottom: 84px; } .tca-button { width: 84px; height: 68px; } .tca-face { width: 84px; height: 68px; } .tca-hint { right: 88px; bottom: 28px; } .tca-panel { height: min(560px, calc(100vh - 96px)); } }
@media print { .tca { display: none; } }
