/* =============================
   File: /opt/triluma/public/triluma-chat-popup.css
   Version: 2026-06-23 v13.0
   Stand: 2026-05-16
============================= */

.tri-chat-overlay{
  position:fixed;
  inset:0;
  z-index:2147482500;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.50);
}

.tri-chat-modal{
  width:min(800px,95vw);
  max-width:800px;
  min-height:88vh;
  max-height:88vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:var(--tri-white);
  border:1px solid var(--tri-border);
  border-radius:var(--tri-radius);
  box-shadow:0 18px 55px rgba(0,0,0,.25);
  font-family:'Roboto', system-ui, sans-serif;
  color:var(--tri-text);
}

.tri-chat-header{
  flex:0 0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:var(--tri-space-md);
  padding:14px 16px 12px;
  border-bottom:1px solid var(--tri-border);
  background:var(--tri-white);
}

.tri-chat-coach{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.tri-chat-avatar{
  width:72px;
  height:72px;
  border-radius:var(--tri-radius);
  object-fit:cover;
  flex:0 0 auto;
  border:1px solid var(--tri-border);
}

.tri-chat-coach-text{
  min-width:0;
}

.tri-chat-coach-text h2{
  margin:0 0 4px;
  font-family:'EBGaramond', serif;
  font-size:28px;
  line-height:1.1;
  color:var(--tri-blue);
}

.tri-chat-coach-text p{
  margin:0;
  font-size:14px;
  line-height:1.35;
  color:var(--tri-text);
  max-width:62ch;
}

.tri-chat-session-badge{
  display:inline-block;
  margin-top:6px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--tri-blue);
  color:var(--tri-blue-dark);
  font-size:12px;
  line-height:1.4;
  background:var(--tri-bg);
}

.tri-chat-icon-btn{
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid var(--tri-border);
  background:var(--tri-white);
  color:var(--tri-text);
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

.tri-chat-toolbar{
  flex:0 0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 16px;
  border-bottom:1px solid var(--tri-border);
  background:var(--tri-chat-inputs);
}

.tri-chat-toolbar-group{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.tri-chat-toolbar-separator{
  width:1px;
  height:28px;
  background:var(--tri-border);
}

.tri-chat-label{
  font-size:14px;
  color:var(--tri-text);
  white-space:nowrap;
}

.tri-chat-select{
  height:34px;
  max-width:180px;
  border:1px solid var(--tri-border);
  border-radius:6px;
  background:var(--tri-white);
  color:var(--tri-text);
  font:inherit;
  padding:4px 8px;
}

.tri-chat-btn{
  height:34px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--tri-border);
  background:var(--tri-white);
  color:var(--tri-text);
  font:inherit;
  font-size:14px;
  cursor:pointer;
  transition:background .15s ease,color .15s ease,border-color .15s ease;
}

.tri-chat-btn:hover,
.tri-chat-icon-btn:hover{
  background:var(--tri-blue);
  color:var(--tri-white);
  border-color:var(--tri-blue);
}

.tri-chat-voice[aria-pressed="true"]::after{
  content:"";
  display:inline-block;
  width:8px;
  height:8px;
  margin-left:6px;
  border-radius:999px;
  background:var(--tri-red);
}

.tri-chat-messages{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding:14px 16px;
  background:var(--tri-chat-bgchat);
}

.tri-chat-message{
  max-width:78%;
  margin:0 0 10px;
  padding:9px 12px;
  border-radius:12px;
  font-size:15px;
  line-height:1.45;
  word-wrap:break-word;
  white-space:pre-wrap;
  color:var(--tri-black);
}

.tri-chat-message-user{
  margin-left:auto;
  background:var(--tri-chat-bguser);
  color:var(--tri-black);
  border-bottom-right-radius:4px;
}

.tri-chat-message-assistant{
  margin-right:auto;
  background:var(--tri-chat-bgactor);
  color:var(--tri-black);
  border:0;
  border-bottom-left-radius:4px;
}

.tri-chat-message-system{
  margin-left:auto;
  margin-right:auto;
  max-width:70%;
  text-align:center;
  background:transparent;
  color:var(--tri-black);
  border:1px dashed var(--tri-border);
  font-size:13px;
}

.tri-chat-scroll-end{
  position:absolute;
  right:calc(50% - 360px);
  bottom:110px;
  z-index:2147482501;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--tri-blue);
  background:var(--tri-white);
  color:var(--tri-blue-dark);
  font:inherit;
  font-size:13px;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.12);
}

.tri-chat-inputbar{
  flex:0 0 auto;
  padding:10px 16px 12px;
  border-top:1px solid var(--tri-border);
  background:var(--tri-chat-inputs);
}

.tri-chat-input{
  width:100%;
  height:72px;
  min-height:72px;
  max-height:72px;
  resize:none;
  overflow-y:auto;
  border:1px solid var(--tri-border);
  border-radius:var(--tri-radius);
  background:var(--tri-white);
  color:var(--tri-text);
  font:inherit;
  font-size:15px;
  line-height:1.35;
  padding:9px 12px;
}

.tri-chat-input:focus{
  outline:2px dotted var(--tri-blue-dark);
  outline-offset:3px;
}

.tri-session-code{
  display:block;
  margin:12px 0;
  font-size:32px;
  line-height:1.1;
  font-weight:700;
  letter-spacing:.08em;
  color:var(--tri-orange);
}

.tri-session-code-label{
  display:block;
  margin-top:8px;
  font-weight:700;
  color:var(--tri-black);
}

.tri-hidden{
  display:none !important;
}

@media(max-width:720px){
  .tri-chat-overlay{ padding:0; }

  .tri-chat-modal{
    width:100%;
    max-width:none;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
  }

  .tri-chat-header{ align-items:flex-start; }
  .tri-chat-avatar{ width:56px; height:56px; }
  .tri-chat-coach-text h2{ font-size:24px; }

  .tri-chat-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .tri-chat-toolbar-separator{ display:none; }
  .tri-chat-toolbar-group{ flex-wrap:wrap; }
  .tri-chat-message{ max-width:92%; }

  .tri-chat-scroll-end{
    right:16px;
    bottom:106px;
  }
}


/* ===== Version 0.2.1 ===== */

.tri-chat-header{
  align-items:flex-start;
}

.tri-chat-avatar-button{
  display:block;
  padding:0;
  border:0;
  background:none;
  cursor:pointer;
}

.tri-chat-name-row{
  display:flex;
  align-items:flex-start;
  margin:0;
}

.tri-chat-name-row h2{
  margin:0;
}

.tri-chat-coach-text{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:120px;
}

.tri-chat-coach-text p{
  margin:0;
}

.tri-chat-avatar{
  border:none;
}

.tri-chat-image-overlay{
  position:fixed;
  inset:0;
  z-index:2147483600;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,0.82);
}

@media(max-width:720px){
  .tri-chat-coach-text{
    min-height:auto;
  }
}


/* ===== Version 0.2.3 ===== */

.tri-chat-overlay{
  background:rgba(0,0,0,.68);
}

.tri-chat-header{
  align-items:flex-start;
}

.tri-chat-coach{
  align-items:flex-start;
}

.tri-chat-avatar-button{
  display:block;
  width:120px;
  height:120px;
  padding:0;
  border:0;
  background:none;
  cursor:pointer;
  flex:0 0 120px;
}

.tri-chat-avatar,
.tri-chat-avatar.tri-vcoach-avatar{
  width:120px !important;
  height:120px !important;
  min-width:120px !important;
  min-height:120px !important;
  max-width:120px !important;
  max-height:120px !important;
  border:none !important;
  border-radius:8px !important;
  object-fit:cover !important;
  flex-shrink:0 !important;
}

.tri-chat-coach-text{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:120px;
  min-width:0;
}

.tri-chat-name-row{
  margin:0;
}

.tri-chat-name-row h2{
  margin:0;
}

.tri-chat-coach-text p{
  margin:0;
}

.tri-chat-language-flags,
.tri-vcoach-lang{
  margin:6px 0 8px;
}

.tri-chat-image-overlay{
  position:fixed;
  inset:0;
  z-index:2147483600;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.82);
}

.tri-chat-image-overlay .tri-avatar-wrap{
  display:inline-block;
  cursor:default;
}

.tri-chat-image-overlay #tri-image-lightbox-img{
  max-width:min(500px, 92vw);
  max-height:92vh;
  border-radius:24px;
  display:block;
}

.tri-chat-image-overlay .tri-avatar-overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:24px;
  padding:0 8px;
  font-size:12px;
  line-height:16px;
  border-bottom-left-radius:24px;
  border-bottom-right-radius:24px;
}

@media(max-width:720px){
  .tri-chat-avatar-button{
    width:72px;
    height:72px;
    flex-basis:72px;
  }

  .tri-chat-avatar,
  .tri-chat-avatar.tri-vcoach-avatar{
    width:72px !important;
    height:72px !important;
    min-width:72px !important;
    min-height:72px !important;
    max-width:72px !important;
    max-height:72px !important;
  }

  .tri-chat-coach-text{
    min-height:auto;
  }
}


/* ===== Version 0.2.4 ===== */

.tri-chat-avatar-button .tri-avatar-overlay{
  left:0;
  right:0;
  bottom:-1px;
  height:12px;
  padding:0 3px;
  font-size:5px;
  line-height:12px;
  border-bottom-left-radius:8px;
  border-bottom-right-radius:8px;
}

.tri-chat-language-flags,
#tri-chat-language-flags,
.tri-vcoach-lang{
  display:flex !important;
  flex-wrap:wrap;
  gap:6px;
  margin:6px 0 8px;
  min-height:20px;
}

#tri-chat-language-flags img,
.tri-vcoach-lang img{
  width:20px;
  height:20px;
  max-width:20px;
  max-height:20px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid var(--tri-border);
  display:block;
}


/* ========================================
   Chat Popup Fade-In
   ======================================== */

.tri-chat-overlay {
  animation: triFadeIn 0.30s ease-out;
}

.tri-chat-modal {
  animation: triFadeIn 0.30s ease-out;
}

@keyframes triFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== Chat header language bubbles v4 ===== */
#tri-chat-language-flags span,
.tri-chat-language-flags span{
  display:inline-flex;
  align-items:center;
  border:1px solid var(--tri-border);
  border-radius:999px;
  padding:2px 8px;
  font-size:11px;
  line-height:1.4;
  color:var(--tri-blue-dark);
  background:var(--tri-white);
}

/* ===== Handover button v8 ===== */
.tri-chat-handover{
  display:flex;
  justify-content:flex-start;
  gap:8px;
}

.tri-chat-handover-btn{
  border:1px solid var(--tri-blue, #3aa0b8);
  border-radius:999px;
  background:var(--tri-blue, #3aa0b8);
  color:#fff;
  font:inherit;
  font-size:13px;
  line-height:1.2;
  padding:8px 14px;
  cursor:pointer;
}

.tri-chat-handover-btn:hover{
  filter:brightness(.96);
}

/* ===== Final close action v11 ===== */
.tri-chat-final-actions{
  border-style:solid;
  background:rgba(255,255,255,.85);
}

.tri-chat-final-close-btn{
  border:1px solid var(--tri-blue, #3aa0b8);
  border-radius:999px;
  background:var(--tri-blue, #3aa0b8);
  color:#fff;
  font:inherit;
  font-size:13px;
  line-height:1.2;
  padding:8px 16px;
  cursor:pointer;
}

.tri-chat-final-close-btn:hover{
  filter:brightness(.96);
}

.tri-chat-handover-btn:disabled,
.tri-chat-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}


/* ===== Thinking bubble v13 ===== */
.tri-chat-message.tri-chat-thinking{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:auto;
  max-width:max-content;
  margin-right:auto;
  background:var(--tri-chat-bgactor);
  border:0;
  border-bottom-left-radius:4px;
  text-align:left;
  color:var(--tri-black);
}

.tri-chat-thinking-label{
  font-size:14px;
}

.tri-chat-thinking-dots{
  display:inline-flex;
  align-items:center;
  gap:4px;
}

.tri-chat-thinking-dots i{
  width:6px;
  height:6px;
  border-radius:999px;
  background:currentColor;
  opacity:.35;
  animation:triChatThinkingDot 1.05s infinite ease-in-out;
}

.tri-chat-thinking-dots i:nth-child(2){ animation-delay:.15s; }
.tri-chat-thinking-dots i:nth-child(3){ animation-delay:.30s; }

@keyframes triChatThinkingDot{
  0%, 80%, 100%{ transform:translateY(0); opacity:.35; }
  40%{ transform:translateY(-4px); opacity:1; }
}

/* ===== Handover buttons inline v17 ===== */
.tri-chat-handover.tri-chat-handover-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:10px;
}

/* ===== Chat help panel v25 ===== */
.tri-chat-help-btn{
  width:34px;
  padding:0;
  font-weight:700;
}

.tri-chat-help-panel{
  text-align:left;
  cursor:pointer;
}

.tri-chat-help-panel table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
  line-height:1.35;
}

.tri-chat-help-panel th,
.tri-chat-help-panel td{
  border-bottom:1px solid var(--tri-border, #e2e8f0);
  padding:7px 8px;
  vertical-align:top;
}

.tri-chat-help-panel tr:last-child th,
.tri-chat-help-panel tr:last-child td{
  border-bottom:0;
}

.tri-chat-help-panel th{
  width:34%;
  color:var(--tri-blue-dark, #1b6d7e);
  font-weight:700;
  white-space:nowrap;
}


/* ===== Coach switch decision panel v26 ===== */
.tri-chat-switch-panel{
  text-align:left;
  white-space:normal;
}

.tri-chat-switch-panel p{
  margin:0 0 8px;
}

.tri-chat-switch-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin-top:10px;
}

.tri-chat-switch-btn{
  border:1px solid var(--tri-blue, #3aa0b8);
  border-radius:999px;
  background:var(--tri-blue, #3aa0b8);
  color:#fff;
  font:inherit;
  font-size:13px;
  line-height:1.2;
  padding:8px 14px;
  cursor:pointer;
}

.tri-chat-switch-btn-light{
  background:var(--tri-white, #fff);
  color:var(--tri-blue-dark, #1b6d7e);
}

.tri-chat-switch-btn:hover{
  filter:brightness(.96);
}

/* Emergency hard-stop modal – v30 */
.tri-emergency-help-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(7,11,17,.72);
  color:#070b11;
}
.tri-emergency-help-card{
  position:relative;
  width:min(920px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  background:#fff;
  border:3px solid var(--tri-orange, #e78005);
  border-radius:22px;
  box-shadow:0 28px 90px rgba(0,0,0,.36);
  padding:24px 26px 22px;
  color:#070b11;
}
.tri-emergency-help-close{
  position:absolute;
  top:10px;
  right:14px;
  width:36px;
  height:36px;
  border:0;
  border-radius:999px;
  background:#f3f4f6;
  color:#070b11;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}
.tri-emergency-help-card h2{
  margin:0 44px 6px 0;
  color:#070b11;
  font-size:clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight:900;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.tri-emergency-help-lead{
  margin:0 0 16px;
  color:#070b11;
  font-size:1.05rem;
  font-weight:700;
}
.tri-emergency-help-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}
.tri-emergency-help-country{
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:14px;
  background:#fff;
}
.tri-emergency-help-country h3{
  margin:0 0 8px;
  color:#070b11;
  font-size:1.12rem;
  font-weight:900;
}
.tri-emergency-help-country p{
  margin:7px 0;
  color:#070b11;
  font-size:.95rem;
  line-height:1.35;
}
.tri-emergency-help-country a{
  color:var(--tri-orange, #e78005);
  font-weight:900;
  font-size:1.12rem;
  text-decoration:none;
}
.tri-emergency-help-footer{
  margin:16px 0 0;
  padding-top:12px;
  border-top:1px solid #e5e7eb;
  color:#070b11;
  font-weight:800;
  font-size:1rem;
}
@media (max-width:760px){
  .tri-emergency-help-modal{ padding:12px; align-items:flex-start; }
  .tri-emergency-help-card{ width:calc(100vw - 24px); max-height:calc(100vh - 24px); padding:18px 16px; border-radius:18px; }
  .tri-emergency-help-grid{ grid-template-columns:1fr; gap:10px; }
  .tri-emergency-help-country{ padding:12px; }
}


/* =========================================================
   POPUP SCROLL LOCK + SQUARE DESKTOP MODAL
   Stand: 2026-07-02 v1
========================================================= */

html.tri-popup-scroll-locked,
body.tri-popup-scroll-locked{
  overflow:hidden !important;
  overscroll-behavior:none !important;
}


.tri-chat-overlay{
  z-index:2147483400 !important;
  overflow:hidden !important;
  overscroll-behavior:contain !important;
}

.tri-chat-modal{
  width:min(800px, calc(100vw - 36px)) !important;
  max-width:800px !important;
  height:min(800px, calc(100vh - 36px)) !important;
  min-height:0 !important;
  max-height:min(800px, calc(100vh - 36px)) !important;
  overflow:hidden !important;
  overscroll-behavior:contain !important;
}

.tri-chat-messages{
  overscroll-behavior:contain !important;
  -webkit-overflow-scrolling:touch;
}

@media(max-width:720px){
  .tri-chat-overlay{
    padding:0 !important;
  }

  .tri-chat-modal{
    width:100% !important;
    max-width:none !important;
    height:100dvh !important;
    max-height:100dvh !important;
    border-radius:0 !important;
  }
}

/* === TRILUMA_THEME_RESTART30_V4_CHAT_START === */
html[data-theme="dark"] .tri-chat-overlay{ background:rgba(0,0,0,.66) !important; }
html[data-theme="dark"] .tri-chat-modal{
  background:var(--tri-dark-surface, #201f1d) !important;
  color:var(--tri-dark-text, #f3f1ed) !important;
  border:1px solid var(--tri-border) !important;
  box-shadow:var(--tri-dark-shadow, 0 20px 54px rgba(0,0,0,.44)) !important;
}
html[data-theme="dark"] .tri-chat-header,
html[data-theme="dark"] .tri-chat-toolbar,
html[data-theme="dark"] .tri-chat-inputbar{
  background:var(--tri-dark-surface-2, #2a2825) !important;
  color:var(--tri-dark-text, #f3f1ed) !important;
  border-color:var(--tri-border) !important;
}
html[data-theme="dark"] .tri-chat-coach-text p,
html[data-theme="dark"] .tri-chat-label,
html[data-theme="dark"] .tri-chat-session-code-label{ color:var(--tri-dark-text, #f3f1ed) !important; }
html[data-theme="dark"] .tri-chat-session-badge,
html[data-theme="dark"] .tri-chat-select,
html[data-theme="dark"] .tri-chat-input{
  background:var(--tri-dark-surface, #201f1d) !important;
  color:var(--tri-dark-text, #f3f1ed) !important;
  border-color:var(--tri-border) !important;
}
html[data-theme="dark"] .tri-chat-messages{ background:var(--tri-chat-bgchat, #1b1b1a) !important; }
html[data-theme="dark"] .tri-chat-message-user{ background:var(--tri-chat-bguser, #283b31) !important; color:var(--tri-dark-text, #f3f1ed) !important; }
html[data-theme="dark"] .tri-chat-message-assistant{ background:var(--tri-chat-bgactor, #213d46) !important; color:var(--tri-dark-text, #f3f1ed) !important; }
html[data-theme="dark"] .tri-chat-message-system{ color:var(--tri-dark-muted, #cbc4bb) !important; border-color:var(--tri-border) !important; }
html[data-theme="dark"] .tri-chat-btn,
html[data-theme="dark"] .tri-chat-icon-btn,
html[data-theme="dark"] .tri-chat-scroll-end{
  background:transparent !important;
  color:var(--tri-dark-text, #f3f1ed) !important;
  border:1px solid var(--tri-blue) !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .tri-chat-btn:hover,
html[data-theme="dark"] .tri-chat-icon-btn:hover,
html[data-theme="dark"] .tri-chat-scroll-end:hover{
  background:var(--tri-blue) !important;
  color:var(--tri-white) !important;
  border-color:var(--tri-blue) !important;
}
html[data-theme="dark"] .tri-chat-icon-btn[aria-label*="schließen" i],
html[data-theme="dark"] .tri-chat-icon-btn[aria-label*="close" i]{
  width:42px !important; height:42px !important; border-radius:12px !important;
  background:rgba(255,255,255,.08) !important; color:var(--tri-dark-text, #f3f1ed) !important;
}
/* === TRILUMA_THEME_RESTART30_V4_CHAT_END === */


/* === TRILUMA_THEME_RESTART30_V5_CHAT_START === */
html[data-theme="dark"] .tri-chat-overlay{ background:rgba(0,0,0,.42) !important; }
html[data-theme="dark"] .tri-chat-modal{ background:var(--tri-dark-surface,#1d1c1a) !important; color:var(--tri-dark-text,#f3f1ed) !important; border:1px solid var(--tri-dark-border-strong,rgba(255,255,255,.16)) !important; }
html[data-theme="dark"] .tri-chat-header,
html[data-theme="dark"] .tri-chat-toolbar,
html[data-theme="dark"] .tri-chat-inputbar{ background:var(--tri-dark-surface-2,#292623) !important; border-color:var(--tri-dark-border,rgba(255,255,255,.095)) !important; }
/* === TRILUMA_THEME_RESTART30_V5_CHAT_END === */

/* === RESTART_30 DARK OVERLAY HOTFIX v13 START === */
html[data-theme="dark"] .tri-overlay,
html[data-theme="dark"] .tri-session-choice-overlay,
html[data-theme="dark"] #tri-session-choice-overlay.tri-session-choice-overlay,
html[data-theme="dark"] #tri-session-choice-overlay.tri-session-choice-overlay.tri-popup-fade,
html[data-theme="dark"] .tri-contact-overlay,
html[data-theme="dark"] .triluma-contact-overlay,
html[data-theme="dark"] .tri-contact-popup-overlay,
html[data-theme="dark"] .tri-auth-overlay,
html[data-theme="dark"] .tri-login-overlay,
html[data-theme="dark"] .tri-code-overlay,
html[data-theme="dark"] .tri-vcoach-popup-overlay,
html[data-theme="dark"] .tri-companion-info-overlay,
html[data-theme="dark"] .tri-trainer-info-overlay,
html[data-theme="dark"] .tri-talkway-info-overlay,
html[data-theme="dark"] .tri-chat-popup-overlay,
html[data-theme="dark"] .tri-chat-overlay,
html[data-theme="dark"] .tri-companion-chat-overlay,
html[data-theme="dark"] .tri-trainer-chat-overlay,
html[data-theme="dark"] .tri-popup-overlay,
html[data-theme="dark"] .tri-modal-overlay,
html[data-theme="dark"] .cp-overlay,
html[data-theme="dark"] .triluma-roi-overlay,
:root[data-theme="dark"] .tri-overlay,
:root[data-theme="dark"] .tri-session-choice-overlay,
:root[data-theme="dark"] #tri-session-choice-overlay.tri-session-choice-overlay,
:root[data-theme="dark"] .triluma-roi-overlay,
#tri-session-choice-overlay.tri-session-choice-overlay-dark-soft {
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:host([data-theme="dark"]) .tri-overlay,
:host-context(html[data-theme="dark"]) .tri-overlay {
  background: rgba(0, 0, 0, 0.78) !important;
}
/* === RESTART_30 DARK OVERLAY HOTFIX v13 END === */


/* === RESTART_33 PRIVACY INFO + POPUP Z-INDEX v111 START === */
.tri-chat-privacy-btn,
.tri-companion-chat-privacy-btn,
.tri-trainer-chat-privacy-btn{
  white-space:nowrap;
}

/* Auth-/Info-/Confirm-Popups müssen über Chat-Popups liegen. */
.tri-auth-overlay,
.tri-login-overlay,
.tri-code-overlay,
.tri-info-overlay,
.tri-popup-overlay,
.tri-modal-overlay,
.tri-session-login-overlay,
.triluma-auth-overlay,
.triluma-info-overlay,
#tri-info-overlay,
#tri-auth-overlay,
#tri-login-overlay{
  z-index:2147483700 !important;
}

.tri-auth-popup,
.tri-login-popup,
.tri-code-popup,
.tri-info-popup,
.tri-popup,
.tri-modal,
.triluma-auth-popup,
.triluma-info-popup{
  z-index:2147483701 !important;
}
/* === RESTART_33 PRIVACY INFO + POPUP Z-INDEX v111 END === */

/* ===== Header icon actions v112 ===== */
.tri-chat-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
}
.tri-chat-header-tool-btn{
  font-weight:700;
}
@media(max-width:720px){
  .tri-chat-header-actions{ gap:6px; }
  .tri-chat-header-actions .tri-chat-icon-btn{
    width:34px;
    height:34px;
    min-width:34px;
    min-height:34px;
    font-size:20px;
  }
}

/* ===== Header icon fine-tuning v113 ===== */
.tri-chat-header-actions{
  gap:6px;
}
.tri-chat-header-tool-btn{
  width:32px;
  height:32px;
  min-width:32px;
  min-height:32px;
  padding:0;
  font-size:20px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
}
#tri-chat-privacy{
  font-size:22px;
  line-height:1;
  padding-left:1px;
}
#tri-chat-close{
  margin-left:10px;
}
@media(max-width:720px){
  .tri-chat-header-actions{ gap:5px; }
  .tri-chat-header-tool-btn{
    width:30px;
    height:30px;
    min-width:30px;
    min-height:30px;
    font-size:18px;
  }
  #tri-chat-privacy{ font-size:20px; }
  #tri-chat-close{ margin-left:8px; }
}

/* ===== Header icon fine-tuning v114 ===== */
.tri-chat-header-tool-btn{
  font-weight:500 !important;
  font-size:18px !important;
}
.tri-chat-privacy-symbol-btn{
  font-size:15px !important;
  font-weight:500 !important;
  line-height:1 !important;
  padding-left:0 !important;
}
#tri-chat-privacy{
  font-size:15px !important;
}
@media(max-width:720px){
  .tri-chat-header-tool-btn{
    font-size:16px !important;
  }
  .tri-chat-privacy-symbol-btn,
  #tri-chat-privacy{
    font-size:13px !important;
  }
}

/* ===== Chat root z-index restore v116 ===== */
#triluma-chat-popup,
#triluma-companion-chat-popup,
#triluma-trainer-popup{
  position:fixed !important;
  inset:0 !important;
  z-index:2147483400 !important;
  pointer-events:none !important;
}

#triluma-chat-popup .tri-chat-overlay,
#triluma-companion-chat-popup .tri-companion-chat-overlay,
#triluma-trainer-popup .tri-trainer-chat-overlay{
  pointer-events:auto !important;
}

/* ===== Session save/load popup above chat v119 ===== */
.tri-session-login-overlay,
.tri-auth-overlay,
.tri-login-overlay,
.tri-code-overlay,
.tri-confirm-overlay,
.tri-info-overlay,
.triluma-auth-overlay,
.triluma-info-overlay,
#tri-session-login-overlay,
#tri-auth-overlay,
#tri-login-overlay,
#tri-code-overlay,
#tri-confirm-overlay,
#tri-info-overlay{
  position:fixed !important;
  inset:0 !important;
  z-index:2147483700 !important;
}

.tri-session-login-popup,
.tri-auth-popup,
.tri-login-popup,
.tri-code-popup,
.tri-confirm-popup,
.tri-info-popup,
.triluma-auth-popup,
.triluma-info-popup{
  position:relative !important;
  z-index:2147483701 !important;
}
