.tcs-widget,
.tcs-widget-pill {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99998;
  font-family: inherit;
  letter-spacing: 0;
}

.tcs-widget[hidden],
.tcs-widget-pill[hidden] {
  display: none !important;
}

.tcs-widget {
  --tcs-widget-ink: #fff7ea;
  --tcs-widget-muted: rgba(255, 247, 234, .72);
  --tcs-widget-accent: #d5a45f;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 247, 234, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 8%, rgba(213, 164, 95, .34), transparent 34%),
    radial-gradient(circle at 8% 92%, rgba(129, 72, 43, .34), transparent 38%),
    linear-gradient(145deg, #19130f 0%, #2d2119 58%, #11100e 100%);
  color: var(--tcs-widget-ink);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .36),
    0 3px 16px rgba(0, 0, 0, .18);
  padding: 20px;
  transform: translateY(0);
  animation: tcs-widget-rise .36s ease-out both;
}

.tcs-widget::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid rgba(255, 247, 234, .1);
  border-radius: 14px;
  pointer-events: none;
}

.tcs-widget::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--tcs-widget-accent), transparent);
  opacity: .9;
}

.tcs-widget__glow {
  position: absolute;
  inset: auto -52px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(213, 164, 95, .16);
  filter: blur(8px);
  pointer-events: none;
}

.tcs-widget__close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 247, 234, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: var(--tcs-widget-ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.tcs-widget__close:hover {
  background: rgba(255, 255, 255, .14);
}

.tcs-widget__brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 38px 18px 0;
}

.tcs-widget__mark,
.tcs-widget-pill__mark {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff7ea;
  color: #1b1510;
  font-weight: 900;
  font-size: 18px;
  font-family: Georgia, "Times New Roman", serif;
}

.tcs-widget__mark {
  width: 42px;
  height: 42px;
  box-shadow: inset 0 0 0 1px rgba(27, 21, 16, .1);
}

.tcs-widget__name,
.tcs-widget__eyebrow {
  display: block;
}

.tcs-widget__name {
  color: var(--tcs-widget-ink);
  font-weight: 850;
  line-height: 1.15;
}

.tcs-widget__eyebrow {
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--tcs-widget-accent);
  font-size: 10px;
  font-weight: 850;
}

.tcs-widget__title {
  margin: 0;
  color: var(--tcs-widget-ink);
  font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.06;
  font-weight: 900;
}

.tcs-widget__body {
  margin: 12px 0 0;
  color: var(--tcs-widget-muted);
  font-size: 15px;
  line-height: 1.52;
}

.tcs-widget__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.tcs-widget__cta,
.tcs-widget__cta:visited {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff7ea;
  color: #1b1510 !important;
  text-decoration: none;
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.tcs-widget__cta:hover {
  transform: translateY(-1px);
}

.tcs-widget__secondary,
.tcs-widget__secondary:visited {
  color: var(--tcs-widget-ink);
  font-size: 13px;
  font-weight: 850;
  text-decoration-color: rgba(213, 164, 95, .8);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.tcs-widget-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 247, 234, .18);
  background: linear-gradient(145deg, #19130f, #33251b);
  color: #fff7ea;
  border-radius: 999px;
  padding: 9px 14px 9px 9px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .28);
  cursor: pointer;
  font-weight: 850;
}

.tcs-widget-pill__mark {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

[data-context="ghostwriting"] {
  --tcs-widget-accent: #e2b170;
  background:
    radial-gradient(circle at 92% 8%, rgba(226, 177, 112, .35), transparent 34%),
    radial-gradient(circle at 12% 92%, rgba(65, 83, 72, .38), transparent 38%),
    linear-gradient(145deg, #17120f 0%, #32231a 58%, #11100e 100%);
}

[data-context="servizi"] {
  --tcs-widget-accent: #d7b2df;
  background:
    radial-gradient(circle at 90% 12%, rgba(215, 178, 223, .28), transparent 36%),
    radial-gradient(circle at 10% 92%, rgba(122, 86, 136, .28), transparent 40%),
    linear-gradient(145deg, #17161d 0%, #2a2431 58%, #11100e 100%);
}

[data-context="lavoriamo"] {
  --tcs-widget-accent: #f0c987;
  background:
    radial-gradient(circle at 88% 10%, rgba(240, 201, 135, .32), transparent 35%),
    radial-gradient(circle at 10% 92%, rgba(75, 60, 43, .36), transparent 40%),
    linear-gradient(145deg, #17130f 0%, #30271f 58%, #11100e 100%);
}

@keyframes tcs-widget-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .tcs-widget,
  .tcs-widget-pill {
    right: 12px;
    bottom: 12px;
  }

  .tcs-widget {
    width: calc(100vw - 24px);
    padding: 18px;
  }

  .tcs-widget__actions {
    grid-template-columns: 1fr;
  }

  .tcs-widget__secondary {
    justify-self: start;
  }
}
