/* =============================
 * File: /opt/triluma/public/triluma-popup.css
 *
 * Popup styles (isolated via Shadow DOM). No external dependencies.
 *
 * Version: 1.1.0
 * Last Updated: 2026-04-15
 * ============================= */

:host{
  --popup-radius:12px;
  --popup-shadow:0 12px 40px rgba(0,0,0,.25);

  --font-head:'EBGaramond', serif;
  --font-body:'Roboto', system-ui, -apple-system, Segoe UI, Arial, sans-serif;

  --text:var(--tri-text);
  --headline:var(--tri-blue);
}

*{ box-sizing:border-box; }

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

.tri-modal{
  width:min(626px, calc(100vw - 36px));
  background:var(--tri-white);
  border-radius:var(--popup-radius);
  box-shadow:var(--popup-shadow);
  padding:26px 30px 24px;
}

.tri-title{
  margin:0 0 10px 0;
  font-family:var(--font-head);
  font-weight:400;
  font-size:34px;
  line-height:1.05;
  color:var(--headline);
  letter-spacing:.2px;
}

.tri-copy{
  margin:0 0 14px 0;
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.35;
  color:var(--tri-text);
}

.tri-input{
  width:100%;
  height:56px;
  padding:0 22px;
  border-radius:999px;
  border:2px solid var(--tri-blue);
  outline:none;
  font-family:var(--font-body);
  font-size:28px;
  text-align:center;
  letter-spacing:.5em;
  color:var(--tri-text);
  background:var(--tri-white);
}

.tri-input::placeholder{
  color:var(--tri-grey-light);
  letter-spacing:.5em;
}

.tri-input:focus{
  box-shadow:0 0 0 4px rgba(58,160,184,.18);
}

.tri-input[disabled]{
  border-color:var(--tri-grey-light);
  color:var(--tri-grey-light);
}

.tri-input[disabled]::placeholder{
  color:var(--tri-grey-light);
}

.tri-checkrow{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin:14px 0 0 0;
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.25;
  color:var(--tri-text);
}

.tri-checkrow small{
  display:block;
  margin-top:2px;
  font-size:13px;
  line-height:1.25;
  color:var(--tri-text);
  opacity:.85;
}

.tri-checkrow em{
  font-style:italic;
}

.tri-check{
  width:18px;
  height:18px;
  margin-top:3px;
  border:2px solid var(--tri-blue);
  border-radius:2px;
  appearance:none;
  -webkit-appearance:none;
  background:var(--tri-white);
  cursor:pointer;
  flex:0 0 auto;
}

.tri-check:checked{
  background:var(--tri-blue);
  border-color:var(--tri-blue);
  box-shadow:inset 0 0 0 3px var(--tri-white);
}

.tri-check:disabled{
  border-color:var(--tri-grey-light);
  cursor:not-allowed;
}

.tri-check:disabled:checked{
  background:var(--tri-grey-light);
  border-color:var(--tri-grey-light);
}

.tri-error {
  margin-top: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--tri-orange);
  letter-spacing: 0.2px;
}

.tri-hint{
  margin:12px 0 0 0;
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.25;
  color:var(--tri-orange);
}

.tri-actions{
  display:flex;
  gap:26px;
  justify-content:center;
  margin-top:20px;
}

/* =========================================================
   POPUP BUTTONS (strict isolated)
========================================================= */

:host {
  --tri-popup-btn-radius: 999px;
  --tri-popup-btn-height: 52px;
  --tri-popup-btn-font-size: 18px;
  --tri-popup-btn-padding: 0 22px;
}

/* Base */
.tri-popup-btn {
  min-width: 210px;
  height: var(--tri-popup-btn-height);
  padding: var(--tri-popup-btn-padding);
  border-radius: var(--tri-popup-btn-radius);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: var(--tri-popup-btn-font-size);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

/* Primary (Absenden) */
.tri-popup-btn-primary {
  background: var(--tri-blue);
  color: var(--tri-text);
  border-color: var(--tri-blue);
}

.tri-popup-btn-primary:hover {
  background: var(--tri-blue-dark);
  border-color: var(--tri-blue-dark);
  color: var(--tri-orange);
}

/* Typ2 (Abbruch) */
.tri-popup-btn-typ2 {
  background: transparent;
  color: var(--tri-text);
  border-color: var(--tri-blue);
}

.tri-popup-btn-typ2:hover {
  background: var(--tri-blue);
  color: var(--tri-white);
}

/* Disabled */
.tri-popup-btn[disabled] {
  border-color: var(--tri-grey-light);
  color: var(--tri-grey-light);
  cursor: not-allowed;
}

.tri-popup-btn[disabled]:hover {
  background: transparent;
  color: var(--tri-grey-light);
}

.tri-btn.mic.on,
.tri-btn.mic:hover{
  background:var(--tri-orange);
  color:var(--tri-text);
  border-color:var(--tri-orange);
}

@media (max-width: 640px){
  .tri-overlay{
    align-items:flex-end;
    padding:0;
  }

  .tri-modal{
    width:100%;
    max-width:none;
    border-radius:16px 16px 0 0;
    padding:20px 18px 18px;
  }

  .tri-title{
    font-size:28px;
  }

  .tri-copy{
    font-size:15px;
  }

  .tri-input{
    font-size:24px;
    letter-spacing:.35em;
  }

  .tri-actions{
    flex-direction:column;
    gap:12px;
  }

  .tri-btn{
    width:100%;
    min-width:0;
  }
}
/* === TRILUMA_THEME_RESTART30_V4_AUTH_START === */
:host-context(html[data-theme="dark"]){
  --text:var(--tri-dark-text, #f3f1ed);
  --headline:var(--tri-blue);
}
:host-context(html[data-theme="dark"]) .tri-overlay{ background:rgba(0,0,0,.66) !important; }
:host-context(html[data-theme="dark"]) .tri-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;
}
:host-context(html[data-theme="dark"]) .tri-copy,
:host-context(html[data-theme="dark"]) .tri-checkrow,
:host-context(html[data-theme="dark"]) .tri-checkrow small{ color:var(--tri-dark-text, #f3f1ed) !important; }
:host-context(html[data-theme="dark"]) .tri-input{
  background:var(--tri-dark-surface-2, #2a2825) !important;
  color:var(--tri-dark-text, #f3f1ed) !important;
  border-color:var(--tri-blue) !important;
}
:host-context(html[data-theme="dark"]) .tri-input::placeholder{ color:var(--tri-dark-muted, #cbc4bb) !important; }
:host-context(html[data-theme="dark"]) .tri-check{
  background:var(--tri-dark-surface-2, #2a2825) !important;
  border-color:var(--tri-blue) !important;
}
:host-context(html[data-theme="dark"]) .tri-popup-btn-typ2{
  background:transparent !important;
  color:var(--tri-dark-text, #f3f1ed) !important;
  border-color:var(--tri-blue) !important;
}
:host-context(html[data-theme="dark"]) .tri-popup-btn-typ2:hover{
  background:var(--tri-blue) !important;
  color:var(--tri-white) !important;
}
/* === TRILUMA_THEME_RESTART30_V4_AUTH_END === */


/* === TRILUMA_THEME_RESTART30_V5_AUTH_START === */
:host([data-theme="dark"]),
:host-context(html[data-theme="dark"]){
  --text:var(--tri-dark-text, #f3f1ed);
  --headline:var(--tri-blue);
}
:host([data-theme="dark"]) .tri-overlay,
:host-context(html[data-theme="dark"]) .tri-overlay,
html[data-theme="dark"] .tri-overlay{ background:rgba(0,0,0,.42) !important; }
:host([data-theme="dark"]) .tri-modal,
:host-context(html[data-theme="dark"]) .tri-modal,
html[data-theme="dark"] .tri-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;
  box-shadow:var(--tri-dark-shadow, 0 20px 54px rgba(0,0,0,.44)) !important;
}
:host([data-theme="dark"]) .tri-copy,
:host([data-theme="dark"]) .tri-checkrow,
:host([data-theme="dark"]) .tri-checkrow small,
:host-context(html[data-theme="dark"]) .tri-copy,
:host-context(html[data-theme="dark"]) .tri-checkrow,
:host-context(html[data-theme="dark"]) .tri-checkrow small,
html[data-theme="dark"] .tri-copy,
html[data-theme="dark"] .tri-checkrow,
html[data-theme="dark"] .tri-checkrow small{ color:var(--tri-dark-text, #f3f1ed) !important; }
:host([data-theme="dark"]) .tri-input,
:host-context(html[data-theme="dark"]) .tri-input,
html[data-theme="dark"] .tri-input{
  background:var(--tri-dark-surface-2, #292623) !important;
  color:var(--tri-dark-text, #f3f1ed) !important;
  border-color:var(--tri-blue) !important;
}
:host([data-theme="dark"]) .tri-input::placeholder,
:host-context(html[data-theme="dark"]) .tri-input::placeholder,
html[data-theme="dark"] .tri-input::placeholder{ color:var(--tri-dark-muted, #cbc4bb) !important; opacity:1 !important; }
:host([data-theme="dark"]) .tri-check,
:host-context(html[data-theme="dark"]) .tri-check,
html[data-theme="dark"] .tri-check{ background:var(--tri-dark-surface-2, #292623) !important; border-color:var(--tri-blue) !important; }
:host([data-theme="dark"]) .tri-popup-btn-typ2,
:host-context(html[data-theme="dark"]) .tri-popup-btn-typ2,
html[data-theme="dark"] .tri-popup-btn-typ2{ background:transparent !important; color:var(--tri-dark-text, #f3f1ed) !important; border-color:var(--tri-blue) !important; }
:host([data-theme="dark"]) .tri-popup-btn[disabled],
:host-context(html[data-theme="dark"]) .tri-popup-btn[disabled],
html[data-theme="dark"] .tri-popup-btn[disabled]{ color:var(--tri-dark-muted, #cbc4bb) !important; border-color:var(--tri-dark-border-strong, rgba(255,255,255,.16)) !important; }
/* === TRILUMA_THEME_RESTART30_V5_AUTH_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 === */
