@keyframes acw-thinking-gradient {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* Estilo para bolha de mensagem do assistente enquanto está carregando */
:host {
  all: initial;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: Urbanist, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.acw-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 175px;
  height: 52px;
  padding: 4px 20px 4px 8px;
  border: none;
  border-radius: 1000px;
  background: linear-gradient(315deg, rgba(236, 221, 250, 0.00) 52.77%, #ECDDFA 129.08%), rgba(255, 255, 255, 0.80);
  box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.03), 0 4px 6px 0 rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
  display: flex;
  place-items: center;
  justify-content: space-evenly;
  cursor: pointer;
  z-index: var(--acw-z, 999999);
  color: #0E121D;
  transition: background 0.7s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.7s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease, backdrop-filter 0.5s ease, color 0.5s ease;
}

.acw-fab.acw-fab--gradient {
  border: 1px solid transparent;
  background: linear-gradient(white, white) padding-box, linear-gradient(90deg, #EF0044 25%, #7692E1 90%) border-box;
  box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.03), 0 4px 6px 0 rgba(0, 0, 0, 0.03);
}

.acw-fab .fab-text {
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  color: #0E121D;
}

/* 3. MODAL E HEADER */
.acw-modal {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: min(calc(100vw - 40px), 448px);
  height: 520px;
  color: #0f172a;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: all .2s;
  z-index: var(--acw-z, 999999);
  border-radius: 24px;
  border: 1px solid rgba(214, 219, 235, 0.40);
  background: linear-gradient(315deg, rgba(236, 221, 250, 0.00) 52.77%, #ECDDFA 129.08%), rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.03), 0 4px 6px 0 rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(8px);
}

.acw-modal.acw-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.acw-header {
  padding: 24px 24px 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acw-close {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  padding: 0px;
  border: 0;
  color: black;
  cursor: pointer;

  img {
    width: 24px;
    height: 24px;
  }
}

/* 4. MESSAGES E HELLO */
.acw-messages {
  padding: 12px 24px;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.acw-messages::-webkit-scrollbar {
  display: none;
}

.acw-messages .acw-hello {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.acw-messages .acw-hello h2 {
  justify-self: center;
  font-size: 28px;
  max-width: 328px;
  margin-bottom: 8px;
  text-align: center;
  line-height: 120%;
  font-weight: 600;
  background: var(--gradient-brand, linear-gradient(90deg, #EF0044 25%, #7692E1 90%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.acw-messages .acw-hello p {
  color: #4F5979;
  text-align: center;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  margin-top: 16px;
}

.acw-messages .acw-hello a {
  color: #EF0044;
  text-align: center;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
}

.acw-swiper-cards {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.acw-swiper-cards::-webkit-scrollbar {
  display: none;
}

.acw-swiper-cards ul {
  display: flex;
  gap: 16px;
  padding-left: 0;
  margin: 0;
  list-style: none;
  width: max-content;
}

.acw-card {
  display: flex;
  min-width: 160px;
  max-width: 180px;
  min-height: 105px;
  padding: 16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  border-radius: 12px;
  border: 1px solid rgba(79, 89, 121, 0.10);
  background: rgba(255, 255, 255, 0.80);
  text-align: start;
  flex-shrink: 0;
  box-sizing: border-box;
  cursor: pointer;
  outline: none;
}

.acw-card:focus {
  box-shadow: 0 0 0 2px #7692E1;
}

.acw-card-star {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
}

.acw-card-star img {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  transition: opacity 0.3s ease;
}

.acw-card-star .star-gray {
  opacity: 1;
}

.acw-card-star .star-color {
  opacity: 0;
}

.acw-card:hover .acw-card-star .star-gray {
  opacity: 0;
}

.acw-card:hover .acw-card-star .star-color {
  opacity: 1;
}

.acw-card:hover {
  background-color: white !important;
}

.acw-card-text {
  text-align: start;
  padding: 0px;
  color: #4F5979;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%;
  margin-top: auto;
  transition: color 0.3s;
}

.acw-card:hover .acw-card-text {
  color: #2F3133;
}

/* 5. MENSAGENS */
.acw-msg {
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 12px;
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 8px 0;
  line-height: 1.35;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.acw-assistant-icon {
  align-self: start;
}

.acw-msg.user {
  margin-left: auto;
  background: rgba(161, 169, 195, 0.10);
  color: #0E121D;
  border-radius: 8px 0 8px 8px;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%;
}

.acw-msg.pending {
  margin-right: auto;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 6px;
}

.acw-msg.err {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 0px 8px 8px 8px !important;
}

/* 6. FOOTER E INPUT */
.acw-footer {
  padding: 24px;
}

.acw-input-container {
  display: flex;
  width: 100%;
  height: auto;
  align-items: center;
  padding: 8px 8px 8px 16px;
  gap: 16px;
  border-radius: 1000px;
  border: 1px solid rgba(79, 89, 121, 0.10);
  background: #FFF;
  box-shadow: 0 4px 4px 0 rgba(79, 89, 121, 0.05);
  position: relative;
}

.acw-input-container .acw-input-spacer {
  display: flex;
  gap: 8px
}

.acw-input-container .acw-clear-input {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0px;
}

.acw-input-container.thinking {
  border: none;
  transition: box-shadow 0.3s;
  border-radius: 1000px !important;
  box-shadow: 0 4px 4px 0 rgba(79, 89, 121, 0.05);
  background: #fff;
  overflow: hidden;
}

.acw-input-container.thinking::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  border-radius: 1000px;
  background: linear-gradient(90deg, #EF0044 25%, #7692E1 90%);
  background-size: 200% 100%;
  -webkit-background-size: 200% 100%;
  animation: acw-thinking-gradient 2s linear infinite;
  -webkit-animation: acw-thinking-gradient 2s linear infinite;
  pointer-events: none;
}

.acw-input-container.thinking::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  z-index: 1;
  border-radius: 1000px;
  background: #fff;
  pointer-events: none;
}

.acw-input-container.thinking>* {
  position: relative;
  z-index: 2;
}

.acw-input-star {
  width: 24px;
  height: 24px;
}

.acw-input {
  resize: none;
  flex: 1;
  padding: 10px 12px;
  outline: none;
  border: none;
  box-shadow: none;
  font-size: 14px;
  padding: 10px 0px;
  color: #4F5979;
}

.acw-input:disabled {
  background: transparent !important;
  color: #4F5979;
  opacity: 1;
  -webkit-text-fill-color: #4F5979;
  cursor: not-allowed;
}

.acw-send {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  border-radius: 1000px;
  background-color: #EF0044;
  cursor: pointer;
  outline: none;
  border: none;
}

.acw-send--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
  background-color: #DCDCDC !important;
  pointer-events: none;
}

@media (max-width: 480px) {
  .acw-modal {
    right: 10px;
    width: calc(100vw - 20px);
    height: 70vh;
  }
  .acw-footer {
    padding: 12px 16px;
  }
  .acw-messages {
    padding: 8px 16px;
  }
  .acw-input {
    font-size: 16px;
  }
}