.ri-webchat {
  --chat-ink: #143a44;
  --chat-gold: #d2b46d;
  --chat-paper: #f6f4ee;
  --chat-display: var(--font-display, Georgia, serif);
  --chat-body: var(--font-body, system-ui, sans-serif);
  color: var(--chat-ink);
  font: 400 15px/1.55 var(--chat-body);
}

.ri-webchat[data-profile="immowert"] {
  --chat-ink: #123941;
  --chat-gold: #e5bd67;
  --chat-paper: #f5f3ed;
}

.ri-webchat[data-profile="marktpreisreport"] {
  --chat-ink: #3c3026;
  --chat-gold: #efbd3b;
  --chat-paper: #f8f2e3;
}

.ri-webchat *,
.ri-webchat *::before,
.ri-webchat *::after {
  box-sizing: border-box;
}

.ri-webchat [hidden] {
  display: none !important;
}

.ri-webchat :is(button, a):focus-visible {
  outline: 3px solid var(--chat-gold);
  outline-offset: 3px;
}

.ri-webchat :is(.ri-webchat-toggle, .ri-webchat-start) {
  min-height: 44px;
  padding: .62rem 1rem;
  color: #fff;
  background: var(--chat-ink);
  border: 1px solid var(--chat-gold);
  border-radius: 999px;
  font: 600 14px/1.3 var(--chat-body);
  cursor: pointer;
}

.ri-webchat-toggle {
  position: fixed;
  inset-inline-start: max(16px, env(safe-area-inset-left));
  inset-block-end: max(18px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  box-shadow: 0 5px 20px #132e3625;
}

.ri-webchat-toggle svg {
  width: 21px;
  height: 21px;
  color: var(--chat-gold);
}

.ri-webchat-dialog {
  position: fixed;
  inset: auto auto max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  width: min(460px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  margin: 0;
  padding: 0;
  overflow: auto;
  color: var(--chat-ink);
  background: #fff;
  border: 1px solid #aebbb7;
  border-radius: 19px;
  box-shadow: 0 20px 65px #132e3640;
}

.ri-webchat-dialog::backdrop {
  background: #132e3647;
}

.ri-webchat-header {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem .9rem;
  background: var(--chat-paper);
  border-bottom: 1px solid #d8dedb;
}

.ri-webchat-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--chat-gold);
  background: var(--chat-ink);
  font-weight: 650;
}

.ri-webchat-identity {
  flex: 1;
  min-width: 0;
}

.ri-webchat-title {
  display: block;
  margin: 0;
  color: var(--chat-ink);
  font: 600 16px/1.3 var(--chat-body);
}

.ri-webchat-subtitle {
  display: block;
  margin: .15rem 0 0;
  color: var(--chat-ink);
  font-size: 12px;
}

.ri-webchat-close {
  flex: 0 0 44px;
  min-height: 44px;
  color: var(--chat-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font: 400 25px/1 var(--chat-body);
  cursor: pointer;
}

.ri-webchat-end {
  min-height: 44px;
  padding: .25rem;
  color: var(--chat-ink);
  background: transparent;
  border: 0;
  font: 500 12px/1.2 var(--chat-body);
  cursor: pointer;
}

.ri-webchat-intro {
  padding: 1.3rem;
}

.ri-webchat-headline {
  display: block;
  margin: 0;
  color: var(--chat-ink);
  font: 400 25px/1.2 var(--chat-display);
}

.ri-webchat-intro p {
  margin: .7rem 0 1rem;
}

.ri-webchat-intro a {
  color: var(--chat-ink);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.ri-webchat-alternative {
  margin-inline-start: .65rem;
  font-size: 13px;
}

.ri-webchat-status:empty {
  display: none;
}

.ri-webchat-frame {
  display: block;
  width: 100%;
  height: min(570px, calc(100dvh - 120px));
  min-height: 200px;
  border: 0;
}

@media (max-width: 480px) {
  .ri-webchat-dialog {
    inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px;
    width: calc(100% - 16px);
  }

  .ri-webchat-toggle {
    inset-inline-start: 12px;
    padding-inline: .78rem;
  }
}

/* Figma Chatbot Studio · 2026-11-08 */
.ri-webchat{--chat-ink:#0b3440;--chat-gold:#d2b46d;--chat-paper:#f7f8f7;--chat-header:#0b3440;--chat-header-text:#fff;--chat-avatar:#d2b46d}
.ri-webchat[data-profile="immowert"]{--chat-ink:#0f766e;--chat-gold:#0f766e;--chat-header:#0f766e;--chat-avatar:#d4ebe8;--chat-paper:#f7f8f7}
.ri-webchat[data-profile="marktpreisreport"]{--chat-ink:#3e4b38;--chat-gold:#90a17a;--chat-header:#e7a9c0;--chat-header-text:#3e4b38;--chat-avatar:#fff3c6;--chat-paper:#fff9df}
.ri-webchat-header{background:var(--chat-header);color:var(--chat-header-text);border-bottom:0;min-height:68px}
.ri-webchat-title,.ri-webchat-subtitle,.ri-webchat-close,.ri-webchat-end{color:var(--chat-header-text)}
.ri-webchat-avatar{background:var(--chat-avatar);border-radius:12px;flex-basis:38px;height:38px}
.ri-webchat-avatar img{display:block;width:20px;height:20px}
.ri-webchat-dialog{width:min(390px,calc(100% - 32px));border:1px solid #dde3e5;border-radius:17px;box-shadow:0 20px 60px #18313b38}
.ri-webchat-intro{background:var(--chat-paper);font-size:13px;padding:16px}
.ri-webchat-headline{font:400 14px/1.55 var(--chat-body);padding:12px;background:#fff;border:1px solid #e5e8e8;border-radius:5px 13px 13px 13px}
.ri-webchat[data-profile="marktpreisreport"] .ri-webchat-dialog{border:2px solid #3e4b38;border-radius:22px 22px 8px 22px;box-shadow:6px 6px 0 #3e4b38}
.ri-webchat[data-profile="marktpreisreport"] .ri-webchat-avatar{border:2px solid #3e4b38;border-radius:50%}
.ri-webchat[data-profile="marktpreisreport"] .ri-webchat-headline{border-color:#b6c39c}
.ri-webchat[data-profile="marktpreisreport"] .ri-webchat-toggle{color:#3e4b38;background:#e7a9c0;border:2px solid #3e4b38;box-shadow:4px 4px 0 #3e4b38}
.ri-webchat[data-profile="marktpreisreport"] .ri-webchat-toggle svg{color:#3e4b38}
.ri-webchat[data-profile="marktpreisreport"] .ri-webchat-start{background:#b6c39c;color:#3e4b38;border-color:#90a17a}
.ri-webchat-frame{height:min(610px,calc(100dvh - 125px))}
@media(max-width:480px){.ri-webchat-dialog{width:calc(100% - 22px);max-height:calc(100dvh - 22px)}.ri-webchat-header{gap:8px;padding:10px}.ri-webchat-title{font-size:15px}.ri-webchat-subtitle{font-size:11px}}
.ri-webchat[data-launcher-shape="round"] .ri-webchat-toggle{width:54px;height:54px;padding:0;justify-content:center;border-radius:50%}.ri-webchat[data-launcher-shape="round"] .ri-webchat-toggle span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.ri-webchat[data-animation="fade"] .ri-webchat-dialog[open]{animation:ri-chat-fade .2s ease-out}.ri-webchat[data-animation="slide"] .ri-webchat-dialog[open]{animation:ri-chat-slide .25s ease-out}
@keyframes ri-chat-fade{from{opacity:0}to{opacity:1}}@keyframes ri-chat-slide{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.ri-webchat .ri-webchat-dialog[open]{animation:none!important}}
