/* emtech AI Assistant — original ec6 design (v6.x), kept identical. */

/* ══ ROOT VARIABLES ══ */
#ec6 {
  --R:#ad1e22; --R2:#c9282d; --R3:#8a1519; --R4:#f5d0d1;
  --RG:linear-gradient(145deg,#c9282d 0%,#ad1e22 55%,#7a1519 100%);
  --DK:#140809; --DK2:rgba(18,6,7,.97); --DK3:rgba(30,10,11,.98);
  --W:#fff; --W2:#f9f8f7; --W3:#f2f0ef; --W4:#e9e6e3;
  --G1:#2a2d2d; --G2:#4a4d4d; --G3:#8a8d8d; --G4:#c0c3c3;
  --BD:rgba(42,45,45,.1); --BDL:rgba(42,45,45,.06); --BDR:rgba(173,30,34,.22);
  --SHR:0 8px 32px rgba(173,30,34,.4),0 2px 8px rgba(173,30,34,.24);
  --SH1:0 2px 10px rgba(42,45,45,.07),0 1px 3px rgba(42,45,45,.04);
  --SH2:0 10px 32px rgba(42,45,45,.1),0 2px 8px rgba(42,45,45,.06);
  --FS:'Montserrat',sans-serif;
  --SPR:cubic-bezier(.34,1.56,.64,1);
  --SLK:cubic-bezier(.4,0,.2,1);
  --EASE:cubic-bezier(.25,.46,.45,.94);
}
#ec6, #ec6 * {
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased;
  font-family: var(--FS) !important;
}

/* ══ FAB ══ */
#ec6-fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 54px; height: 54px; border-radius: 50%;
  border: none; outline: none; cursor: pointer;
  z-index: 2147483640; padding: 0;
  background: radial-gradient(ellipse at 32% 26%, #f08090 0%, #c9282d 28%, #ad1e22 58%, #6b1115 100%);
  display: flex; align-items: center; justify-content: center; overflow: visible;
  transition: transform .4s var(--SPR), box-shadow .3s, opacity .3s;
  box-shadow: 0 6px 24px rgba(173,30,34,.55), 0 2px 6px rgba(173,30,34,.3),
    inset 0 2px 8px rgba(255,255,255,.28), inset -2px -3px 8px rgba(0,0,0,.4);
  visibility: visible !important; opacity: 1;
}
#ec6-fab:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 12px 36px rgba(173,30,34,.65), 0 3px 12px rgba(173,30,34,.38),
    inset 0 2px 8px rgba(255,255,255,.3), inset -2px -3px 8px rgba(0,0,0,.44);
}
#ec6-fab.ec6-hidden { transform: scale(0) !important; opacity: 0 !important; pointer-events: none; }
#ec6-fab::before {
  content: ''; position: absolute; top: 9%; left: 18%;
  width: 36%; height: 26%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.6), rgba(255,255,255,.1) 55%, transparent);
  filter: blur(1px); z-index: 3; pointer-events: none;
}
.ec6-cring {
  position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, #ad1e22, #c9282d 60deg, #f5a0a4 120deg, #8a1519 180deg, #ad1e22 240deg, #e8707a 300deg, #ad1e22);
  animation: ec6spin 7s linear infinite; filter: blur(2px); opacity: .8; z-index: -1;
}
@keyframes ec6spin { to { transform: rotate(360deg); } }
.ec6-cring-m {
  position: absolute; inset: 3px; border-radius: 50%;
  background: radial-gradient(ellipse at 32% 26%, #f08090 0%, #c9282d 28%, #ad1e22 58%, #6b1115 100%);
  z-index: -1;
}
.ec6-glow-h {
  position: absolute; inset: -12px; border-radius: 50%;
  background: radial-gradient(circle, rgba(173,30,34,.3), transparent 65%);
  animation: ec6glow 3.5s ease-in-out infinite; z-index: -2;
}
@keyframes ec6glow { 0%,100%{transform:scale(1);opacity:.5} 50%{transform:scale(1.18);opacity:1} }
.ec6-fab-img {
  width: 32px; height: 32px; object-fit: contain;
  position: relative; z-index: 4;
  animation: ec6float 4.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)) brightness(1.1);
}
@keyframes ec6float { 0%,100%{transform:translateY(0) rotate(0deg)} 40%{transform:translateY(-4px) rotate(2deg)} 65%{transform:translateY(-2px) rotate(-1deg)} }
#ec6-bdg {
  position: absolute; top: -3px; right: -3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--RG); border: 2px solid #fff;
  font-size: 10px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 5; box-shadow: 0 2px 10px rgba(173,30,34,.5);
  animation: ec6bp 2.8s ease-in-out infinite;
}
@keyframes ec6bp { 0%,100%{box-shadow:0 0 0 0 rgba(173,30,34,.45)} 60%{box-shadow:0 0 0 8px rgba(173,30,34,0)} }

/* ══ WINDOW ══ */
#ec6-win {
  display: none;
  position: fixed;
  bottom: 10px;
  right: 28px;
  width: 370px;
  height: calc(100vh - 120px);
  max-height: 820px;
  min-height: 460px;
  flex-direction: column; overflow: hidden;
  border-radius: 24px;
  background: var(--W);
  border: 1px solid var(--BD);
  box-shadow: 0 64px 160px rgba(42,45,45,.18), 0 28px 64px rgba(42,45,45,.12), 0 8px 20px rgba(173,30,34,.1),
    inset 0 1px 0 rgba(255,255,255,.9);
  z-index: 2147483642;
  transform-origin: bottom right;
}
#ec6-win::after { display: none; }
#ec6-win.ec6in  { animation: ec6wi .42s var(--SPR) both; }
#ec6-win.ec6out { animation: ec6wo .26s var(--SLK) both; }
@keyframes ec6wi  { from{opacity:0;transform:scale(.84) translateY(30px)} to{opacity:1;transform:scale(1) translateY(0)} }
@keyframes ec6wo  { from{opacity:1;transform:scale(1)} to{opacity:0;transform:scale(.9) translateY(20px)} }

/* ══ CHAT HEADER ══ */
.ec6-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 12px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(42,45,45,.08);
  box-shadow: 0 1px 12px rgba(42,45,45,.06);
  z-index: 5; position: relative;
}
.ec6-bar::after { display: none; }
.ec6-orb-wrap { width: 36px; height: 36px; flex-shrink: 0; position: relative; }
.ec6-orb {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 2px solid rgba(173,30,34,.18);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(173,30,34,.18), 0 1px 4px rgba(173,30,34,.1);
  overflow: hidden; position: relative;
  transition: border-color .35s;
  animation: ec6orbIdle 4s ease-in-out infinite;
}
.ec6-orb img.ec6-orb-logo {
  width: 32px; height: 32px; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  border-radius: 50%; object-fit: contain; z-index: 2;
  mix-blend-mode: multiply;
}
.ec6-orb::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, #ad1e22, #c9282d 60deg, #f5a0a4 120deg, #8a1519 180deg, #ad1e22);
  animation: ec6spin 6s linear infinite; opacity: 0; transition: opacity .4s; z-index: -1;
}
@keyframes ec6orbIdle { 0%,100%{box-shadow:0 4px 16px rgba(173,30,34,.18)} 50%{box-shadow:0 4px 22px rgba(173,30,34,.32)} }
.ec6-orb.thinking { animation: ec6orbT .65s ease-in-out infinite; border-color: rgba(173,30,34,.5); }
.ec6-orb.thinking::before { opacity: .85; }
@keyframes ec6orbT { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
.ec6-orb.listening { animation: ec6orbL .5s ease-in-out infinite; border-color: rgba(173,30,34,.65); }
.ec6-orb.listening::before { opacity: 1; }
@keyframes ec6orbL { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
.ec6-orb-dot {
  position: absolute; bottom: 0px; right: 0px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(34,197,94,.5); z-index: 3;
  animation: ec6ld 2.2s ease-in-out infinite;
}
@keyframes ec6ld { 0%,100%{box-shadow:0 0 6px rgba(34,197,94,.4)} 50%{box-shadow:0 0 16px rgba(34,197,94,.7)} }
.ec6-bar-info { flex: 1; min-width: 0; }
.ec6-bar-info h4 {
  font-size: 12px; font-weight: 800; color: var(--G1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0; padding: 0; line-height: 1.3; text-transform: none; letter-spacing: normal;
}
.ec6-bar-info p {
  font-size: 9px; color: var(--G3); margin: 1px 0 0; padding: 0; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px;
}
.ec6-bar-btns { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.ec6-icon-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--W3); border: 1px solid var(--BD);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--G2); padding: 0;
  transition: all .22s; outline: none;
}
.ec6-icon-btn:hover { background: rgba(173,30,34,.08); color: var(--R); border-color: var(--BDR); }
.ec6-icon-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; }

/* ── Language Selector Button ── */
#ec6-lang-sel {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(173,30,34,.07);
  border: 1.5px solid rgba(173,30,34,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; outline: none; padding: 0;
  transition: background .22s, border-color .22s;
  font-size: 14px; line-height: 1;
  position: relative;
}
#ec6-lang-sel:hover { background: rgba(173,30,34,.14); border-color: var(--R); }

/* ── Language Picker Dropdown ── */
#ec6-lang-picker {
  display: none;
  position: absolute;
  top: calc(100% + 6px); right: 0;
  width: 260px;
  background: #fff;
  border: 1.5px solid rgba(173,30,34,.15);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(42,45,45,.14), 0 4px 16px rgba(42,45,45,.08);
  z-index: 100;
  overflow: hidden;
  animation: ec6fadeIn .22s var(--SPR) both;
}
#ec6-lang-picker.open { display: block; }
.ec6-lp-header {
  padding: 12px 16px 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--G3);
  border-bottom: 1px solid var(--BD);
}
.ec6-lp-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; padding: 8px; max-height: 300px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(173,30,34,.15) transparent;
}
.ec6-lp-grid::-webkit-scrollbar { width: 3px; }
.ec6-lp-grid::-webkit-scrollbar-thumb { background: rgba(173,30,34,.15); border-radius: 3px; }
.ec6-lp-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; border-radius: 10px;
  border: none; background: transparent; cursor: pointer;
  text-align: left; transition: background .18s;
  font-size: 12px; color: var(--G1); line-height: 1.3;
}
.ec6-lp-btn:hover { background: rgba(173,30,34,.07); }
.ec6-lp-btn.active { background: rgba(173,30,34,.1); color: var(--R); font-weight: 700; }

/* ── Restart Button ── */
#ec6-restart {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(173,30,34,.07);
  border: 1.5px solid rgba(173,30,34,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--R); outline: none; padding: 0;
  transition: background .22s, border-color .22s, transform .3s;
  position: relative;
}
#ec6-restart:hover { background: rgba(173,30,34,.14); border-color: var(--R); }
#ec6-restart svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
#ec6-restart:hover svg { transform: rotate(180deg); }
#ec6-restart.spinning svg { animation: ec6restartSpin .55s cubic-bezier(.4,0,.2,1); }
@keyframes ec6restartSpin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
#ec6-restart::after {
  content: ''; position: absolute; inset: -1px; border-radius: 50%;
  border: 1.5px solid rgba(173,30,34,.3);
  animation: ec6rPulse 3s ease-in-out infinite; pointer-events: none;
}
@keyframes ec6rPulse { 0%,100%{transform:scale(1);opacity:.5} 50%{transform:scale(1.22);opacity:0} }

/* ══ MESSAGES AREA ══ */
#ec6-msgs {
  flex: 1 1 auto; overflow-y: auto;
  padding: 14px 14px 10px;
  display: flex; flex-direction: column; gap: 12px;
  background: #fff;
  scrollbar-width: thin; scrollbar-color: rgba(42,45,45,.08) transparent;
  position: relative; overscroll-behavior: contain;
}
#ec6-msgs::-webkit-scrollbar { width: 3px; }
#ec6-msgs::-webkit-scrollbar-thumb { background: rgba(42,45,45,.1); border-radius: 3px; }
#ec6-msgs::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(42,45,45,.03) 1px, transparent 1px);
  background-size: 24px 24px; pointer-events: none; z-index: 0;
}
.ec6-divider {
  display: flex; align-items: center; gap: 10px;
  font-size: 9.5px; font-weight: 700; color: var(--G4);
  letter-spacing: .14em; text-transform: uppercase;
  position: relative; z-index: 1;
}
.ec6-divider::before, .ec6-divider::after { content:''; flex:1; height:1px; background:var(--BD); }
.ec6-row {
  display: flex; flex-direction: column; max-width: 84%;
  position: relative; z-index: 1;
  animation: ec6msg .32s var(--SPR) both;
}
@keyframes ec6msg { from{opacity:0;transform:translateY(14px) scale(.94)} to{opacity:1;transform:translateY(0) scale(1)} }
.ec6-row.bot { align-self: flex-start; }
.ec6-row.usr { align-self: flex-end; align-items: flex-end; }
.ec6-row-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.ec6-row-av {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1.5px solid rgba(173,30,34,.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 2px 8px rgba(173,30,34,.14); overflow: hidden;
}
.ec6-row-av img { width: 18px; height: 18px; object-fit: contain; mix-blend-mode: multiply; }
.ec6-row-time { font-size: 9px; color: var(--G4); font-weight: 600; }
.ec6-bbl {
  padding: 8px 12px; font-size: 12px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
.ec6-bbl.bot {
  background: var(--W);
  border: 1.5px solid var(--BD);
  border-radius: 20px 20px 20px 5px;
  color: var(--G1);
  box-shadow: 0 3px 14px rgba(42,45,45,.07), 0 1px 4px rgba(42,45,45,.04);
  white-space: normal;
}
.ec6-bbl.usr {
  background: var(--RG);
  border-radius: 20px 20px 5px 20px;
  color: #fff; font-weight: 600;
  box-shadow: 0 7px 28px rgba(173,30,34,.38), inset 0 1px 0 rgba(255,255,255,.2);
}
.ec6-bbl strong { font-weight: 800; }
.ec6-bbl a { color: var(--R); text-decoration: none; font-weight: 700; border-bottom: 1px dotted rgba(173,30,34,.3); word-break: break-all; }
.ec6-bbl.usr a { color: rgba(255,255,255,.92); border-bottom-color: rgba(255,255,255,.35); }
/* Lists / paragraphs inside bot replies */
.ec6-bbl.bot p { margin: 0; padding: 0; font-size: 12px; line-height: 1.55; color: var(--G1); }
.ec6-bbl.bot p + p { margin-top: 6px; }
.ec6-bbl.bot .ec6-gap { height: 6px; }
.ec6-bbl.bot ul, .ec6-bbl.bot ol { margin: 4px 0; padding: 0 0 0 18px; }
.ec6-bbl.bot li { margin: 2px 0; padding: 0; font-size: 12px; line-height: 1.5; color: var(--G1); list-style-position: outside; }
.ec6-bbl.bot ul li { list-style-type: disc; }
.ec6-bbl.bot ol li { list-style-type: decimal; }

.ec6-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding-left: 1px; }
.ec6-chip {
  display: inline-flex !important; align-items: center !important;
  padding: 4px 10px !important; font-size: 10.5px !important; font-weight: 700 !important;
  border: 1.5px solid rgba(173,30,34,.2) !important; border-radius: 40px !important;
  background: rgba(173,30,34,.06) !important; color: var(--R) !important;
  cursor: pointer !important; white-space: nowrap !important; transition: all .22s !important;
  line-height: 1.4 !important; text-transform: none !important; letter-spacing: normal !important;
}
.ec6-chip:hover { background: rgba(173,30,34,.13) !important; border-color: var(--R) !important; transform: translateY(-2px) !important; }

/* Typing indicator */
#ec6-typing {
  display: none; align-self: flex-start;
  background: var(--W); border: 1.5px solid var(--BD);
  border-radius: 20px 20px 20px 5px; padding: 14px 18px;
  gap: 5px; align-items: center;
  box-shadow: 0 3px 14px rgba(42,45,45,.07);
  position: relative; z-index: 1;
}
.ec6-td {
  width: 7px; height: 7px; border-radius: 50%; background: var(--G4);
  animation: ec6td 1.4s ease-in-out infinite both;
}
.ec6-td:nth-child(1){animation-delay:-.32s} .ec6-td:nth-child(2){animation-delay:-.16s}
@keyframes ec6td { 0%,80%,100%{transform:scale(.5);opacity:.35} 40%{transform:scale(1.2);opacity:1;background:var(--R2)} }

/* ══ FOOTER ══ */
.ec6-foot {
  flex-shrink: 0;
  background: var(--DK3);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 6px 12px 10px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
#ec6-pr {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding-bottom: 7px;
}
.ec6-pc {
  padding: 5px 4px !important;
  font-size: 10px !important; font-weight: 700 !important;
  border: 1px solid rgba(255,255,255,.1) !important; border-radius: 10px !important;
  background: rgba(255,255,255,.07) !important; color: rgba(255,255,255,.7) !important;
  cursor: pointer !important; transition: all .2s !important;
  white-space: nowrap !important; text-align: center !important;
  display: flex !important; align-items: center !important;
  justify-content: center !important; gap: 3px !important;
  overflow: hidden !important; text-overflow: ellipsis !important;
  line-height: 1.3 !important; text-transform: none !important; letter-spacing: normal !important;
  min-height: 0 !important; height: auto !important; margin: 0 !important;
}
.ec6-pc:hover { border-color: rgba(173,30,34,.5) !important; color: #e05055 !important; background: rgba(173,30,34,.12) !important; transform: translateY(-1px) !important; }
.ec6-irow-wrap { display: flex; align-items: center; gap: 7px; }
.ec6-irow {
  flex: 1; display: flex; align-items: center;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px; padding: 3px 3px 3px 2px;
  transition: border-color .3s, box-shadow .3s, background .3s;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 16px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.9);
  position: relative; overflow: hidden;
}
.ec6-irow::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: ec6shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ec6shimmer {
  0%   { left: -100%; }
  50%  { left: 140%; }
  100% { left: 140%; }
}
.ec6-irow:focus-within {
  border-color: rgba(173,30,34,.45);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(173,30,34,.12), 0 4px 20px rgba(173,30,34,.15), inset 0 1px 0 rgba(255,255,255,1);
}
#ec6-inp {
  flex: 1; border: none !important; background: transparent !important; outline: none !important; box-shadow: none !important;
  padding: 7px 9px !important; font-size: 12.5px; margin: 0 !important; min-width: 0; height: auto !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  letter-spacing: .01em;
}
#ec6-inp::placeholder {
  color: rgba(42,45,45,.38);
  font-weight: 400;
  font-family: 'Montserrat', sans-serif !important;
}
#ec6-send {
  width: 34px; height: 34px; border-radius: 10px; border: none;
  background: var(--RG); color: #fff; padding: 0;
  cursor: pointer; outline: none;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 3px 14px rgba(173,30,34,.45), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .24s var(--SPR), box-shadow .24s, opacity .2s;
  position: relative; overflow: hidden;
}
#ec6-send::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 60%);
  border-radius: 10px; pointer-events: none;
}
#ec6-send:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(173,30,34,.6), inset 0 1px 0 rgba(255,255,255,.25); }
#ec6-send:active { transform: scale(.93); }
#ec6-send.busy { opacity: .45; pointer-events: none; }
#ec6-send svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; position: relative; right: -1px; z-index: 1; }
#ec6-mic {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--RG); color: #fff; padding: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform .24s var(--SPR), box-shadow .24s; outline: none;
  box-shadow: 0 3px 14px rgba(173,30,34,.45), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative; overflow: hidden;
}
#ec6-mic::after {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.2) 0%, transparent 55%);
  pointer-events: none;
}
#ec6-mic:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(173,30,34,.58); }
#ec6-mic:active { transform: scale(.93); }
#ec6-mic.on { animation: ec6micPulse .8s ease-in-out infinite; }
#ec6-mic svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; z-index: 1; position: relative; }
#ec6-vstop {
  display: none; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); background: var(--RG); color: #fff; padding: 0;
  cursor: pointer; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .22s; outline: none;
  animation: ec6micPulse .8s ease-in-out infinite;
  box-shadow: 0 3px 14px rgba(173,30,34,.45);
}
#ec6-vstop:hover { transform: scale(1.06); }
#ec6-vstop svg { width: 11px; height: 11px; fill: currentColor; stroke: none; }
@keyframes ec6micPulse { 0%,100%{box-shadow:0 0 0 0 rgba(173,30,34,.5)} 50%{box-shadow:0 0 0 10px rgba(173,30,34,0)} }
.ec6-branding { text-align: center; margin-top: 5px; font-size: 9px; color: rgba(255,255,255,.25); letter-spacing: .07em; }
.ec6-branding span { color: #8a1519; margin: 0 3px; }

/* ── Message action bar below bot bubble ── */
.ec6-msg-actions {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 2px 0 2px;
}
.ec6-msg-mic {
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent; padding: 0;
  border: 1px solid rgba(42,45,45,.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--G3);
  transition: all .18s; outline: none;
  opacity: 0.75; position: relative;
  animation: none !important;
}
.ec6-msg-mic:hover {
  background: rgba(173,30,34,.08); border-color: rgba(173,30,34,.3);
  color: var(--R); transform: scale(1.1); opacity: 1;
}
.ec6-msg-mic.speaking {
  color: var(--R); border-color: var(--R);
  background: rgba(173,30,34,.1); opacity: 1;
  animation: ec6micPulse .8s ease-in-out infinite !important;
}
.ec6-msg-mic.speaking::after {
  content: 'Stop';
  position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff;
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; pointer-events: none;
  font-family: Arial, sans-serif;
}

/* Voice mode indicator on mic button */
#ec6-mic.voice-mode {
  box-shadow: 0 0 0 3px rgba(173,30,34,.3) !important;
  animation: none;
}
#ec6-mic.voice-mode.on {
  animation: ec6micPulse .8s ease-in-out infinite !important;
}
#ec6-mic.voice-mode::before { display: none; }

/* ══ SOUND WAVE ANIMATION on speaking message ══ */
.ec6-wave {
  display: inline-flex; align-items: flex-end; gap: 2px;
  height: 14px; margin-left: 4px; vertical-align: middle;
  opacity: 0; transition: opacity .2s;
}
.ec6-wave.active { opacity: 1; }
.ec6-wave span {
  display: block; width: 3px; border-radius: 3px;
  background: var(--R);
  animation: ec6waveBar 1s ease-in-out infinite;
}
.ec6-wave span:nth-child(1){ height: 4px;  animation-delay: 0s;   }
.ec6-wave span:nth-child(2){ height: 9px;  animation-delay: .14s; }
.ec6-wave span:nth-child(3){ height: 13px; animation-delay: .28s; }
.ec6-wave span:nth-child(4){ height: 9px;  animation-delay: .42s; }
.ec6-wave span:nth-child(5){ height: 4px;  animation-delay: .56s; }
@keyframes ec6waveBar {
  0%,100%{ transform: scaleY(.35); opacity: .45; }
  50%    { transform: scaleY(1);   opacity: 1;   }
}

/* Locked state */
.ec6-locked #ec6-inp { opacity: .4; cursor: not-allowed; }
.ec6-locked #ec6-send, .ec6-locked #ec6-mic { opacity: .3; cursor: not-allowed; pointer-events: none; }

/* Lang indicator badge */
#ec6-lang-badge {
  display: none; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 40px;
  background: rgba(173,30,34,.1); border: 1px solid rgba(173,30,34,.2);
  font-size: 9.5px; font-weight: 800; color: var(--R);
  letter-spacing: .06em; text-transform: uppercase;
  z-index: 10; white-space: nowrap;
  animation: ec6fadeIn .3s ease both;
}
@keyframes ec6fadeIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }

/* TTS status strip */
#ec6-tts-bar {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 3px 12px 0; gap: 8px; margin-bottom: 5px;
}
#ec6-tts-bar.visible { display: flex; }
#ec6-tts-lang-info {
  font-size: 10px; color: rgba(255,255,255,.4); font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}
#ec6-tts-lang-info .ec6-tts-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  animation: ec6ld 1.8s ease-in-out infinite;
}

/* ══ MOBILE RESPONSIVE ══ */
@media (max-width: 500px) {
  #ec6-win {
    bottom: 0 !important; right: 0 !important; left: 0 !important;
    width: 100% !important; height: 93dvh !important; max-height: 93dvh !important;
    border-radius: 24px 24px 0 0 !important;
    border-left: none !important; border-right: none !important; border-bottom: none !important;
  }
  #ec6-fab { bottom: 20px !important; right: 20px !important; }
  .ec6-row { max-width: 90% !important; }
  #ec6-inp { font-size: 16px !important; }
  .ec6-bbl { font-size: 12px !important; padding: 7px 11px !important; }
  #ec6-lang-picker { right: -8px; width: 240px; }
}
@media (min-width: 501px) and (max-width: 768px) {
  #ec6-win { width: 380px !important; }
}
