/* ═══════════════════════════════════════════════════════════════════════════
   STYLE HOMES — CONCIERGE DIGITALE (widget chat)
   Stili isolati con prefisso #sh- / .sh- : non toccano il resto del sito.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --sh-ink: #14110f;
  --sh-ink-soft: #221d19;
  --sh-brass: #b08d4f;
  --sh-ivory: #f4efe7;
  --sh-ivory-d: #e7dfd2;
  --sh-paper: #fbf8f3;
  --sh-muted: #8a8078;
  --sh-line: rgba(176, 141, 79, .22);
  --sh-shadow: 0 18px 60px rgba(20, 17, 15, .30), 0 4px 14px rgba(20, 17, 15, .16);
  --sh-serif: 'Cormorant Garamond', Georgia, serif;
  --sh-sans: 'Jost', sans-serif;
  --sh-ease: all .32s cubic-bezier(.4, 0, .2, 1);
}

#sh-trigger {
  position: fixed; bottom: 28px; right: 28px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--sh-ink); border: 1.5px solid var(--sh-brass); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-shadow); transition: var(--sh-ease); z-index: 999999;
}
#sh-trigger:hover { background: var(--sh-ink-soft); transform: scale(1.06); }
#sh-trigger svg { width: 25px; height: 25px; pointer-events: none; }
#sh-trigger .sh-x { display: none; }
#sh-trigger.sh-open .sh-ico { display: none; }
#sh-trigger.sh-open .sh-x { display: block; }

#sh-badge {
  position: absolute; top: -3px; right: -3px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--sh-brass); border: 2px solid var(--sh-ink);
}
#sh-trigger.sh-open #sh-badge, #sh-trigger.sh-seen #sh-badge { display: none; }

#sh-win {
  position: fixed; bottom: 106px; right: 28px; width: 430px; height: 600px;
  background: var(--sh-paper); border-radius: 6px; box-shadow: var(--sh-shadow);
  display: flex; flex-direction: column; overflow: hidden; z-index: 999998;
  transform: scale(.94) translateY(14px); transform-origin: bottom right;
  opacity: 0; pointer-events: none; border: 1px solid var(--sh-line);
  transition: opacity .25s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
#sh-win.sh-open { opacity: 1; pointer-events: all; transform: scale(1) translateY(0); }

@media (max-width: 480px) {
  #sh-win { width: calc(100vw - 20px); right: 10px; bottom: 92px; height: calc(100dvh - 112px); }
  #sh-trigger { bottom: 18px; right: 18px; width: 56px; height: 56px; }
}

.sh-head { background: var(--sh-ink); padding: 20px 22px 18px; display: flex; align-items: center; gap: 14px; position: relative; }
.sh-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sh-brass), transparent);
}
.sh-mono {
  width: 44px; height: 44px; border: 1px solid var(--sh-brass); border-radius: 2px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sh-mono img { width: 30px; height: 30px; object-fit: contain; }
.sh-htext { flex: 1; }
.sh-htext h3 { font-family: var(--sh-serif); font-size: 19px; font-weight: 600; color: var(--sh-ivory); margin: 0; letter-spacing: .4px; line-height: 1.1; }
.sh-htext p { font-family: var(--sh-sans); font-size: 10.5px; color: var(--sh-brass); margin: 3px 0 0; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 300; }

.sh-langs { display: flex; gap: 5px; }
.sh-lang {
  background: transparent; border: 1px solid rgba(176, 141, 79, .4); color: var(--sh-ivory-d);
  font-family: var(--sh-sans); font-size: 10px; font-weight: 400; padding: 3px 8px;
  border-radius: 2px; cursor: pointer; transition: var(--sh-ease); letter-spacing: 1px;
}
.sh-lang:hover, .sh-lang.sh-on { background: var(--sh-brass); color: var(--sh-ink); border-color: var(--sh-brass); }

.sh-msgs {
  flex: 1; overflow-y: auto; padding: 22px 18px; display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth; background: var(--sh-paper);
}
.sh-msgs::-webkit-scrollbar { width: 4px; }
.sh-msgs::-webkit-scrollbar-thumb { background: var(--sh-ivory-d); border-radius: 10px; }

.sh-day { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.sh-day span { font-family: var(--sh-sans); font-size: 10px; color: var(--sh-muted); font-weight: 400; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; }
.sh-day::before, .sh-day::after { content: ''; flex: 1; height: 1px; background: var(--sh-line); }

.sh-msg { display: flex; gap: 9px; align-items: flex-end; animation: sh-in .24s ease both; }
@keyframes sh-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.sh-msg.sh-user { flex-direction: row-reverse; }

.sh-av {
  width: 30px; height: 30px; border-radius: 2px; border: 1px solid var(--sh-brass);
  background: var(--sh-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sh-av img { width: 20px; height: 20px; object-fit: contain; }

.sh-bub {
  max-width: 80%; padding: 12px 15px; font-family: var(--sh-sans); font-size: 13.5px;
  line-height: 1.6; font-weight: 300; word-wrap: break-word; overflow-wrap: break-word;
}
.sh-msg.sh-bot .sh-bub { background: #fff; color: var(--sh-ink); border: 1px solid var(--sh-line); border-radius: 2px 12px 12px 12px; }
.sh-msg.sh-user .sh-bub { background: var(--sh-ink); color: var(--sh-ivory); border-radius: 12px 2px 12px 12px; }
.sh-time { display: block; font-size: 9.5px; margin-top: 5px; opacity: .5; text-align: right; letter-spacing: .5px; }

.sh-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; padding-left: 39px; }
.sh-chip {
  background: transparent; border: 1px solid var(--sh-brass); color: var(--sh-ink);
  font-family: var(--sh-sans); font-size: 11.5px; font-weight: 400; padding: 6px 13px;
  border-radius: 2px; cursor: pointer; transition: var(--sh-ease); letter-spacing: .5px;
}
.sh-chip:hover { background: var(--sh-ink); color: var(--sh-ivory); border-color: var(--sh-ink); }

.sh-typ {
  display: flex; align-items: center; gap: 4px; padding: 13px 15px; background: #fff;
  border: 1px solid var(--sh-line); border-radius: 2px 12px 12px 12px; width: fit-content;
}
.sh-typ-d { width: 7px; height: 7px; background: var(--sh-brass); border-radius: 50%; animation: sh-ty 1.4s ease-in-out infinite; }
.sh-typ-d:nth-child(2) { animation-delay: .2s; }
.sh-typ-d:nth-child(3) { animation-delay: .4s; }
@keyframes sh-ty { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.sh-in-area { padding: 14px 16px 18px; background: var(--sh-paper); border-top: 1px solid var(--sh-line); }
.sh-in-row {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--sh-line);
  border-radius: 3px; padding: 7px 7px 7px 16px; transition: var(--sh-ease);
}
.sh-in-row:focus-within { border-color: var(--sh-brass); box-shadow: 0 0 0 3px rgba(176, 141, 79, .1); }
.sh-in-row input {
  flex: 1; border: none; outline: none; font-family: var(--sh-sans); font-size: 13.5px;
  color: var(--sh-ink); background: transparent; font-weight: 300;
}
.sh-in-row input::placeholder { color: var(--sh-muted); }

.sh-send {
  width: 38px; height: 38px; border-radius: 2px; background: var(--sh-ink); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--sh-ease); flex-shrink: 0;
}
.sh-send:hover { background: var(--sh-brass); }
.sh-send:disabled { background: var(--sh-muted); cursor: not-allowed; }
.sh-send svg { width: 16px; height: 16px; pointer-events: none; }

.sh-bub img { max-width: 100%; border-radius: 3px; margin: 7px 0; display: block; cursor: pointer; }
.sh-bub a { color: var(--sh-brass) !important; font-weight: 400; text-decoration: underline; word-break: break-all; }

.sh-foot {
  text-align: center; font-family: var(--sh-sans); font-size: 9.5px; color: var(--sh-muted);
  margin-top: 9px; letter-spacing: 1px; font-weight: 300; text-transform: uppercase;
}
