/* DUKBAP LIVE v5.5.1 - DUKAI */

.chat-card.dukai-active .dukai-presets{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 11px;
}

.chat-card.dukai-active .dukai-preset{
  min-height:28px;
  padding:0 8px;
  border:1px solid rgba(114,87,246,.14);
  border-radius:999px;
  background:rgba(114,87,246,.07);
  color:var(--text);
  font-size:9px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
}

.chat-card.dukai-active .dukai-preset:hover{
  background:rgba(114,87,246,.11);
}

.chat-card.dukai-active .chat-window{
  background:
    linear-gradient(
      180deg,
      rgba(91,163,255,.11),
      rgba(91,163,255,.035)
    ),
    var(--surface-soft);
  border:1px solid var(--line);
  border-radius:24px;
  padding:14px;
}

.chat-card.dukai-active .dukai-row{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  margin-bottom:12px;
}

.chat-card.dukai-active .dukai-row.is-user{
  align-items:flex-end;
}

.chat-card.dukai-active .dukai-sender{
  margin:0 7px 4px;
  color:var(--muted);
  font-size:9px;
  font-weight:850;
  line-height:1.2;
}

.chat-card.dukai-active .dukai-row.is-user .dukai-sender{
  color:var(--purple);
}

.chat-card.dukai-active .dukai-message{
  width:fit-content;
  max-width:78%;
  margin:0;
  padding:11px 14px;
  border-radius:18px;
  box-shadow:0 4px 14px rgba(43,48,67,.05);
}

.chat-card.dukai-active .dukai-message.is-dukai{
  border:1px solid var(--line);
  background:var(--surface-strong);
  color:var(--text);
}

.chat-card.dukai-active .dukai-message.is-user{
  border:1px solid rgba(114,87,246,.15);
  background:rgba(114,87,246,.10);
  color:var(--text);
}

.chat-card.dukai-active .dukai-message .chat-body{
  margin:0;
  color:inherit;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

/* assessment-style unified input pill */
.chat-card.dukai-active .chat-form{
  display:flex;
  align-items:center;
  gap:4px;
  height:46px;
  margin-top:10px;
  padding:3px 4px 3px 14px;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-strong);
  box-shadow:none;
}

.chat-card.dukai-active .chat-form input{
  flex:1;
  min-width:0;
  height:36px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--text);
  outline:none;
  box-shadow:none;
}

.chat-card.dukai-active .chat-form input:focus{
  border:0;
  outline:none;
  box-shadow:none;
}

.chat-card.dukai-active .chat-form button{
  flex:0 0 auto;
  width:36px;
  height:38px;
  min-width:36px;
  max-width:36px;
  min-height:36px;
  max-height:36px;
  aspect-ratio:1 / 1;
  margin:0;
  padding:0;
  box-sizing:border-box;
  display:grid;
  place-items:center;
  border:0;
  border-radius:999px;
  background:
    linear-gradient(
      135deg,
      var(--purple),
      var(--blue)
    );
  color:#fff;
  cursor:pointer;
}

.chat-card.dukai-active .chat-form button svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.chat-card.dukai-active #chat-identity{
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--muted);
}

@media(max-width:759px){
  .chat-card.dukai-active .dukai-message{
    max-width:84%;
  }

  .chat-card.dukai-active .chat-window{
    border-radius:22px;
    padding:12px;
  }

  .chat-card.dukai-active .dukai-preset{
    min-height:27px;
    padding:0 7px;
    font-size:8.8px;
  }
}


/* v551 single-line bubble */
.chat-card.dukai-active .dukai-message.is-single-line{
  border-radius:999px;
  padding-left:16px;
  padding-right:16px;
}


/* v551 echo visual */

.echo-card .chat-window{
  background:
    linear-gradient(
      180deg,
      rgba(91,163,255,.11),
      rgba(91,163,255,.035)
    ),
    var(--surface-soft);
  border:1px solid var(--line);
  border-radius:24px;
  padding:14px;
}

.echo-card .chat-message{
  width:fit-content;
  max-width:78%;
  margin-bottom:12px;
  padding:11px 14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface-strong);
  color:var(--text);
  box-shadow:0 4px 14px rgba(43,48,67,.05);
}

.echo-card .chat-meta{
  margin-bottom:5px;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
}

.echo-card .chat-body{
  font-size:12px;
  line-height:1.55;
}

.echo-card .chat-form{
  display:flex;
  align-items:center;
  gap:4px;
  height:46px;
  margin-top:10px;
  padding:4px 5px 4px 14px;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-strong);
}

.echo-card .chat-form input{
  flex:1;
  min-width:0;
  height:36px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--text);
  outline:none;
  box-shadow:none;
}

.echo-card .chat-form input:focus{
  border:0;
  outline:none;
  box-shadow:none;
}

.echo-card .chat-form > button{
  flex:0 0 auto;
  width:36px;
  height:36px;
  min-width:36px;
  max-width:36px;
  min-height:36px;
  max-height:36px;
  aspect-ratio:1 / 1;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:999px;
  background:
    linear-gradient(
      135deg,
      var(--purple),
      var(--blue)
    );
  color:#fff;
}

.echo-card .chat-form > button svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.echo-card #echo-identity{
  background:transparent;
  border:1px solid var(--line);
  color:var(--muted);
}

.echo-card .empty-state{
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.echo-card #echo-window:has(.empty-state:only-child){
  height:170px;
  min-height:170px;
  max-height:170px;
  display:grid;
  place-items:center;
  box-sizing:border-box;
}

.echo-card #echo-window:has(.empty-state:only-child) .empty-state{
  margin:0;
  padding:0;
}

@media(min-width:1024px){
  .communication-grid > .echo-card{
    grid-column:1 / -1;
  }
}

@media(max-width:759px){
  .echo-card .chat-window{
    border-radius:22px;
    padding:12px;
  }

  .echo-card .chat-message{
    max-width:84%;
  }
}

/* ECHO compact form */
.echo-card .form-note:empty{
  display:none;
  min-height:0;
  margin:0;
  padding:0;
}

.echo-card #echo-form{
  margin-bottom:0;
}

