* {
  box-sizing: border-box;
}

:root {
  --widget-bg: #f3f5f4;
  --widget-panel: #ffffff;
  --widget-surface: #ffffff;
  --widget-surface-soft: #f7f8f8;
  --widget-surface-strong: #eef2f1;
  --widget-border: #e2e7e5;
  --widget-text: #222b28;
  --widget-muted: #6b7772;
  --widget-brand: #244c46;
  --widget-brand-dark: #1d3f3a;
  --widget-brand-soft: #dcece4;
  --widget-brand-contrast: #ffffff;
  --widget-brand-contrast-soft: rgba(255, 255, 255, 0.78);
  --widget-note-bg: linear-gradient(180deg, rgba(33, 38, 46, 0.86) 0%, rgba(23, 27, 34, 0.86) 100%);
  --widget-note-border: rgba(255, 255, 255, 0.12);
  --widget-note-text: #f5f7fb;
  --widget-message-surface: rgba(255, 255, 255, 0.88);
  --widget-pending-soft: #edf4ff;
  --widget-pending-border: #c7dafd;
  --widget-warning-soft: #fff6e6;
  --widget-warning-border: #f1d298;
  --widget-danger-soft: #fff0f2;
  --widget-danger-border: #f2c2cb;
  --widget-shadow: 0 8px 20px rgba(16, 40, 30, 0.08);
  --widget-shadow-soft: 0 4px 14px rgba(14, 35, 27, 0.05);
  --widget-radius-lg: 24px;
  --widget-radius-md: 18px;
  --widget-radius-sm: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--widget-bg);
  color: var(--widget-text);
}

button,
textarea {
  font: inherit;
}

button:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(42, 133, 93, 0.35);
  outline-offset: 2px;
}

.widget-shell {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--widget-bg);
}

.widget-header {
  position: relative;
  padding: 8px 10px;
  background: linear-gradient(180deg, var(--widget-brand) 0%, var(--widget-brand-dark) 100%);
  color: var(--widget-brand-contrast);
  box-shadow: none;
}

.widget-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.widget-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.widget-menu-button {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.widget-menu-button:hover {
  opacity: 0.82;
}

.widget-menu-button:active {
  transform: scale(0.98);
}

.widget-menu-button i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.widget-header-title {
  margin: 0;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.widget-live-visitors {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  color: var(--widget-brand-contrast);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.95;
}

.widget-live-visitors[hidden] {
  display: none !important;
}

.widget-live-visitors i {
  font-size: 11px;
  color: var(--widget-brand-contrast);
}

.widget-live-visitors span {
  display: inline-block;
  min-width: 1ch;
}

.widget-header-meta {
  display: none;
}

.widget-floating-note {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 12px 10px;
  padding-top: 10px;
  pointer-events: none;
}

.widget-floating-note-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--widget-note-border);
  border-radius: 14px;
  background: var(--widget-note-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
}

.widget-floating-note-text {
  margin: 0;
  color: var(--widget-note-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.widget-floating-note-close {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: -2px -2px 0 0;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 247, 251, 0.88);
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.widget-floating-note-close:hover {
  color: var(--widget-note-text);
  background: rgba(255, 255, 255, 0.1);
}

.widget-floating-note-close:active {
  transform: scale(0.96);
}

.widget-floating-note-close i {
  font-size: 13px;
}

.session-badge {
  width: fit-content;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.session-badge[data-state="authenticated"] {
  background: rgba(219, 236, 229, 0.18);
}

.session-badge[data-state="login-pending"] {
  background: rgba(199, 218, 253, 0.18);
}

.session-badge[data-state="muted"] {
  background: rgba(241, 210, 152, 0.18);
}

.session-badge[data-state="banned"] {
  background: rgba(242, 194, 203, 0.18);
}

.widget-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  border: 0;
  padding: 0;
  opacity: 0;
  background: rgba(10, 23, 17, 0.44);
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.widget-menu-overlay[data-state="open"] {
  opacity: 1;
  pointer-events: auto;
}

.widget-side-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: min(86vw, 342px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  padding: 20px 16px 22px;
  background: linear-gradient(180deg, rgba(22, 24, 30, 0.98) 0%, rgba(15, 17, 22, 0.98) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 18px 0 44px rgba(0, 0, 0, 0.34);
  opacity: 0.98;
  transform: translateX(-100%);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.widget-shell-menu-open .widget-side-panel {
  opacity: 1;
  transform: translateX(0);
}

.login-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  background: rgba(8, 11, 17, 0.52);
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.login-modal-backdrop[data-state="open"] {
  opacity: 1;
  pointer-events: auto;
}

.login-modal {
  width: min(100%, 260px);
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(31, 35, 42, 0.98) 0%, rgba(27, 30, 37, 0.98) 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.login-modal[data-state="open"] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.login-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.login-modal h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  color: #eef2f7;
}

.login-modal-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #9ca7b6;
}

.login-modal-close {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #c7d0dc;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.login-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.login-modal-button {
  width: fit-content;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #dbe5f1;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.login-modal-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.login-modal-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.login-modal-button-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 10px 20px rgba(34, 158, 217, 0.16);
}

.login-modal-button-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.login-modal-button-label {
  font-size: 12px;
  font-weight: 600;
  color: #d7dfeb;
}

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  background: rgba(8, 11, 17, 0.52);
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.confirm-modal-backdrop[data-state="open"] {
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal {
  width: min(100%, 300px);
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(31, 35, 42, 0.98) 0%, rgba(27, 30, 37, 0.98) 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.confirm-modal[data-state="open"] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.confirm-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.confirm-modal h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  color: #eef2f7;
}

.confirm-modal-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #9ca7b6;
}

.confirm-modal-close {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #c7d0dc;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.confirm-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.confirm-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.confirm-modal-cancel,
.confirm-modal-confirm {
  width: 100%;
  min-width: 0;
}

.confirm-modal-confirm {
  background: linear-gradient(180deg, #e54861 0%, #cb3456 100%);
  color: #ffffff;
}

.confirm-modal-confirm:hover:not(:disabled) {
  background: linear-gradient(180deg, #f05b74 0%, #d83f60 100%);
  box-shadow: none;
}

.confirm-modal .secondary-button {
  background: rgba(255, 255, 255, 0.12);
  color: #eef2f7;
}

.confirm-modal .secondary-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: none;
}

.confirm-modal .primary-button.confirm-modal-confirm {
  background: linear-gradient(180deg, #e54861 0%, #cb3456 100%);
  color: #ffffff;
  box-shadow: none;
}

.confirm-modal .primary-button.confirm-modal-confirm:hover:not(:disabled) {
  background: linear-gradient(180deg, #f05b74 0%, #d83f60 100%);
  color: #ffffff;
  box-shadow: none;
}

.image-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  background: rgba(8, 11, 17, 0.72);
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.image-modal-backdrop[data-state="open"] {
  opacity: 1;
  pointer-events: auto;
}

.image-modal {
  width: min(100%, 960px);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(25, 29, 36, 0.98) 0%, rgba(18, 22, 29, 0.98) 100%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.image-modal[data-state="open"] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.image-modal-header {
  display: flex;
  justify-content: flex-end;
}

.image-modal-close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbe2ea;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.image-modal-body {
  display: grid;
  place-items: center;
}

.image-modal-image {
  display: block;
  max-width: min(100%, 920px);
  max-height: calc(100vh - 110px);
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
}

.widget-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.widget-side-header-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.widget-side-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  color: #f2f4f8;
}

.widget-side-header .eyebrow {
  color: #8f98a6;
}

.widget-side-close {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd3df;
  cursor: pointer;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.widget-side-close span,
.widget-side-close i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.widget-side-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.widget-side-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(36, 40, 49, 0.98) 0%, rgba(28, 31, 38, 0.98) 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.widget-side-profile[data-state="login-pending"] {
  background: linear-gradient(180deg, rgba(31, 41, 60, 0.98) 0%, rgba(26, 34, 49, 0.98) 100%);
  border-color: var(--widget-pending-border);
}

.widget-side-profile[data-state="muted"] {
  background: linear-gradient(180deg, rgba(54, 43, 27, 0.98) 0%, rgba(42, 33, 20, 0.98) 100%);
  border-color: var(--widget-warning-border);
}

.widget-side-profile[data-state="banned"] {
  background: linear-gradient(180deg, rgba(58, 30, 36, 0.98) 0%, rgba(45, 24, 29, 0.98) 100%);
  border-color: var(--widget-danger-border);
}

.menu-session-avatar {
  flex: 0 0 auto;
}

.menu-session-avatar-inner {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #3f4653 0%, #2e343f 100%);
  color: #f3f6fb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.menu-session-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.menu-session-avatar-fallback {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.menu-session-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.menu-session-name,
.menu-session-state {
  margin: 0;
}

.menu-session-name {
  font-size: 15px;
  font-weight: 700;
  color: #f2f4f8;
}

.menu-session-state {
  font-size: 12px;
  line-height: 1.45;
  color: #98a3b2;
}

.widget-side-actions {
  display: grid;
  align-content: start;
  gap: 10px;
  color: #98a3b2;
}

.widget-session-panel {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.widget-session-panel[data-state="login-pending"] {
  background: rgba(199, 218, 253, 0.14);
  border-color: rgba(199, 218, 253, 0.28);
}

.widget-session-panel[data-state="muted"] {
  background: rgba(241, 210, 152, 0.14);
  border-color: rgba(241, 210, 152, 0.3);
}

.widget-session-panel[data-state="banned"] {
  background: rgba(242, 194, 203, 0.14);
  border-color: rgba(242, 194, 203, 0.32);
}

.session-state,
.session-detail,
.muted,
.status-line,
.composer-help,
.composer-status,
.composer-error {
  margin: 0;
}

.session-state {
  font-size: 13px;
  font-weight: 700;
}

.session-detail,
.muted,
.message-time,
.composer-help {
  color: var(--widget-muted);
}

.widget-session-panel .session-detail {
  color: var(--widget-brand-contrast-soft);
  font-size: 12px;
  line-height: 1.38;
}

.auth-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auth-note {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.38;
  color: var(--widget-muted);
}

.auth-note[data-tone="error"] {
  color: #b42318;
}

.auth-note[data-tone="success"] {
  color: #157347;
}

.widget-body {
  position: relative;
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: var(--widget-bg);
  scrollbar-width: thin;
  scrollbar-color: rgba(146, 154, 167, 0.78) rgba(22, 24, 30, 0.92);
}

/* Desactiva el scroll anchoring del navegador solo durante el boot inicial,
   para que el scroll definitivo al fondo no sea movido por imagenes que
   terminan de cargar arriba del viewport. Se remueve apenas el boot termina
   (ver finishBootPhase en widget.js) y el anchoring vuelve a funcionar
   normal para cuando el usuario scrollea por el historial. */
.widget-body--booting {
  overflow-anchor: none;
}

/* Skeleton del feed mientras dura el boot.
   - Oculto por defecto: si el boot ya termino no se muestra nada.
   - Visible solo cuando .widget-body lleva la clase --booting.
   - Anti-flash: animation-delay de 100ms antes del fade-in, para que una
     carga muy rapida (cache caliente) no pinte el skeleton en absoluto. */
.widget-skeleton {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
}

.widget-body--booting .widget-skeleton {
  display: flex;
  opacity: 0;
  animation: widget-skeleton-fade-in 260ms ease-out 100ms forwards;
}

/* Durante el boot ocultamos el feed-shell visualmente (opacity: 0) pero
   lo mantenemos en layout. Esto permite que:
   - Las imagenes con loading="lazy" sigan cargando normalmente (lo hacen
     solo si el elemento esta en layout, aunque sea invisible).
   - scrollFeedToBottom calcule scrollHeight correcto durante la espera.
   - El usuario no vea estados intermedios feos (scroll a medio camino,
     mensajes sin imagenes cargadas, etc.) mientras el skeleton esta vivo.
   Al remover la clase --booting el feed-shell hace fade-in suave. */
.widget-feed-shell {
  transition: opacity 200ms ease-out;
}

.widget-body--booting .widget-feed-shell {
  opacity: 0;
}

.widget-skeleton-message {
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0.085) 50%,
    rgba(255, 255, 255, 0.035) 100%
  );
  background-size: 200% 100%;
  animation: widget-skeleton-shimmer 1.6s ease-in-out infinite;
}

.widget-skeleton-message--them {
  width: 62%;
  align-self: flex-start;
  border-top-left-radius: 4px;
}

.widget-skeleton-message--me {
  width: 52%;
  align-self: flex-end;
  border-top-right-radius: 4px;
}

.widget-skeleton-message--short {
  height: 34px;
  width: 40%;
}

.widget-skeleton-message--tall {
  height: 58px;
}

@keyframes widget-skeleton-fade-in {
  to { opacity: 1; }
}

@keyframes widget-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Accesibilidad: si el usuario pidio reducir animaciones, desactivamos
   el shimmer, el fade-in del skeleton y la transicion del feed. El
   skeleton sigue funcionando como placeholder estatico y el feed aparece
   directamente sin transicion. */
@media (prefers-reduced-motion: reduce) {
  .widget-body--booting .widget-skeleton {
    animation: none;
    opacity: 1;
  }
  .widget-skeleton-message {
    animation: none;
  }
  .widget-feed-shell {
    transition: none;
  }
}

.widget-body::-webkit-scrollbar {
  width: 8px;
}

.widget-body::-webkit-scrollbar-track {
  background: rgba(22, 24, 30, 0.92);
}

.widget-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(146, 154, 167, 0.78);
  border: 1px solid rgba(22, 24, 30, 0.92);
}

.widget-body::-webkit-scrollbar-thumb:hover {
  background: rgba(176, 184, 196, 0.92);
}

.widget-feed-shell {
  width: 100%;
  margin: 0 auto;
}

.widget-notice {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--widget-border);
  border-radius: 0;
  background: var(--widget-surface-soft);
  box-shadow: none;
}

.widget-shell[data-session-state="login-pending"] .widget-notice {
  border-color: var(--widget-pending-border);
  background: rgba(237, 244, 255, 0.84);
}

.widget-shell[data-session-state="muted"] .widget-notice {
  border-color: var(--widget-warning-border);
  background: rgba(255, 246, 230, 0.86);
}

.widget-shell[data-session-state="banned"] .widget-notice {
  border-color: var(--widget-danger-border);
  background: rgba(255, 240, 242, 0.88);
}

.widget-notice-copy {
  display: none;
}

.status-line {
  font-size: 11px;
  line-height: 1.4;
  color: var(--widget-muted);
}

.status-line[data-tone="error"],
.composer-error {
  color: #b42318;
}

.status-line[data-tone="success"],
.composer-status {
  color: #157347;
}

.message-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--widget-border);
  background: var(--widget-message-surface);
}

.message-item-empty {
  display: block;
  padding: 16px 12px;
  border: 0;
  border-bottom: 1px solid var(--widget-border);
  border-radius: 0;
  background: var(--widget-panel);
}

.message-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(180deg, #d8e7df 0%, #c5dbd0 100%);
  color: var(--widget-brand-dark);
  box-shadow: none;
}

.message-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.message-avatar-fallback {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.message-card {
  position: relative;
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

.message-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 175px;
  margin: 4px 0 0;
  border: 1px solid rgba(205, 214, 225, 0.72);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  object-fit: contain;
  cursor: zoom-in;
}

.message-gif {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 175px;
  margin: 4px 0 0;
  border: 1px solid rgba(205, 214, 225, 0.72);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  object-fit: contain;
}

.message-item:hover .message-card,
.message-item:focus-within .message-card {
  border-color: transparent;
  box-shadow: none;
}

.message-meta {
  display: block;
  margin-bottom: 2px;
}

.message-author-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}

.message-author {
  font-size: 11px;
  font-weight: 700;
  color: #2f71bc;
}

.message-role-badge,
.menu-role-badge {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 5px;
  justify-content: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.role-badge-icon {
  order: 1;
  font-size: 0.9em;
}

.role-badge-label {
  order: 0;
}

.menu-role-badge {
  margin-left: 6px;
  vertical-align: middle;
}

.message-time {
  font-size: 11px;
  color: var(--widget-muted);
  white-space: nowrap;
  text-align: right;
}

.message-text {
  box-sizing: border-box;
  margin: 0;
  font-size: 12px;
  font-family: Tahoma, Helvetica, sans-serif;
  letter-spacing: 0.2px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c3c3c3;
}

.message-link-pill {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0;
  padding: 5px 10px 5px 11px;
  max-width: 100%;
  width: fit-content;
  box-sizing: border-box;
  background: rgba(14, 17, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: #7e8fa5;
  text-decoration: none;
  font-size: 11px;
  font-family: Tahoma, Helvetica, sans-serif;
  line-height: 1.35;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.message-link-pill:hover {
  background: rgba(30, 35, 50, 0.95);
  border-color: rgba(255, 255, 255, 0.16);
  color: #a8b6c8;
}

.message-link-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.message-link-pill .fa-arrow-up-right-from-square {
  font-size: 9px;
  flex-shrink: 0;
  opacity: 0.7;
  margin-top: 3px;
}

.message-item-actionable {
  position: relative;
}

.message-item-actionable .message-meta {
  padding-right: 0;
}

.message-actions-bar {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 1px solid rgba(67, 77, 86, 0.92);
  border-radius: 10px;
  background: rgba(29, 37, 46, 0.94);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.message-item-actionable:hover .message-actions-bar,
.message-item-actionable:focus-within .message-actions-bar,
.message-item-actions-open .message-actions-bar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.message-action-button {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d7dde5;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.message-action-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.message-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.message-action-button-danger {
  color: #ff9ca5;
}

.message-action-button-danger:hover:not(:disabled) {
  background: rgba(225, 29, 72, 0.14);
  color: #ffd6db;
}

.message-action-icon {
  font-size: 10px;
  line-height: 1;
}

.message-item-moderatable {
  position: relative;
}

.message-moderation {
  margin-top: 10px;
}

.message-moderation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.message-moderation-actions-desktop {
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.message-moderation-mobile {
  display: none;
}

.message-moderation-toggle {
  display: none;
}

.message-item-moderatable:hover .message-moderation-actions-desktop,
.message-item-moderatable:focus-within .message-moderation-actions-desktop {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.moderation-button {
  border: 1px solid #d8e2da;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--widget-surface-soft);
  color: #4a5f55;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.2;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

.moderation-button:hover:not(:disabled) {
  background: #e7efe9;
  border-color: #c7d5cc;
  transform: translateY(-1px);
}

.moderation-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.moderation-button-danger {
  background: var(--widget-danger-soft);
  border-color: var(--widget-danger-border);
  color: #b42318;
}

.moderation-button-danger:hover:not(:disabled) {
  background: #ffe6ea;
  border-color: #efb7c1;
}

.widget-footer {
  padding: 6px 8px 8px;
  background: var(--widget-surface-soft);
  border-top: 1px solid var(--widget-border);
  box-shadow: none;
}

.composer-form {
  width: 100%;
  margin: 0 auto;
}

.composer-surface {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--widget-border);
  border-radius: 14px;
  background: var(--widget-panel);
  box-shadow: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.composer-surface:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.composer-surface[data-state="login-pending"] {
  border-color: var(--widget-pending-border);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.composer-surface[data-state="muted"] {
  border-color: var(--widget-warning-border);
  background: linear-gradient(180deg, #ffffff 0%, #fff9ef 100%);
}

.composer-surface[data-state="banned"] {
  border-color: var(--widget-danger-border);
  background: linear-gradient(180deg, #ffffff 0%, #fff5f7 100%);
}

.composer-surface[data-loading="true"] {
  box-shadow: 0 18px 40px rgba(16, 40, 30, 0.16);
}

.composer-input-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 36px;
  align-items: end;
  gap: 4px;
  padding: 0;
}

.composer-form textarea {
  width: 100%;
  resize: none;
  min-height: 36px;
  max-height: 76px; /* 3 lineas: padding(8px) + linea(20px) x 3 + padding(8px) */
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--widget-text);
  line-height: 20px;
  overflow-y: auto;
  font-size: 13px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.composer-form textarea::-webkit-scrollbar {
  width: 4px;
}

.composer-form textarea::-webkit-scrollbar-track {
  background: transparent;
}

.composer-form textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.composer-form textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.30);
}

.composer-form textarea::placeholder {
  color: #7c878f;
}

.composer-form textarea:focus {
  outline: none;
}

.composer-form textarea:disabled {
  cursor: not-allowed;
  color: #73837b;
}

.composer-login-gate {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.composer-file-input {
  display: none;
}

.composer-image-upload {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 8px 10px;
  border: 1px solid rgba(205, 214, 225, 0.88);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
}

.composer-image-upload[hidden] {
  display: none;
}

.composer-image-preview {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.06);
}

.composer-image-upload-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.composer-image-name,
.composer-image-meta {
  margin: 0;
}

.composer-image-name {
  overflow: hidden;
  color: #0f172a;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-image-meta {
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
}

.composer-image-clear {
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(226, 232, 240, 0.92);
  color: #334155;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.composer-image-clear:hover:not(:disabled) {
  background: rgba(203, 213, 225, 0.96);
  color: #0f172a;
}

.composer-feedback {
  display: grid;
  gap: 2px;
  align-content: center;
  grid-column: 1 / -1;
  margin: 0;
}

.composer-help,
.composer-status,
.composer-error {
  font-size: 10px;
  line-height: 1.25;
  min-height: 0;
}

.composer-status {
  display: none;
}

.composer-help:empty,
.composer-status:empty,
.composer-error:empty {
  display: none;
}

.composer-feedback:has(.composer-help:empty):has(.composer-status:empty):has(.composer-error:empty) {
  display: none;
}

.composer-feedback:has(.composer-help:empty):has(.composer-error:empty) {
  display: none;
}

.composer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  grid-column: 2 / 3;
  grid-row: 1;
}

.composer-accent {
  display: none;
}

.composer-icon-button {
  width: 25px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7c878f;
  cursor: default;
  opacity: 0.92;
}

.composer-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.composer-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.composer-emoji-picker {
  position: absolute;
  right: 52px;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: 248px;
  max-height: 188px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #1a2130;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: right bottom;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.composer-emoji-picker[data-state="open"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.composer-emoji-picker[hidden] {
  display: none;
}

.composer-emoji-picker::-webkit-scrollbar {
  width: 8px;
}

.composer-emoji-picker::-webkit-scrollbar-track {
  background: transparent;
}

.composer-emoji-picker::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.composer-icon-button[aria-expanded="true"] {
  background: rgba(36, 76, 70, 0.1);
  color: #244c46;
}

/* ── GIF button ─────────────────────────────────────── */

.composer-gif-button {
  flex-shrink: 0;
  width: auto;
  padding: 0 6px;
  height: 36px;
}

.composer-gif-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* ── GIF picker panel ───────────────────────────────── */

.composer-gif-picker {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #1a2130;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: left bottom;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.composer-gif-picker[data-state="open"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.composer-gif-picker[hidden] {
  display: none;
}

/* Search */

.gif-picker-search-shell {
  padding: 10px 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gif-picker-search-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #d0d6de;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.gif-picker-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.gif-picker-search-input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.10);
}

/* Grid */

.gif-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 76px;
  gap: 3px;
  padding: 6px;
  height: 246px; /* 3 filas × 76px + 2 gaps × 3px + padding 12px */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.gif-picker-grid::-webkit-scrollbar {
  width: 4px;
}

.gif-picker-grid::-webkit-scrollbar-track {
  background: transparent;
}

.gif-picker-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.gif-picker-item {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.12s ease,
    opacity 0.12s ease;
}

.gif-picker-item:hover {
  transform: scale(1.05);
  z-index: 1;
  position: relative;
}

.gif-picker-item:focus-visible {
  outline: 2px solid rgba(36, 76, 70, 0.6);
  outline-offset: 1px;
}

.gif-picker-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gif-picker-message {
  grid-column: 1 / -1;
  padding: 20px 10px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

/* Footer / attribution */

.gif-picker-footer {
  padding: 5px 10px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: right;
}

.gif-picker-attribution {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.30);
}

.composer-emoji-option {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.composer-emoji-option:hover {
  background: rgba(36, 76, 70, 0.08);
  transform: translateY(-1px);
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button {
  min-width: 72px;
  padding: 9px 14px;
  background: transparent;
  color: var(--widget-brand);
  box-shadow: none;
}

.composer-form .primary-button {
  min-width: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #78838b;
  box-shadow: none;
}

.primary-button:hover:not(:disabled) {
  background: rgba(36, 76, 70, 0.08);
  box-shadow: none;
}

.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  line-height: 1;
  transition: none;
}

.send-button:hover:not(:disabled) {
  background: rgba(120, 131, 139, 0.08);
  color: #5f6a73;
  box-shadow: none;
  transform: none;
}

.send-button:disabled {
  background: transparent;
  color: #aab2b9;
  box-shadow: none;
}

.send-button[data-sending="true"] {
  color: #5f6a73;
  background: rgba(120, 131, 139, 0.08);
}

.primary-button.send-button:hover:not(:disabled),
.secondary-button.send-button:hover:not(:disabled) {
  transform: none;
}

.send-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.widget-side-panel .primary-button {
  background: linear-gradient(180deg, #2b313d 0%, #232832 100%);
  color: #f4f7fb;
}

.widget-side-panel .secondary-button,
.widget-footer .secondary-button {
  background: #2b313d;
  color: #eef2f7;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .composer-form .primary-button {
    width: auto;
  }

  .widget-header {
    padding: 8px 10px;
  }

  .widget-floating-note {
    margin: -8px 10px 8px;
  }

  .widget-header-title {
    font-size: 13px;
  }

  .widget-live-visitors {
    font-size: 11px;
    gap: 4px;
  }

  .widget-live-visitors i {
    font-size: 10px;
  }

  .widget-side-panel {
    width: min(86vw, 320px);
    padding-top: 18px;
  }

  .login-modal-backdrop {
    padding: 14px;
  }

  .login-modal {
    width: min(100%, 348px);
    gap: 13px;
    padding: 16px;
    border-radius: 24px;
  }

  .image-modal-backdrop {
    padding: 12px;
  }

  .image-modal {
    width: min(100%, 100vw - 24px);
    padding: 10px;
    border-radius: 16px;
  }

  .image-modal-image {
    max-height: calc(100vh - 96px);
  }

  .message-item-moderatable .message-moderation {
    display: grid;
    justify-items: end;
  }

  .message-actions-bar {
    margin-left: 0;
  }

  .message-moderation-actions-desktop {
    display: none;
  }

  .message-moderation-mobile {
    display: grid;
    justify-items: end;
  }

  .message-moderation-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #d8e2da;
    border-radius: 999px;
    background: var(--widget-surface-soft);
    color: #496056;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    letter-spacing: 0.08em;
    transition: background-color 0.18s ease, border-color 0.18s ease;
  }

  .message-moderation-toggle::-webkit-details-marker {
    display: none;
  }

  .message-moderation-actions-mobile {
    display: none;
    width: 100%;
    margin-top: 8px;
    justify-content: flex-end;
  }

  .message-moderation-mobile[open] .message-moderation-actions-mobile {
    display: flex;
  }

  .widget-footer {
    padding: 6px 8px 8px;
  }

  .composer-surface {
    gap: 6px;
    padding: 4px 8px;
    border-radius: 14px;
  }

  .composer-emoji-picker {
    right: 46px;
    width: min(232px, calc(100vw - 28px));
    max-height: 176px;
  }

  .composer-gif-picker {
    width: min(280px, calc(100vw - 16px));
  }

  .gif-picker-grid {
    height: 246px;
  }

  .composer-image-upload {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .composer-image-preview {
    width: 40px;
    height: 40px;
  }

  .composer-image-clear {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .composer-form textarea {
    min-height: 36px;
    max-height: 76px;
  }
}

@media (min-width: 721px) {
  .widget-header {
    padding: 8px 10px;
  }

  .widget-floating-note {
    margin: -8px 10px 10px;
  }

  .widget-side-panel {
    width: min(360px, 32vw);
    padding: 22px 20px 24px;
  }

  .widget-session-panel {
    max-width: 520px;
  }

  .widget-body {
    padding: 0;
  }

  .widget-footer {
    padding: 6px 8px 8px;
  }

  .composer-surface {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 6px;
  }

  .composer-feedback {
    grid-column: 1 / -1;
  }

  .composer-bottom-row {
    grid-column: 2 / 3;
    align-self: end;
  }

  .composer-accent {
    display: none;
  }

  .primary-button,
  .secondary-button {
    width: auto;
    min-width: 0;
  }
}
