.bypoa-agent {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  font-family: inherit;
}

.bypoa-agent__launcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(12, 38, 35, 0.22);
  border-radius: 999px;
  background: #123c35;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 35, 31, 0.2);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.bypoa-agent__launcher-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #f2c36b;
  color: #15332e;
  font-weight: 800;
}

.bypoa-agent__panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  display: grid;
  width: min(380px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 110px));
  grid-template-rows: auto minmax(170px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(25, 53, 48, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 35, 31, 0.24);
}

.bypoa-agent__panel[hidden] {
  display: none;
}

.bypoa-agent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(25, 53, 48, 0.12);
  background: #f7f4ed;
}

.bypoa-agent__eyebrow {
  margin: 0 0 3px;
  color: #6c645b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bypoa-agent__title {
  margin: 0;
  color: #183c35;
  font-size: 1.1rem;
  line-height: 1.2;
}

.bypoa-agent__close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(25, 53, 48, 0.16);
  border-radius: 50%;
  background: #fff;
  color: #183c35;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.bypoa-agent__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
  background: #fbfaf7;
}

.bypoa-agent__message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bypoa-agent__message--agent {
  align-self: flex-start;
  background: #fff;
  color: #253b36;
  border: 1px solid rgba(25, 53, 48, 0.12);
}

.bypoa-agent__message--user {
  align-self: flex-end;
  background: #123c35;
  color: #fff;
}

.bypoa-agent__links {
  display: grid;
  gap: 7px;
  max-width: 88%;
  margin-top: -3px;
}

.bypoa-agent__links a {
  display: block;
  padding: 9px 11px;
  border: 1px solid rgba(25, 53, 48, 0.14);
  border-radius: 7px;
  background: #fff;
  color: #0f4f46;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.bypoa-agent__links a:hover,
.bypoa-agent__links a:focus {
  border-color: rgba(15, 79, 70, 0.42);
  color: #0a3b34;
}

.bypoa-agent__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(25, 53, 48, 0.1);
  background: #fff;
}

.bypoa-agent__quick-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(25, 53, 48, 0.16);
  border-radius: 999px;
  background: #f7f4ed;
  color: #183c35;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.bypoa-agent__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(25, 53, 48, 0.1);
  background: #fff;
}

.bypoa-agent__form input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(25, 53, 48, 0.22);
  border-radius: 7px;
  color: #183c35;
  font: inherit;
}

.bypoa-agent__form button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: #c9973f;
  color: #172b27;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

@media (max-width: 520px) {
  .bypoa-agent {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .bypoa-agent__launcher {
    width: 100%;
    justify-content: center;
  }

  .bypoa-agent__panel {
    right: 0;
    left: 0;
    width: auto;
  }
}
