:root {
  --ud-dixa-shadow: 0 12px 30px rgba(0,0,0,.18);
  --ud-dixa-radius: 14px;
  --ud-dixa-border: rgba(0,0,0,.12);
  --ud-dixa-panel-w: 360px;
  --ud-dixa-panel-max-h: calc(100dvh - 96px);
  --ud-dixa-gap: 12px;
  --ud-dixa-z: 10000;
  --ud-dixa-btn-size: 65px;
  --ud-dixa-font: Arial, sans-serif;
  --ud-dixa-background: #1E4A84;
}

/* Hide chat widget while Real Cookie Banner consent dialog is open */
body:has([consent-skip-blocker="1"] dialog[open]) #ud-dixa-root {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#ud-dixa-root {
  font-family: var(--ud-dixa-font);
}

#ud-dixa-root .ud-dixa-hint a {
  text-decoration: underline;
}

#ud-dixa-root .ud-dixa-hint a:hover {
  text-decoration: none;
}

.ud-dixa-launcher {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: var(--ud-dixa-btn-size);
  height: var(--ud-dixa-btn-size);
  border-radius: 999px;
  border: 1px solid var(--ud-dixa-border);
  box-shadow: var(--ud-dixa-shadow);
  background: var(--ud-dixa-background);
  color: #fff;
  cursor: pointer;
  z-index: var(--ud-dixa-z);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.ud-dixa-launcher:focus {
  outline: 3px solid rgba(0, 0, 0, 0.18);
  outline-offset: 2px;
}

.ud-dixa-icon {
  width: 34px;
  height: 34px;
  transform: translate(1px, -1px);
}

.ud-dixa-shell {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--ud-dixa-btn-size) + var(--ud-dixa-gap));
  width: var(--ud-dixa-panel-w);
  border-radius: var(--ud-dixa-radius);
  border: 1px solid var(--ud-dixa-border);
  box-shadow: var(--ud-dixa-shadow);
  background: #fff;
  z-index: var(--ud-dixa-z);
  overflow: hidden;
  display: none;
  max-height: var(--ud-dixa-panel-max-h);
  /* isolate widget styles from host page */
  isolation: isolate;
}

.ud-dixa-shell.ud-dixa-shell--open {
  display: block;
}

.ud-dixa-header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--ud-dixa-border);
  background: #f8f8f8;
}

.ud-dixa-title {
  font-size: 14px;
  font-weight: 600;
}

.ud-dixa-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  color: #111;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 34px;
}

.ud-dixa-close-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.ud-dixa-close-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.ud-dixa-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.ud-dixa-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.ud-dixa-hint {
  font-size: 13px;
  line-height: 1.45;
  color: #222;
}

.ud-dixa-hint a {
  color: #111;
}

.ud-dixa-cta-row {
  margin-top: 0;
  display: flex;
  gap: 10px;
}

.ud-dixa-button {
  border-radius: 10px;
  padding: 12px 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ud-dixa-background);
  background: var(--ud-dixa-background);
  color: #fff;
}

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

.ud-dixa-status {
  font-size: 12px;
  color: #555;
  min-height: 16px;
}

.ud-dixa-dont-show-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #444;
  margin-top: 2px;
}

.ud-dixa-dont-show-checkbox {
  margin: 0 5px 0 0;
  flex: 0 0 auto;
}

.ud-dixa-dont-show-label {
  line-height: 1.35;
}

@media (max-width: 420px) {
  /* Fix: prevent white corners around the Dixa widget on mobile */
  iframe[id^=dixa-messenger-widget-iframe-] {
    background: var(--ud-dixa-background) !important;
  }
  .ud-dixa-shell {
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100dvh - 88px);
    bottom: calc(10px + var(--ud-dixa-btn-size) + var(--ud-dixa-gap));
  }
  .ud-dixa-launcher {
    right: 10px;
    bottom: 10px;
  }
}
