/* === Sofia AI – Widget CSS (desktop/generelt) === */

/* Launcher */
.sofia-launcher {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  width: 60px;
  height: 60px;
  background: #32cd32;
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(50, 205, 50, 0.4);
  cursor: pointer;
  z-index: 2147483647 !important; /* MAX z-index */
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}


.sofia-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(50, 205, 50, 0.5);
}

/* Badge starter skjult – kommer kun frem sammen med popup */
.sofia-launcher .launcher-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e91e63;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(233,30,99,0.6);
  z-index: 10;
  pointer-events: none;
  opacity: 0;                  
  transform: scale(0);
  transition: all 0.3s ease;
}

/* Når popup er synlig → vis badge med animation */
.welcome-popup.show ~ #sofia-launcher .launcher-badge,
.welcome-popup.show + #sofia-launcher .launcher-badge {
  opacity: 1;
  transform: scale(1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.sofia-icon {
  position: absolute;
  width: 28px;
  height: 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sofia-icon-chat { opacity: 1; transform: rotate(0deg) scale(1); }
.sofia-icon-arrow { opacity: 0; transform: rotate(180deg) scale(0.8); }

.sofia-launcher.open .sofia-icon-chat { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.sofia-launcher.open .sofia-icon-arrow { opacity: 1; transform: rotate(0deg) scale(1); }

/* Widget */
.sofia-chat-widget {
  position: fixed !important;
  bottom: 100px !important;
  right: 20px !important;
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  z-index: 2147483646 !important;
  overflow: hidden;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
}


.sofia-chat-widget.open {
  width: 400px;
  height: 650px;
  max-width: 90vw;
  border-radius: 19px;
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.sofia-header {
  background: #32cd32;
  color: white;
  padding: 35px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease 0.2s;
  border-top-left-radius: 19px;
  border-top-right-radius: 19px;
  position: relative;
}

.sofia-chat-widget.open .sofia-header { opacity: 1; transform: translateY(0); }

.header-left { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.header-title { font-size: 17px; font-weight: 600; }

.active-status { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  font-size: 12.5px; 
  opacity: 0.9; 
  font-weight: 500; 
}

.active-circle { 
  width: 8px; 
  height: 8px; 
  background: white; 
  border-radius: 50%; 
  animation: ripple 2s infinite; 
}

@keyframes ripple {
  0% { opacity: 0.999636; transform: scale(0.800583); }
  50% { opacity: 0.6; transform: scale(1.2); }
  100% { opacity: 0.999636; transform: scale(0.800583); }
}

.header-center { 
  position: absolute; 
  left: 50%; 
  top: 50%; 
  transform: translate(-50%, -50%); 
}
.sofia-logo-img { 
  width: 36px; 
  height: 36px; 
  object-fit: contain; 
  filter: brightness(0) invert(1); 
}

.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.dots-menu { 
  display: flex; 
  gap: 2px; 
  cursor: pointer; 
  padding: 4px; 
  border-radius: 4px; 
  transition: background 0.2s; 
}
.dots-menu:hover { background: rgba(255,255,255,0.1); }

.dot { width: 4px; height: 4px; background: white; border-radius: 50%; }

.close-arrow {
  background: none; 
  border: none; 
  color: white; 
  cursor: pointer;
  width: 32px; 
  height: 32px; 
  display: flex; 
  align-items: center;
  justify-content: center; 
  border-radius: 50%; 
  transition: background 0.2s;
}
.close-arrow:hover { background: rgba(255,255,255,0.1); }
.close-arrow svg { width: 20px; height: 20px; stroke: white; stroke-width: 2.5; }

/* 3-PRIKKER MENU */
#sofia-context-menu {
  position: fixed;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  padding: 8px 0;
  min-width: 160px;
  z-index: 10000;
  font-size: 14px;
  animation: menuPop 0.2s ease;
}

@keyframes menuPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.menu-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
  color: #333;
}

.menu-item:hover { background: #f0f8f0; }
.menu-item:active { background: #e0f0e0; }

/* Body */
.sofia-body {
  flex: 1;
  padding: 20px 18px 12px 18px;
  overflow-y: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.3s;
}

.sofia-chat-widget.open .sofia-body { opacity: 1; transform: translateY(0); }

/* BESKEDER */
.message {
  max-width: 90%;
  padding: 13px 18px;
  border-radius: 19px;
  line-height: 1.55;
  font-size: 15px;
  word-wrap: break-word;
  position: relative;
}

.user-message {
  align-self: flex-end;
  background: #32cd32;
  color: white;
  border-bottom-right-radius: 6px;
}

.bot-message {
  align-self: flex-start;
  background: #f9f9fb;
  color: #333;
  border-bottom-left-radius: 6px;
}

/* "Sofia" – LABEL */
.message-label.tight {
  font-size: 12px;
  color: #aaa;
  margin-top: 2px;
  font-style: italic;
  text-align: left;
  padding-left: 18px;
}

.user-message + .message-label.tight {
  text-align: right;
  padding-right: 18px;
  padding-left: 0;
}

/* TYPING */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  max-width: 90%;
  align-self: flex-start;
}

.typing-bubble {
  width: 8px;
  height: 8px;
  background: #ccc;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-bubble:nth-child(1) { animation-delay: -0.32s; }
.typing-bubble:nth-child(2) { animation-delay: -0.16s; }
.typing-bubble:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* FEEDBACK */
.feedback-message {
  align-self: flex-start;
  max-width: 90%;
  background: #f9f9fb;
  border-radius: 19px;
  padding: 13px 18px;
  font-size: 15px;
  color: #333;
  border-bottom-left-radius: 6px;
}

.feedback-question { margin-bottom: 12px; font-weight: 500; }

.feedback-emojis { 
  display: flex; 
  gap: 16px; 
  justify-content: center; 
  flex-wrap: wrap; 
}

.feedback-emoji {
  font-size: 32px;
  cursor: pointer;
  transition: transform .2s ease;
  user-select: none;
  text-align: center;
  position: relative;
  width: 40px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feedback-emoji > div { font-weight: bold; font-size: 28px; color: #555; }

.feedback-emoji span {
  display: block;
  font-size: 11px;
  color: transparent;
  margin-top: 4px;
  font-weight: 500;
  transition: color .2s ease;
  white-space: nowrap;
}

.feedback-emoji:hover span { color: #666; }
.feedback-emoji:hover { transform: scale(1.15); }

.feedback-wrapper { display: contents; }

/* TAK-BOKS */
.thank-you-box {
  align-self: center;
  max-width: 90%;
  background: #f0f8f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: #2d862d;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px auto;
  border-bottom-left-radius: 6px;
  font-weight: 500;
  width: fit-content;
}

.thank-you-check {
  font-size: 18px;
  font-weight: bold;
  color: #2d862d;
}

.thank-you-text { flex: 1; }

.thank-you-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
  font-weight: bold;
}

.thank-you-close:hover { background: rgba(0,0,0,.1); }

/* 3 FORSLAG */
.suggestion-boxes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 18px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.suggestion-boxes::-webkit-scrollbar { display: none; }

.suggestion-boxes.hidden {
  opacity: 0;
  pointer-events: none;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.suggestion-btn {
  background: #f8f9fa;
  color: #999;
  font-size: 14.5px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  flex: 1;
  min-width: 85px;
  max-width: 135px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.suggestion-btn:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
}

.suggestion-btn:active { background: #e8e8e8; }

/* Footer */
.sofia-footer {
  padding: 14px 18px 18px 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.35s;
}

.sofia-chat-widget.open .sofia-footer { opacity: 1; transform: translateY(0); }

.privacy-text {
  font-size: 10.5px;
  color: #99999997;
  text-align: center;
  font-style: italic;
  margin-bottom: 1px;
}

/* INPUT + STEMME + SEND */
.input-wrapper {
  position: relative;
  margin-top: 10px;
  display: flex;
  align-items: center;
}

#sofia-input {
  flex: 1;
  padding: 20px 50px 20px 50px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  background: #f9f9fb;
  color: #333;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

#sofia-input::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

/* LABEL */
.input-label {
  position: absolute !important;
  left: 50px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 15px !important;
  color: #aaa !important;
  font-style: normal !important;
  font-weight: 400 !important;
  pointer-events: none !important;
  transition: all 0.3s ease !important;
  z-index: 10 !important;
  white-space: nowrap !important;
}

#sofia-input:focus ~ .input-label,
#sofia-input:not(:placeholder-shown) ~ .input-label {
  top: 6px !important;
  font-size: 10px !important;
  color: #32cd32 !important;
  transform: translateY(0) !important;
  font-weight: 400 !important;
}

/* GRØN UNDERLINE */
.input-underline {
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 0 !important;
  height: 1.5px !important;
  background: #32cd32 !important;
  transition: all 0.3s ease !important;
  transform: translateX(-50%) !important;
  z-index: 3 !important;
  border-radius: 1px !important;
}

#sofia-input:focus ~ .input-underline {
  width: 100% !important;
  left: 0 !important;
  transform: none !important;
}

#sofia-input:focus {
  background: white !important;
}

/* MIKROFON-KNAP */
.voice-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 11;
  opacity: 0.4;
}

.voice-btn:hover {
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.1);
}

.voice-btn.listening {
  background: #ff4444;
  opacity: 1;
  animation: pulse 1.5s infinite;
}

.voice-btn svg {
  width: 18px;
  height: 18px;
  fill: #aaa;
}

/* SEND-KNAP */
.send-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 11;
  opacity: 0.4;
  pointer-events: none;
}

.send-btn:not([disabled]) {
  opacity: 0.4;
  pointer-events: all;
  cursor: pointer;
}

.send-btn:hover:not([disabled]) {
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.1);
}

.send-btn svg {
  width: 18px;
  height: 18px;
  fill: #aaa;
}

.powered-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  color: #aaa;
  margin-top: 6px;
}

.powered-s { 
  font-size: 15px; 
  font-weight: bold; 
  color: #32cd32; 
}

#sofia-send { display: none; }

/* KARLA-STYLE VELKOMST POPUP */
.welcome-popup {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 9998;
  max-width: 310px;
  width: calc(100% - 40px);
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.welcome-popup.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Hvid taleboble */
.popup-bubble {
  background: white;
  border-radius: 20px;
  padding: 16px 20px 14px;
  position: relative;
  margin-bottom: 22px;
}

/* Stort hak */
.popup-bubble::after {
  content: "";
  position: absolute;
  bottom: -17px;
  left: 262px;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 16px solid transparent;
  border-top: 18px solid white;
  z-index: 2;
}

/* X-knap */
.popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  color: #aaa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.popup-close:hover { background: #f0f0f0; }

/* Indhold */
.popup-content {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-right: 34px;
}

.popup-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.popup-text {
  font-size: 15.6px;
  line-height: 1.48;
  color: #333;
  margin-top: 2px;
}

.popup-text strong {
  font-size: 17.6px;
  display: block;
  margin-bottom: 4px;
  color: #222;
}

/* Navn under boble */
.popup-label {
  display: flex;
  align-items: center;
  margin-left: 66px;
  margin-top: 10px;
  font-weight: 600;
  color: #8b2635;
  font-size: 14.8px;
}

.popup-label::before {
  content: "smile";
  width: 36px;
  height: 36px;
  background: #8b2635;
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 20px;
}

.speaker-name {
  font-size: 12px;
  margin-top: 8px;
  color: #aaa;
}

.Vejledning-fejl {
  font-size: 12px;
  color: #aaa;
  box-shadow: #999;
  align-self: center;
  margin-top: 10px;
}

.resolve-buttons {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resolve-btn {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.resolve-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  transform: translateY(-1px);
}

.resolve-btn.resolve-yes {
  border-color: #bbf7d0;
  background: #ecfdf3;
}

.resolve-btn.resolve-yes:hover {
  background: #dcfce7;
}

.resolve-btn.resolve-no {
  border-color: #fee2e2;
  background: #fef2f2;
}

.resolve-btn.resolve-no:hover {
  background: #fee2e2;
}
/* === Sofia tickets / resolve UI === */
.sofia-resolve-message {
  margin-top: 6px;
}

.sofia-resolve-message .resolve-question {
  font-weight: 500;
  margin-bottom: 8px;
}

.sofia-resolve-message .resolve-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sofia-resolve-message .resolve-buttons .resolve-yes,
.sofia-resolve-message .resolve-buttons .resolve-no {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.sofia-resolve-message .resolve-yes {
  background: #10b981;
  color: #ffffff;
}

.sofia-resolve-message .resolve-no {
  background: #f3f4f6;
  color: #374151;
}

.sofia-resolve-message .resolve-buttons button:hover {
  transform: translateY(-1px);
}

/* Ticket form */
.sofia-resolve-message .ticket-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.sofia-resolve-message .ticket-form input,
.sofia-resolve-message .ticket-form textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.sofia-resolve-message .ticket-form textarea {
  min-height: 70px;
}

.sofia-resolve-message .ticket-form #ticket-submit {
  align-self: flex-start;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.sofia-resolve-message .ticket-form #ticket-submit:hover {
  background: #059669;
  transform: translateY(-1px);
}

.sofia-resolve-message .resolve-thanks {
  font-weight: 500;
  color: #16a34a;
}

/* =========================================================
   SOFIA WIDGET – FULLSCREEN PÅ MOBIL
   ========================================================= */
@media (max-width: 768px) {

  /* 1) Når widget er åben: fyld hele skærmen */
  #sofia-chat-widget.open,
  #sofia-chat-widget.is-open,
  .sofia-chat-widget.open,
  .sofia-chat-widget.is-open {
    position: fixed !important;
    inset: 0 !important;                 /* top/right/bottom/left = 0 */
    width: 100vw !important;
    height: 100dvh !important;           /* bedre end 100vh på mobil */
    max-width: none !important;
    max-height: none !important;

    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;

    z-index: 2147483647 !important;      /* over alt */
    overflow: hidden !important;
  }

  /* 2) Layout indeni: header/top, body scroll, footer bund */
  #sofia-chat-widget.open,
  #sofia-chat-widget.is-open {
    display: flex !important;
    flex-direction: column !important;
  }

  #sofia-chat-widget.open .sofia-header,
  #sofia-chat-widget.is-open .sofia-header {
    flex: 0 0 auto;
    padding-top: calc(12px + env(safe-area-inset-top)) !important;
  }

  #sofia-chat-widget.open .sofia-body,
  #sofia-chat-widget.is-open .sofia-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  #sofia-chat-widget.open .sofia-footer,
  #sofia-chat-widget.is-open .sofia-footer {
    flex: 0 0 auto;
    padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  }

  /* 3) Skjul launcher mens chat er åben (så den ikke ligger ovenpå input) */
  #sofia-chat-widget.open ~ #sofia-launcher,
  #sofia-chat-widget.is-open ~ #sofia-launcher {
    display: none !important;
  }

  /* Hvis rækkefølgen i DOM er omvendt på nogle sider, så tag også denne: */
  #sofia-chat-widget.open + #sofia-launcher,
  #sofia-chat-widget.is-open + #sofia-launcher {
    display: none !important;
  }

  /* 4) Sørg for at widget close-knap er nem at ramme */
  #sofia-close {
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
  }

  /* 5) Velkomst-popup: på mobil kan den være i vejen */
  /* Hvis du vil beholde den, så fjern denne. */
@media (max-width: 768px) {
  /* --- Popup skal være synlig på mobil --- */
  #sofia-welcome-popup {
    display: block !important;
    position: fixed;
    z-index: 2147483647; /* over alt */
    pointer-events: none; /* så man stadig kan trykke på launcher */

    /* Match launcher position + safe-area */
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(20px + 60px + 14px + env(safe-area-inset-bottom)); 
    /* 20px (launcher bottom) + 60px (launcher size) + 14px (luft) */
  }

  /* Selve bubble */
  #sofia-welcome-popup .popup-bubble {
    position: relative;
    max-width: min(320px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.18);
    padding: 14px 14px 12px;
  }

  /* “Hale” der peger mod launcher */
  #sofia-welcome-popup .popup-bubble::after {
    content: "";
    position: absolute;
    right: 22px;   /* justér hvis den skal pege mere præcist */
    bottom: -10px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-right: 1px solid rgba(0,0,0,0.10);
    border-bottom: 1px solid rgba(0,0,0,0.10);
    transform: rotate(45deg);
  }

  /* Hvis du vil kunne lukke popuppen med X på mobil,
     så tillad pointer events inde i popuppen */
  #sofia-welcome-popup .popup-bubble {
    pointer-events: auto;
  }

  /* Close-knappen i popup (hvis du vil have den synlig og nem) */
  #sofia-welcome-popup .popup-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Skjul popuppen når chatten er åben (fullscreen) */
  #sofia-chat-widget.open ~ #sofia-welcome-popup,
  #sofia-chat-widget.is-open ~ #sofia-welcome-popup {
    display: none !important;
  }

  /* Hvis popup ligger før widget i DOM, så tag også denne: */
  #sofia-chat-widget.open + #sofia-welcome-popup,
  #sofia-chat-widget.is-open + #sofia-welcome-popup {
    display: none !important;
  }

}
