.erp-agent-head-actions {
  display: flex;
  gap: 7px;
}

.erp-agent-minimise {
  width: 42px;
  height: 42px;
  border: 1px solid #ffffff55;
  border-radius: 11px;
  background: #ffffff12;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.erp-agent-mini {
  position: fixed;
  z-index: 1300;
  right: 18px;
  top: calc(var(--erp-fixed-chrome-height, 104px) + 12px);
  bottom: auto;
  display: grid;
  grid-template-columns: auto minmax(220px, 390px) auto auto auto;
  align-items: center;
  gap: 8px;
  width: min(690px, calc(100vw - 36px));
  padding: 9px;
  border: 1px solid #5eead4;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 18px 55px #0f172a45;
}

.erp-agent-mini[hidden] { display: none; }
.erp-agent-mini.is-collapsed {
  grid-template-columns: auto;
  width: auto;
  border-radius: 999px;
  padding: 7px;
}
.erp-agent-mini.is-collapsed > :not(.erp-agent-mini-mic),
.erp-agent-mini > [hidden] { display: none !important; }

.erp-agent-mini-mic {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #0f766e, #123047);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 0 0 4px #ccfbf1;
}

.erp-agent-mini.is-listening .erp-agent-mini-mic {
  background: #dc2626;
  box-shadow: 0 0 0 6px #fecaca;
  animation: erp-agent-pulse 1.1s infinite;
}

.erp-agent-mini-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.erp-agent-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.erp-agent-mini-top strong { font-size: 12px; color: #123047; }
.erp-agent-mini-top span {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 10px;
  font-weight: 850;
}
.erp-agent-mini input {
  min-width: 0;
  width: 100%;
  height: 33px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 9px;
  font: inherit;
}
.erp-agent-mini small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
}

.erp-agent-mini-run,
.erp-agent-mini-expand,
.erp-agent-mini-collapse {
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-weight: 850;
  cursor: pointer;
}
.erp-agent-mini-run {
  padding: 0 13px;
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.erp-agent-mini-expand,
.erp-agent-mini-collapse { width: 38px; font-size: 17px; }

@keyframes erp-agent-pulse {
  50% { box-shadow: 0 0 0 10px #fecaca55; }
}

@media (max-width: 760px) {
  .erp-agent-mini {
    right: 8px;
    top: calc(var(--erp-fixed-chrome-height, 66px) + 8px);
    bottom: auto;
    width: calc(100vw - 16px);
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
  .erp-agent-mini-collapse { display: none; }
  .erp-agent-mini-run { padding: 0 10px; }
  .erp-agent-mini-expand { display: none; }
}
