:root {
  --modern-lumen-yellow: #fbbb00;
  --modern-lumen-charcoal: #3c3c3e;
}

.modern-lumen,
.modern-lumen * {
  box-sizing: border-box;
}

.modern-lumen {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.modern-lumen__launcher {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: var(--modern-lumen-charcoal);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .25);
  color: var(--modern-lumen-yellow);
  cursor: pointer;
  font: 500 29px/1 Arial, Helvetica, sans-serif;
}

.modern-lumen__launcher:hover,
.modern-lumen__launcher:focus-visible {
  transform: translateY(-2px);
  outline: 3px solid rgba(251, 187, 0, .45);
  outline-offset: 3px;
}

.modern-lumen__window {
  display: none;
  width: min(370px, calc(100vw - 32px));
  max-height: min(690px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

.modern-lumen[data-state="open"] .modern-lumen__launcher { display: none; }
.modern-lumen[data-state="open"] .modern-lumen__window { display: flex; flex-direction: column; }

.modern-lumen__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 4px solid var(--modern-lumen-yellow);
  background: var(--modern-lumen-charcoal);
  color: #fff;
}

.modern-lumen__avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: var(--modern-lumen-yellow);
  color: var(--modern-lumen-charcoal);
  font-size: 22px;
  font-weight: 500;
}

.modern-lumen__identity { min-width: 0; }
.modern-lumen__identity strong { display: block; font-weight: 500; }
.modern-lumen__identity small { display: flex; align-items: center; gap: 6px; color: #eee; font-size: 11px; }
.modern-lumen__identity i { width: 7px; height: 7px; border-radius: 50%; background: #5ed58a; }

.modern-lumen__close {
  margin-left: auto;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 25px;
}

.modern-lumen__messages {
  min-height: 290px;
  max-height: 410px;
  overflow-y: auto;
  padding: 18px 16px 8px;
  background: #f7f7f7;
}

.modern-lumen__bubble {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 6px 15px 15px 15px;
  white-space: pre-line;
}

.modern-lumen__bubble--assistant { background: #e9e9e9; color: #252525; }
.modern-lumen__bubble--user { margin-left: auto; border-radius: 15px 6px 15px 15px; background: var(--modern-lumen-yellow); color: #2f2f2f; }

.modern-lumen__actions {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  padding: 10px 14px;
  background: #f7f7f7;
}

.modern-lumen__actions:empty { display: none; }
.modern-lumen__actions button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--modern-lumen-yellow);
  border-radius: 10px;
  background: #fff9e6;
  color: #333;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.modern-lumen__actions button:hover,
.modern-lumen__actions button:focus-visible { background: var(--modern-lumen-yellow); outline: none; }

.modern-lumen__composer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #ddd;
  background: #fff;
}

.modern-lumen__composer input[type="text"],
.modern-lumen__composer input[type="email"] {
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #bbb;
  border-radius: 10px;
  background: #fff;
  color: #222;
  font: inherit;
}

.modern-lumen__composer button {
  width: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 50%;
  background: var(--modern-lumen-yellow);
  color: var(--modern-lumen-charcoal);
  cursor: pointer;
  font-size: 18px;
}

.modern-lumen__notice {
  margin: 0;
  padding: 0 14px 11px;
  background: #fff;
  color: #676767;
  font-size: 10px;
  text-align: center;
}

.modern-lumen__notice a { color: inherit; text-decoration: underline; }

.modern-lumen__website { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

@media (max-width: 520px) {
  .modern-lumen { right: 12px; bottom: 12px; }
  .modern-lumen__window { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .modern-lumen__messages { min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .modern-lumen__launcher { transition: none; }
}
