/* chatbot_v2_lang_fixed.css â€“ v2.6
   Stronger language flags visibility (ðŸ‡¸ðŸ‡ª ðŸ‡¬ðŸ‡§)
*/
/* DEBUG: if you see a red border, CSS is loading */


.ggw-wrap{
  position: fixed;
  right: 18px;
  bottom: 18px;
top: 18px;
  z-index: 999999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  ggw-primary: #0f172a;
  ggw-accent: #c09a5b;
  ggw-surface: #ffffff;
  ggw-bg: #f6f7fb;
  ggw-text: #111827;
  ggw-muted: rgba(17,24,39,.6);
}

/* State */
.ggw-wrap[data-open="0"] .ggw-card{ display:none !important; }
.ggw-wrap[data-open="0"] .ggw-btn{ display:inline-flex !important; }
.ggw-wrap[data-open="1"] .ggw-card{ display:flex !important; }
.ggw-wrap[data-open="1"] .ggw-btn{ display:none !important; }

/* Button */
.ggw-btn{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000000;

  border: 0;
  border-radius: 999px;

  padding: 12px 20px;   /* ? mer luft horisontellt */
  min-width: 92px;      /* ? gör knappen bredare */

  cursor: pointer;
  display: inline-flex;
  gap: 12px;
  align-items: center;

  background: var(--ggw-primary);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
}

.ggw-btn:active{ transform: translateY(1px); }

.ggw-badge{
  width: 38px;          /* ? större cirkel */
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: var(--ggw-accent);
  overflow: hidden;
}

.ggw-badge svg{
  width: 26px;          /* ? större SVG */
  height: 26px;
  display:block;
}

.ggw-badge-img{
  width: 26px;          /* ? större PNG/SVG-logo */
  height: 26px;
  display:block;
  object-fit: contain;
}


.ggw-btn-label{
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: none;
}


/* Card */
.ggw-card{
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 1000001;

  width: 360px;
  height: 560px;
  max-height: calc(100vh - 110px);
  border-radius: 18px;
  overflow: hidden;

  background: var(--ggw-surface);
  color: var(--ggw-text);
  box-shadow: 0 18px 60px rgba(0,0,0,.24);

  flex-direction: column;
  min-height: 260px;
  border: 1px solid rgba(0,0,0,.08);
}

/* Header */
.ggw-head{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ggw-primary);
  color: #fff;
}
.ggw-title{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 14px;
  line-height: 1.2;
}

.ggw-head-right{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* âœ… Stronger flags */
.ggw-lang{
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: rgba(255,255,255,.16);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.ggw-flag{
  border: 0;
  background: rgba(0,0,0,.10);         /* makes the button visible */
  width: 40px;
  height: 34px;
  border-radius: 11px;
  cursor: pointer;

  font-size: 22px;                      /* bigger emoji */
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: .65;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.ggw-flag:hover{
  opacity: .95;
  transform: scale(1.06);
  background: rgba(255,255,255,.18);
}
.ggw-flag.is-active{
  opacity: 1;
  background: rgba(255,255,255,.26);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

#ggw-close{
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
#ggw-close:active{ transform: translateY(1px); }

/* Body (scroll) */
.ggw-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  background: var(--ggw-bg);
}

/* Messages */
.ggw-row{ display: flex; margin: 8px 0; }
.ggw-row.user{ justify-content: flex-end; }
.ggw-row.bot{ justify-content: flex-start; }

.ggw-bubble{
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
}

.ggw-row.user .ggw-bubble{
  background: rgba(192,154,91,.14);
  border-color: rgba(192,154,91,.22);
}

.ggw-meta{
  font-size: 12px;
  color: var(--ggw-muted);
  margin-top: 4px;
}

.ggw-bubble-note{
  font-size: 12px;
  color: var(--ggw-muted);
  background: rgba(255,255,255,.75);
}

/* Footer */
.ggw-foot{
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--ggw-surface);
  border-top: 1px solid rgba(0,0,0,.08);
  min-height: 66px;
  align-items: center;
}

.ggw-in{
  flex: 1 1 auto;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.18);
  padding: 0 12px;
  outline: none;
  background: #fff;
  color: var(--ggw-text);
}
.ggw-in:focus{
  border-color: rgba(192,154,91,.55);
  box-shadow: 0 0 0 4px rgba(192,154,91,.18);
}

.ggw-send{
  flex: 0 0 auto;
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: var(--ggw-primary);
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
}
.ggw-send:disabled{
  opacity: .6;
  cursor: not-allowed;
}
.ggw-title-logo img {
  display: block;
  max-width: 180px;
}
/* Mobile */
@media (max-width: 420px){
  .ggw-card{
    right: 10px;
    left: 10px;
    width: auto;
  }
  .ggw-btn{
    right: 10px;
    bottom: 10px;
  }
  .ggw-card{
    bottom: 70px;
    max-height: calc(100vh - 95px);
  }
	#ggw-wrap .ggw-head { background: var(--ggw-primary) !important; color: #fff !important; }
#ggw-wrap .ggw-flag { font-size: 22px !important; opacity: 1 !important; background: rgba(255,255,255,.18) !important; }
#ggw-wrap .ggw-flag.is-active { background: rgba(255,255,255,.30) !important; }
/* Force emoji flags on desktop */
#ggw-wrap .ggw-flag{
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",system-ui,sans-serif !important;
  font-variant-emoji: emoji !important; /* supported in modern browsers */
}
/* =====================================
   ANDROID TABLET LANDSCAPE – lower height
   (keep bottom position, just reduce height)
   ===================================== */
@media (orientation: landscape) and (max-height: 700px) {

  /* Chat window: reduce height, keep same bottom anchor */
  #ggw-wrap .ggw-card{
    height: 380px !important;               /* <-- justera vid behov (380–460) */
    height: min(420px, calc(100vh - 120px)) !important;
  }

  /* Slightly reduce internal spacing so header always fits */
  #ggw-wrap .ggw-head{
    padding: 8px 10px !important;
  }
  #ggw-wrap .ggw-body{
    padding: 10px !important;
  }
  #ggw-wrap .ggw-foot{
    padding: 8px !important;
    min-height: 56px !important;
  }
}


}
