.consultant-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(560px, calc(100% - 24px));
  max-height: 88dvh;
  border: 0;
  border-radius: 24px;
  background: #fcf9f2;
  color: #21172f;
  padding: 25px;
  overflow: auto;
  box-shadow: 0 20px 80px #160e3840;
}
.consultant-dialog::backdrop {
  background: #160e38a6;
  backdrop-filter: blur(4px);
}
.consultant-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.consultant-dialog header p {
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: #805eaa;
  margin: 0;
}
.consultant-dialog h2 {
  font-size: 30px;
  margin: 8px 0;
  line-height: 1.1;
}
.consultant-close {
  background: #eee8f3;
  color: #21172f;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.consultant-intro,
.consultant-small {
  font-size: 12px;
  line-height: 1.6;
  color: #6d6576;
}
.consultant-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 15px 0;
}
.consultant-topics button {
  border: 1px solid #ddd3e7;
  border-radius: 18px;
  background: #fff;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  color: #39264f;
  cursor: pointer;
}
.consultant-chat {
  display: grid;
  gap: 10px;
}
.consultant-bubble {
  margin: 0;
  padding: 13px 15px;
  border-radius: 16px;
  background: #eee8f3;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.consultant-bubble.user {
  background: #f8eebc;
  margin-left: 25px;
}
.consultant-bubble a {
  display: block;
  margin-top: 10px;
  color: #573681;
  font-weight: 700;
  text-decoration: underline;
}
.consultant-question {
  margin-top: 16px;
}
.consultant-dialog label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.consultant-question > div {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}
.consultant-dialog input:not([type="checkbox"]),
.consultant-dialog select,
.consultant-dialog textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  display: block;
  background: white;
  border: 1px solid #d9d0e2;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  color: #21172f;
  margin: 6px 0 12px;
}
.consultant-dialog button[type="submit"] {
  background: #1f1430;
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 12px 17px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.consultant-question input {
  flex: 1;
  margin: 0 !important;
}
.consultant-dialog button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.consultant-callback {
  margin-top: 20px;
  border-top: 1px solid #ddd3e7;
  padding-top: 16px;
}
.consultant-callback summary {
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: revert;
}
.consultant-callback-form {
  padding-top: 16px;
}
.consultant-consent {
  display: flex !important;
  gap: 10px;
  font-weight: 400 !important;
  line-height: 1.5;
}
.consultant-consent input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}
.consultant-trap {
  display: none !important;
}
.consultant-status {
  font-size: 14px;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .consultant-dialog {
    padding: 22px 17px;
  }
  .consultant-question > div {
    flex-wrap: wrap;
  }
  .consultant-question button {
    width: 100%;
  }
}

.consultant-avatar {
  object-fit: contain;
  flex: 0 0 auto;
}
.consultant-dialog header > div {
  flex: 1;
}
.consultant-dialog h2 {
  font-size: 27px;
}

/* Keep the four-leaf TILO silhouette visible at the point of contact. */

.consultant-dialog header {
  position: relative;
  align-items: center;
  padding-right: 30px;
}
.consultant-avatar {
  width: 140px;
  height: 180px;
}
.consultant-close {
  position: absolute;
  top: 0;
  right: 0;
}
@media (max-width: 600px) {

  .consultant-dialog header {
    flex-direction: column;
    padding-right: 0;
    gap: 8px;
    text-align: center;
  }
  .consultant-avatar {
    width: 120px;
    height: 156px;
  }
}

/* Launcher: Tiluś stands above the label, outside of it. The label is a
   dark pill with a gold outline so it stays visible on light and dark
   sections alike. */
.consultant-launch {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: calc(100vw - 40px);
  border: 0;
  padding: 0;
  background: none;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}
.consultant-tilus {
  position: relative;
  z-index: 1;
  display: block;
  width: 188px;
  height: 229px;
  margin-bottom: -18px;
  filter: drop-shadow(0 10px 18px #21172f59);
}
.consultant-tilus img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Tiluś stays in place; on hover only his raised hand waves hello. */
.consultant-hand {
  transform-origin: 33.3% 62%;
}
.consultant-launch:hover .consultant-hand,
.consultant-launch:focus-visible .consultant-hand {
  animation: tilus-wave 1.2s ease-in-out 2;
}
@keyframes tilus-wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  20%,
  60% {
    transform: rotate(-10deg);
  }
  40%,
  80% {
    transform: rotate(6deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .consultant-launch:hover .consultant-hand,
  .consultant-launch:focus-visible .consultant-hand {
    animation: none;
  }
}
.consultant-launch .consultant-launch-copy {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  border: 2px solid #f4d873;
  border-radius: 18px;
  padding: 12px 20px;
  background: #1f1430;
  box-shadow: 0 8px 30px #21172f40;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.consultant-launch small {
  display: block;
  margin-top: 3px;
  color: #f4d873;
  font-size: 12px;
  font-weight: 400;
}
.consultant-launch:focus-visible {
  outline: none;
}
.consultant-launch:focus-visible .consultant-launch-copy {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .consultant-launch {
    right: 12px;
    bottom: 84px;
    max-width: calc(100vw - 24px);
  }
  .consultant-tilus {
    width: 120px;
    height: 146px;
    margin-bottom: -12px;
  }
  .consultant-launch .consultant-launch-copy {
    padding: 9px 14px;
    font-size: 14px;
  }
  .consultant-launch small {
    font-size: 11px;
  }
}
