* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #5f3496;
  color: #1d1d1d;
  scroll-behavior: smooth;
}

body {
  padding-bottom: 80px;
}

a {
  color: #ff9f00;
  text-decoration: none;
}

.header {
  width: 100%;
  background: #ffffff;
  color: #5f3496;
  padding: 10px 12px 8px;
}

.header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding-left: 3%;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-left: -15%;
}

.header-logo {
  width: 250px;
  max-width: 32vw;
  height: auto;
  display: block;
}

.header-copy {
  max-width: 620px;
}

.header-band {
  width: 100%;
  height: 12px;
  background: #5f3496;
}



.page-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 12px 40px;
}

.intro-title {
  color: #5f3496;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.15;
  margin-bottom: 2px;
  white-space: nowrap;
}

.intro-text {
  color: #5f3496;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.chat-container {
  /* background: #fff; */
  border-radius: 12px;
  /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); */
  padding: 22px;
}

.page {
  min-height: 440px;
}

.chat {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 22px;
}

.chat-enter {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.chat-enter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chat_logo {
  width: 36px;
  min-width: 36px;
  height: 36px;
  position: relative;
}

.circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ff9f00;
  box-shadow: 0 4px 10px rgba(255, 159, 0, 0.24);
}

.chat_brand,
.typing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
}

.typing span {
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes blink {

  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.45;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.chat_text {
  background: #f8f8f8;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 18px 20px;
  line-height: 1.3;
  width: fit-content;
  font-size: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.chat_answers {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.answers-title {
  color: #5f3496;
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.answers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.answer-pill {
  border: 1px solid #ffb84d;
  background: linear-gradient(180deg, #ffb347 0%, #ff9f00 100%);
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 17px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 159, 0, 0.24);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  position: relative;
  min-width: 25%;
}

.answer-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(255, 159, 0, 0.28);
  background: linear-gradient(180deg, #ffbc5f 0%, #ffa40f 100%);
}

.answer-pill::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.answer-pill.is-selected {
  background: #818181;
  border-color: #e1e1e1;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(95, 52, 150, 0.22);
}

.chat_text_form {
  width: min(100%, 720px);
}

.form-card-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-helper {
  font-size: 14px;
  color: #575757;
  margin-top: -8px;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flag {
  min-width: 60px;
  text-align: center;
  padding: 13px 10px;
  border-radius: 10px;
  background: #f2f2f2;
  border: 1px solid #d8d8d8;
  font-weight: bold;
}

.input {
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.input::-webkit-outer-spin-button,
.input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.privacy-box {
  display: block;
  background: #fafafa;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 14px;
}

.privacy-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #1d1d1d;
}

.privacy-line input[type="checkbox"] {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 1px;
  accent-color: #5f3496;
}

.privacy-copy {
  margin: 0;
  font-size: 13px;
  color: #575757;
}

.bottone {
  border: 0;
  border-radius: 10px;
  background: #ff9f00;
  color: #fff;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 159, 0, 0.24);
}

.error-message {
  display: none;
  color: #b21f1f;
  font-size: 13px;
  font-weight: bold;
}

.phone-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10001;
}

.phone-modal-card {
  width: min(100%, 450px);
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.phone-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.phone-modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1d1d1d;
}

.phone-modal-copy {
  font-size: 18px;
  line-height: 1.45;
  color: #4b5563;
  margin-bottom: 24px;
}

.phone-modal-input {
  width: 100%;
  border: 2px solid #3b82f6;
  border-radius: 14px;
  padding: 18px 16px;
  font-size: 18px;
  outline: none;
  margin-bottom: 18px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.phone-modal-button {
  border: 0;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  padding: 16px 24px;
  min-width: 200px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.phone-modal-error {
  margin-bottom: 12px;
}

#footer-fixed {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #d6d6d6;
  text-align: center;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  font-size: 11px;
  padding: 10px 12px;
}

#footer-fixed_dentro {
  width: 98%;
  margin: 0 auto;
}

.chat_logo {
  width: 52px;
  min-width: 52px;
  height: 52px;
}

.chat_avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

@media (max-width: 700px) {
  .chat-container {

    padding: 0;
  }

  .chat_text {
    padding: 10px;
    font-size: 15px;

  }

  .header-brand {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-left: 0;
  }

  .header-logo {
    width: 210px;
    max-width: 48vw;
  }

  .header-copy {
    max-width: none;
    text-align: center;
  }

  .intro-title {
    font-size: 15px;
    white-space: normal;
  }

  .intro-text {

    white-space: normal;
  }

  .answers-grid {
    flex-direction: column;
  }

  .answer-pill {
    width: 100%;
    font-size: 16px;
  }

  .phone-row {
    flex-direction: row;
    align-items: center;
  }

  .flag {
    text-align: center;
    width: auto;
    min-width: 60px;
  }
}
