.umeed-parent-assistant-v5,
.umeed-parent-assistant-v5 * {
  box-sizing: border-box;
}

.umeed-parent-assistant-v5 {
  --upa-maroon: #671526;
  --upa-maroon-deep: #3b0b16;
  --upa-gold: #d7ae4b;
  --upa-gold-soft: #f6df9a;
  --upa-ink: #171720;
  --upa-surface: #ffffff;
  --upa-muted: #69707d;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--upa-ink);
}

.upa5-launcher {
  appearance: none;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: linear-gradient(135deg, #741a2d 0%, #4a0d1a 100%);
  box-shadow: 0 18px 42px rgba(50, 6, 17, .28), inset 0 1px rgba(255,255,255,.18);
  min-width: 184px;
  height: 66px;
  padding: 7px 18px 7px 7px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, opacity .18s ease;
}

.upa5-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(50, 6, 17, .36), inset 0 1px rgba(255,255,255,.2);
}

.upa5-launcher:focus-visible,
.upa5-close:focus-visible,
.upa5-chip:focus-visible,
.upa5-send:focus-visible,
.upa5-input:focus-visible {
  outline: 3px solid rgba(215,174,75,.45);
  outline-offset: 2px;
}

.upa5-launcher-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff7d4, #d9ad44);
  box-shadow: inset 0 0 0 1px rgba(93,52,0,.18), 0 8px 20px rgba(0,0,0,.22);
}

.upa5-launcher-ring img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.upa5-online {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38c976;
  border: 3px solid #5d1425;
}

.upa5-launcher-label {
  display: grid;
  text-align: left;
  line-height: 1.12;
}

.upa5-launcher-label strong {
  font-size: 15px;
  letter-spacing: .01em;
}

.upa5-launcher-label small {
  margin-top: 4px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}

.upa5-panel {
  position: absolute;
  right: 0;
  bottom: 80px;
  width: min(430px, calc(100vw - 30px));
  height: min(680px, calc(100vh - 115px));
  min-height: 510px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 28px;
  background: rgba(250,250,252,.98);
  box-shadow: 0 28px 80px rgba(30, 7, 14, .32), 0 6px 24px rgba(30,7,14,.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.975);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .24s ease, visibility .2s ease;
}

.umeed-parent-assistant-v5.is-open .upa5-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.umeed-parent-assistant-v5.is-open .upa5-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.upa5-header {
  position: relative;
  min-height: 112px;
  padding: 21px 58px 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 0%, rgba(241,205,111,.26), transparent 34%),
    linear-gradient(135deg, #71172b 0%, #4a0d1a 64%, #300812 100%);
}

.upa5-brandmark {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff7d2, #d7ab41);
  box-shadow: inset 0 0 0 1px rgba(81,45,0,.16), 0 12px 26px rgba(0,0,0,.2);
}

.upa5-brandmark img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.upa5-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.upa5-eyebrow {
  color: #f5d57c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.upa5-heading strong {
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -.02em;
}

.upa5-heading > span:last-child {
  color: rgba(255,255,255,.74);
  font-size: 12px;
  line-height: 1.35;
}

.upa5-close {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.upa5-chips {
  padding: 13px 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fff;
  border-bottom: 1px solid #ebecef;
}

.upa5-chips::-webkit-scrollbar { display: none; }

.upa5-chip {
  flex: 0 0 auto;
  border: 1px solid #e1c67d;
  border-radius: 999px;
  background: #fffaf0;
  color: #5b1826;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.upa5-chip:hover {
  background: #681729;
  color: #fff;
  transform: translateY(-1px);
}

.upa5-log {
  overflow-y: auto;
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  background:
    linear-gradient(rgba(248,248,250,.94), rgba(248,248,250,.94)),
    radial-gradient(circle at 15% 15%, rgba(215,174,75,.15), transparent 28%);
  overscroll-behavior: contain;
}

.upa5-message {
  max-width: 88%;
  border-radius: 20px;
  padding: 14px 15px;
  font-size: 14px;
  line-height: 1.55;
  animation: upa5MessageIn .2s ease both;
}

.upa5-message p { margin: 0; }

.upa5-message.user {
  align-self: flex-end;
  border-bottom-right-radius: 7px;
  color: #32100f;
  background: linear-gradient(135deg, #f9e59e, #e8b93e);
  box-shadow: 0 8px 20px rgba(161,114,0,.15);
  font-weight: 650;
}

.upa5-message.assistant {
  align-self: flex-start;
  border: 1px solid #e3e4e9;
  border-bottom-left-radius: 7px;
  background: #fff;
  color: #272b34;
  box-shadow: 0 8px 22px rgba(30,35,46,.06);
}

.upa5-message.welcome {
  max-width: 94%;
  background: linear-gradient(145deg, #fff, #fbf7ec);
  border-color: #ead9aa;
}

.upa5-message.pending {
  color: #717784;
  font-style: italic;
}

.upa5-message-title {
  display: block;
  margin-bottom: 9px;
  color: #5e1726;
  font-size: 15px;
  line-height: 1.25;
}

.upa5-message ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.upa5-message li {
  position: relative;
  padding-left: 18px;
}

.upa5-message li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .58em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d9ad43, #8e5e00);
  box-shadow: 0 0 0 3px rgba(215,174,75,.14);
}

.upa5-message[dir="rtl"] li {
  padding-left: 0;
  padding-right: 18px;
}

.upa5-message[dir="rtl"] li::before {
  left: auto;
  right: 1px;
}

.upa5-note {
  margin-top: 11px !important;
  padding-top: 10px;
  border-top: 1px solid #ece3c9;
  color: #676d78;
  font-size: 12.5px;
}

.upa5-form {
  padding: 12px 13px 10px;
  display: grid;
  grid-template-columns: 1fr 50px;
  gap: 9px;
  background: #fff;
  border-top: 1px solid #e5e6ea;
}

.upa5-input {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 1px solid #d8dae1;
  border-radius: 16px;
  background: #f7f8fa;
  color: #1d2027;
  padding: 0 15px;
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.upa5-input:focus {
  border-color: #b98a25;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(215,174,75,.14);
  outline: none;
}

.upa5-input::placeholder { color: #8b909a; }

.upa5-send {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #74182b, #4c0d1b);
  color: #f5d477;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(82,12,27,.22);
}

.upa5-send:hover span { display: inline-block; transform: translateX(2px); }

.upa5-footer {
  min-height: 30px;
  padding: 0 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: #8a8f98;
  font-size: 10px;
  letter-spacing: .01em;
}

.upa5-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #36bf70;
  box-shadow: 0 0 0 3px rgba(54,191,112,.13);
}

@keyframes upa5MessageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .umeed-parent-assistant-v5 {
    right: 12px;
    bottom: 12px;
  }

  .upa5-launcher {
    min-width: 0;
    width: 62px;
    height: 62px;
    padding: 5px;
    border-radius: 21px;
  }

  .upa5-launcher-ring {
    width: 52px;
    height: 52px;
  }

  .upa5-launcher-label { display: none; }

  .upa5-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: min(720px, calc(100dvh - 16px));
    min-height: 0;
    border-radius: 24px;
    transform-origin: bottom center;
  }

  .upa5-header {
    min-height: 100px;
    padding: 17px 54px 15px 16px;
  }

  .upa5-brandmark {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    border-radius: 18px;
  }

  .upa5-brandmark img {
    width: 45px;
    height: 45px;
  }

  .upa5-heading strong { font-size: 18px; }
  .upa5-heading > span:last-child { font-size: 11px; }
  .upa5-message { max-width: 92%; font-size: 14px; }
  .upa5-log { padding: 15px 13px 20px; }
  .upa5-form { padding: 10px; grid-template-columns: 1fr 48px; }
  .upa5-input, .upa5-send { height: 48px; }
  .upa5-send { width: 48px; }
}

@media (max-width: 370px) {
  .upa5-eyebrow { display: none; }
  .upa5-heading strong { font-size: 17px; }
  .upa5-header { gap: 10px; }
  .upa5-chip { padding: 8px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .upa5-panel,
  .upa5-launcher,
  .upa5-message { transition: none; animation: none; }
}
