/* DAMA AI Chat Widget — light glassmorphism on DAMA brand blues.
   All selectors scoped under .dama-chat-widget (embed mode) or
   .dama-chat-fullscreen-body (fullscreen mode) to avoid host-page conflicts. */

.dama-chat-widget,
.dama-chat-fullscreen-body {
  /* DAMA brand blues */
  --dama-chat-primary-deep: #002F63;
  --dama-chat-primary-start: #004990;
  --dama-chat-primary-end: #0078D4;
  --dama-chat-accent-cyan: #00D4FF;
  /* Text */
  --dama-chat-text: #0A2540;
  --dama-chat-text-muted: #5F7387;
  /* Glass surfaces */
  --dama-chat-surface: rgba(255, 255, 255, 0.72);
  --dama-chat-surface-elevated: rgba(255, 255, 255, 0.85);
  --dama-chat-surface-solid: #FFFFFF;
  --dama-chat-surface-input: rgba(255, 255, 255, 0.55);
  /* Borders */
  --dama-chat-border: rgba(0, 73, 144, 0.08);
  --dama-chat-border-glass: rgba(255, 255, 255, 0.6);
  /* Status / errors */
  --dama-chat-online: #00D4FF;
  --dama-chat-error: #B3261E;
  --dama-chat-error-bg: rgba(253, 236, 234, 0.85);
  --dama-chat-error-border: rgba(245, 198, 194, 0.7);
  /* Glows + shadows */
  --dama-chat-glow: 0 4px 12px rgba(0, 73, 144, 0.2);
  --dama-chat-glow-soft: 0 2px 8px rgba(0, 73, 144, 0.04);
  --dama-chat-shadow: 0 24px 48px -16px rgba(0, 73, 144, 0.18), 0 0 0 1px rgba(10, 37, 64, 0.04);
  --dama-chat-ring: rgba(0, 120, 212, 0.45);
  --dama-chat-focus: rgba(0, 120, 212, 0.4);
  /* Geometry */
  --dama-chat-radius-panel: 20px;
  --dama-chat-radius-bubble: 18px;
  --dama-chat-radius-pill: 22px;
  --dama-chat-z: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dama-chat-text);
}

.dama-chat-widget {
  position: fixed;
  z-index: var(--dama-chat-z);
  inset: auto 0 0 auto;
}

.dama-chat-widget *,
.dama-chat-widget *::before,
.dama-chat-widget *::after,
.dama-chat-fullscreen-body *,
.dama-chat-fullscreen-body *::before,
.dama-chat-fullscreen-body *::after {
  box-sizing: border-box;
}

/* === Launcher === */

.dama-chat-launcher-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  z-index: var(--dama-chat-z);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.dama-chat-launcher-wrap[data-open="true"] {
  display: none;
}

.dama-chat-launcher-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--dama-chat-ring);
  pointer-events: none;
  animation: dama-chat-sonar 2.4s ease-out infinite;
  z-index: 0;
}

.dama-chat-launcher-pulse--delayed {
  animation-delay: 1.2s;
}

@keyframes dama-chat-sonar {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0;   }
}

.dama-chat-launcher {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #FFFFFF;
  background: var(--dama-chat-primary-deep);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 32px rgba(0, 73, 144, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  z-index: 1;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  /* iOS Safari: force a rendering layer + explicit mask so mix-blend-mode
     children (the cyan + blue blobs) stay clipped to the round shape.
     Without this, the blobs leak as a rectangular halo on mobile WebKit. */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  will-change: transform;
}

.dama-chat-launcher::before,
.dama-chat-launcher::after {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  border-radius: 50%;
  mix-blend-mode: screen;
  pointer-events: none;
}

.dama-chat-launcher::before {
  background: radial-gradient(circle, var(--dama-chat-accent-cyan) 0%, transparent 70%);
  animation: dama-chat-blob-1 8s ease-in-out infinite;
}

.dama-chat-launcher::after {
  background: radial-gradient(circle, var(--dama-chat-primary-end) 0%, transparent 70%);
  animation: dama-chat-blob-2 10s ease-in-out infinite;
}

@keyframes dama-chat-blob-1 {
  0%, 100% { transform: translate(-15%, -10%); }
  25%      { transform: translate(15%, -15%); }
  50%      { transform: translate(20%, 15%); }
  75%      { transform: translate(-15%, 15%); }
}

@keyframes dama-chat-blob-2 {
  0%, 100% { transform: translate(15%, 15%); }
  25%      { transform: translate(-15%, 15%); }
  50%      { transform: translate(-20%, -15%); }
  75%      { transform: translate(15%, -10%); }
}

.dama-chat-launcher:hover,
.dama-chat-launcher:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(0, 73, 144, 0.45), 0 0 0 2px var(--dama-chat-focus);
  outline: none;
}

.dama-chat-launcher-icon {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.dama-chat-launcher-icon svg {
  width: 28px;
  height: 28px;
  display: block;
  overflow: visible;
}

.dama-chat-sparkle-main {
  transform-origin: 14px 14px;
  animation: dama-chat-sparkle-rotate 12s linear infinite;
}

.dama-chat-sparkle-tr,
.dama-chat-sparkle-bl {
  transform-box: fill-box;
  transform-origin: center;
}

.dama-chat-sparkle-tr {
  animation: dama-chat-sparkle-twinkle 2s ease-in-out infinite;
}

.dama-chat-sparkle-bl {
  animation: dama-chat-sparkle-twinkle 2.8s ease-in-out infinite 1s;
}

@keyframes dama-chat-sparkle-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes dama-chat-sparkle-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1); }
}

/* === Tooltip === */

.dama-chat-launcher-tooltip-positioner {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  display: none;
  z-index: 3;
  pointer-events: none;
}

.dama-chat-launcher-tooltip-positioner[data-visible="true"] {
  display: block;
  animation: dama-chat-tooltip-in 200ms ease-out;
}

.dama-chat-launcher-tooltip-positioner::after {
  content: '';
  position: absolute;
  right: 22px;
  bottom: -6px;
  width: 0;
  height: 0;
  border-top: 6px solid rgba(255, 255, 255, 0.85);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  pointer-events: none;
}

.dama-chat-launcher-tooltip {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(0, 73, 144, 0.1);
  color: #0A2540;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 10px 30px 10px 14px;
  border-radius: 14px;
  max-width: 280px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 73, 144, 0.12);
  cursor: pointer;
  pointer-events: auto;
  transform-origin: bottom right;
  -webkit-tap-highlight-color: transparent;
}

.dama-chat-launcher-tooltip--bounce {
  animation: dama-chat-tooltip-bounce 220ms ease-out;
}

.dama-chat-launcher-tooltip-text {
  display: block;
  transition: opacity 300ms ease;
}

.dama-chat-launcher-tooltip-text--fading {
  opacity: 0;
}

.dama-chat-launcher-tooltip-close {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #5F7387;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
}

.dama-chat-launcher-tooltip-close:hover {
  color: #0A2540;
  background: rgba(10, 37, 64, 0.08);
}

.dama-chat-launcher-tooltip-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--dama-chat-focus);
}

@keyframes dama-chat-tooltip-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dama-chat-tooltip-bounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

@supports not ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .dama-chat-launcher-tooltip {
    background: rgba(255, 255, 255, 0.96);
  }
  .dama-chat-launcher-tooltip-positioner::after {
    border-left-color: rgba(255, 255, 255, 0.96);
  }
}

/* === Panel === */

.dama-chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-height: 620px;
  height: calc(100vh - 48px);
  background: var(--dama-chat-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--dama-chat-border-glass);
  border-radius: var(--dama-chat-radius-panel);
  box-shadow: var(--dama-chat-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

@supports not ((backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px))) {
  .dama-chat-panel,
  .dama-chat-fullscreen-root,
  .dama-chat-bubble--assistant,
  .dama-chat-disclaimer,
  .dama-chat-input-area {
    background: rgba(255, 255, 255, 0.95);
  }
}

.dama-chat-panel[data-open="true"] {
  display: flex;
  animation: dama-chat-panel-in 0.22s ease-out;
}

@keyframes dama-chat-panel-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* === Header === */

.dama-chat-header {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 30%),
    linear-gradient(135deg, var(--dama-chat-primary-deep) 0%, var(--dama-chat-primary-start) 50%, var(--dama-chat-primary-end) 100%);
  filter: brightness(1.02);
  color: #FFFFFF;
  min-height: 64px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  z-index: 2;
}

.dama-chat-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dama-chat-header-sparkle {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dama-chat-header-sparkle svg {
  width: 32px;
  height: 32px;
  display: block;
  overflow: visible;
}

.dama-chat-title {
  font-size: 17px;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dama-chat-beta-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  vertical-align: middle;
  flex-shrink: 0;
  white-space: nowrap;
}

.dama-chat-fullscreen-title .dama-chat-beta-badge {
  background: rgba(0, 73, 144, 0.08);
  color: rgba(0, 73, 144, 0.85);
  border-color: rgba(0, 73, 144, 0.18);
}

.dama-chat-online-dot {
  width: 8px;
  height: 8px;
  background: var(--dama-chat-online);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.dama-chat-online-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dama-chat-online);
  border-radius: 50%;
  animation: dama-chat-online-pulse 2s ease-out infinite;
  pointer-events: none;
}

@keyframes dama-chat-online-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0;   }
}

.dama-chat-icon-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s ease;
}

.dama-chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.dama-chat-icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.dama-chat-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.dama-chat-close {
  font-size: 22px;
  line-height: 1;
}

/* === Body container (shared widget+fullscreen) === */

.dama-chat-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: transparent;
}

/* === Messages === */

.dama-chat-messages {
  position: relative;
  flex: 1;
  overflow-y: auto;
  background: transparent;
  padding: 16px;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.dama-chat-messages::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 120, 212, 0.08) 0%, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(0, 73, 144, 0.06) 0%, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 1.5px),
    radial-gradient(circle at 85% 20%, rgba(0, 120, 212, 0.07) 0%, transparent 1.5px),
    radial-gradient(circle at 10% 70%, rgba(0, 73, 144, 0.05) 0%, transparent 1.5px);
  background-size: 400px 400px;
  animation: dama-chat-particles-drift 60s linear infinite;
}

@keyframes dama-chat-particles-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 400px 400px, -400px 400px, 400px -400px, -400px -400px, 200px 200px; }
}

.dama-chat-bubble {
  position: relative;
  z-index: 1;
  padding: 12px 16px;
  border-radius: var(--dama-chat-radius-bubble);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
  animation: dama-chat-bubble-in 0.25s ease-out;
}

@keyframes dama-chat-bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dama-chat-bubble--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--dama-chat-primary-start) 0%, var(--dama-chat-primary-end) 100%);
  color: #FFFFFF;
  max-width: 75%;
  padding: 10px 18px;
  border-radius: var(--dama-chat-radius-pill);
  box-shadow: var(--dama-chat-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dama-chat-bubble--assistant {
  align-self: flex-start;
  background: var(--dama-chat-surface-elevated);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--dama-chat-text);
  max-width: 85%;
  border: 1px solid var(--dama-chat-border);
  border-radius: var(--dama-chat-radius-bubble) var(--dama-chat-radius-bubble) var(--dama-chat-radius-bubble) 6px;
  box-shadow: var(--dama-chat-glow-soft);
}

.dama-chat-bubble--error {
  background: var(--dama-chat-error-bg);
  border-color: var(--dama-chat-error-border);
  color: var(--dama-chat-error);
}

.dama-chat-bubble a {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}

.dama-chat-bubble--user a {
  color: #FFFFFF;
}

.dama-chat-bubble--assistant a {
  color: var(--dama-chat-primary-end);
}

.dama-chat-bubble strong {
  font-weight: 600;
}

.dama-chat-heading {
  font-weight: 600;
  margin: 6px 0 2px;
  color: var(--dama-chat-text);
}

.dama-chat-bubble--user .dama-chat-heading {
  color: #FFFFFF;
}

/* === Typing indicator === */

.dama-chat-typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 18px;
}

.dama-chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dama-chat-primary-end);
  animation: dama-chat-typing-pulse 1.2s infinite ease-in-out;
}

.dama-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.dama-chat-typing span:nth-child(3) { animation-delay: 0.3s;  }

@keyframes dama-chat-typing-pulse {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30%           { opacity: 1;    transform: translateY(-2px); }
}

/* === Disclaimer + input === */

.dama-chat-disclaimer {
  font-size: 11px;
  color: var(--dama-chat-text-muted);
  padding: 8px 16px 0;
  background: var(--dama-chat-surface-elevated);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--dama-chat-border);
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.dama-chat-disclaimer a {
  color: var(--dama-chat-text-muted);
  text-decoration: underline;
}

.dama-chat-input-area {
  background: var(--dama-chat-surface-elevated);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 12px 14px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.dama-chat-input {
  flex: 1;
  min-height: 38px;
  max-height: 104px;
  resize: none;
  border: none;
  border-radius: 12px;
  padding: 9px 14px;
  font: inherit;
  color: inherit;
  background: var(--dama-chat-surface-input);
  outline: none;
  line-height: 1.4;
  box-shadow: inset 0 1px 3px rgba(0, 73, 144, 0.08);
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.dama-chat-input::placeholder {
  color: var(--dama-chat-text-muted);
}

.dama-chat-input:focus {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 3px rgba(0, 73, 144, 0.08), 0 0 0 2px var(--dama-chat-focus);
}

.dama-chat-input:disabled {
  background: rgba(255, 255, 255, 0.35);
  color: var(--dama-chat-text-muted);
  cursor: not-allowed;
}

.dama-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dama-chat-primary-start) 0%, var(--dama-chat-primary-end) 100%);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  box-shadow: var(--dama-chat-glow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.dama-chat-send:hover:not(:disabled),
.dama-chat-send:focus-visible:not(:disabled) {
  box-shadow: 0 8px 24px rgba(0, 73, 144, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.dama-chat-send:focus-visible:not(:disabled) {
  box-shadow: 0 8px 24px rgba(0, 73, 144, 0.35), 0 0 0 2px var(--dama-chat-focus);
}

.dama-chat-send:disabled {
  background: #C4C9D2;
  cursor: not-allowed;
  box-shadow: none;
}

.dama-chat-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

/* === Fullscreen page === */

.dama-chat-fullscreen-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #F4F8FD 0%, #E8F1FB 60%, #DEE9F7 100%);
  color: var(--dama-chat-text);
}

.dama-chat-fullscreen-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(0, 73, 144, 0.08) 0%, transparent 60%),
    linear-gradient(135deg, #F4F8FD 0%, #E8F1FB 60%, #DEE9F7 100%);
}

.dama-chat-fullscreen-page {
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 0;
}

.dama-chat-fullscreen-header {
  flex-shrink: 0;
  padding: 4px 0 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.dama-chat-fullscreen-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--dama-chat-primary-start) 0%, var(--dama-chat-primary-end) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 6px 18px var(--dama-chat-glow-soft);
}

.dama-chat-fullscreen-logo svg {
  width: 32px;
  height: 32px;
  display: block;
  overflow: visible;
}

.dama-chat-fullscreen-titles {
  flex: 1;
  min-width: 0;
}

.dama-chat-fullscreen-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dama-chat-text);
  margin: 0 0 4px;
  line-height: 1.2;
}

.dama-chat-fullscreen-subtitle {
  font-size: 14px;
  color: var(--dama-chat-text-muted);
  margin: 0;
}

.dama-chat-fullscreen-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--dama-chat-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--dama-chat-border-glass);
  border-bottom: none;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: var(--dama-chat-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dama-chat-fullscreen-root .dama-chat-body {
  flex: 1;
  min-height: 0;
}

/* === Mobile === */

@media (max-width: 480px) {
  .dama-chat-launcher-wrap {
    width: 56px;
    height: 56px;
    bottom: 16px;
    right: 16px;
  }
  .dama-chat-launcher-icon,
  .dama-chat-launcher-icon svg {
    width: 24px;
    height: 24px;
  }
  .dama-chat-launcher-tooltip {
    font-size: 13px;
    padding: 8px 26px 8px 12px;
    max-width: none;
  }
  .dama-chat-panel {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .dama-chat-fullscreen-page {
    padding: 16px 12px 0;
  }
  .dama-chat-fullscreen-root {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .dama-chat-fullscreen-title { font-size: 19px; }
  .dama-chat-fullscreen-subtitle { font-size: 13px; }
}

/* === Reduced motion === */

@media (prefers-reduced-motion: reduce) {
  .dama-chat-launcher,
  .dama-chat-launcher::before,
  .dama-chat-launcher::after,
  .dama-chat-launcher-pulse,
  .dama-chat-sparkle-main,
  .dama-chat-sparkle-tr,
  .dama-chat-sparkle-bl,
  .dama-chat-launcher-tooltip,
  .dama-chat-launcher-tooltip--bounce,
  .dama-chat-launcher-tooltip-positioner[data-visible="true"],
  .dama-chat-online-dot::after,
  .dama-chat-typing span,
  .dama-chat-bubble,
  .dama-chat-messages::before,
  .dama-chat-panel[data-open="true"] {
    animation: none !important;
  }
  .dama-chat-launcher-tooltip-text {
    transition: none !important;
  }
  .dama-chat-launcher::before,
  .dama-chat-launcher::after {
    transform: translate(0, 0);
  }
  .dama-chat-sparkle-tr,
  .dama-chat-sparkle-bl {
    opacity: 1;
    transform: scale(1);
  }
}
