/* ─────────────────────────────────────────────────────────────────────────────
   Tourist Information Widget — Informazioni turistiche
   Gardalake.com · brand blue #00A3D3
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Reset scope ─────────────────────────────────────────────────────────── */
#glk-ti-widget *,
#glk-ti-widget *::before,
#glk-ti-widget *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Container (fixed, bottom-right) ─────────────────────────────────────── */
#glk-ti-widget {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

/* ── Floating button ─────────────────────────────────────────────────────── */
#glk-ti-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #00A3D3;
  color: #fff;
  border: none;
  border-radius: 32px;
  padding: 10px 16px 10px 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
  transition: background .18s, box-shadow .18s, transform .15s;
  user-select: none;
}
#glk-ti-btn:hover {
  background: #0091bc;
  box-shadow: 0 6px 22px rgba(0,0,0,.3);
  transform: translateY(-2px);
}
#glk-ti-btn:active { transform: translateY(0); }

/* "i" badge on the button */
#glk-ti-btn .glk-ti-i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff;
  color: #00A3D3;
  border-radius: 50%;
  font-weight: 800;
  font-size: 19px;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  flex-shrink: 0;
}

#glk-ti-btn .glk-ti-btn-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  letter-spacing: .01em;
  word-break: break-word;
  max-width: 110px;
}

/* ── Chat panel ──────────────────────────────────────────────────────────── */
#glk-ti-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: glk-ti-pop .2s ease-out;
  transform-origin: bottom right;
}
#glk-ti-panel[hidden] { display: none; }

@keyframes glk-ti-pop {
  from { opacity: 0; transform: scale(.92) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Header ──────────────────────────────────────────────────────────────── */
#glk-ti-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #00A3D3;
  color: #fff;
  padding: 12px 14px;
}

#glk-ti-header .glk-ti-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.22);
  border-radius: 50%;
  font-weight: 800;
  font-size: 20px;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  flex-shrink: 0;
}

.glk-ti-header-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.glk-ti-header-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.glk-ti-header-sub {
  font-size: 11px;
  opacity: .82;
}

#glk-ti-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  opacity: .8;
  transition: opacity .15s, background .15s;
  flex-shrink: 0;
}
#glk-ti-close:hover { opacity: 1; background: rgba(255,255,255,.15); }

/* ── Messages area ───────────────────────────────────────────────────────── */
#glk-ti-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 480px;
  background: #f8fafd;
}

.glk-ti-msg { display: flex; }
.glk-ti-msg-bot { justify-content: flex-start; }
.glk-ti-msg-user { justify-content: flex-end; }

.glk-ti-bubble {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.glk-ti-msg-bot .glk-ti-bubble {
  background: #fff;
  color: #222;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.glk-ti-msg-user .glk-ti-bubble {
  background: #00A3D3;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* ── Input bar ───────────────────────────────────────────────────────────── */
#glk-ti-inputbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8edf2;
  background: #fff;
}

#glk-ti-input {
  flex: 1;
  border: 1px solid #d0dae4;
  border-radius: 20px;
  padding: 7px 13px;
  font-size: 13px;
  outline: none;
  color: #333;
  background: #f4f7fa;
  transition: border-color .15s;
}
#glk-ti-input:not(:disabled):focus {
  border-color: #00A3D3;
  background: #fff;
}
#glk-ti-input:disabled {
  cursor: not-allowed;
  color: #999;
}

#glk-ti-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #00A3D3;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}
#glk-ti-send:not(:disabled):hover { background: #0091bc; transform: scale(1.07); }
#glk-ti-send:disabled {
  background: #b0d9e9;
  cursor: not-allowed;
}

/* ── Beta notice bubble ─────────────────────────────────────────────────── */
.glk-ti-bubble-beta {
  background: #fff8e1 !important;
  color: #7a5a00 !important;
  font-size: 11.5px !important;
  border-left: 3px solid #f0b429;
  box-shadow: none !important;
}

/* ── Typing indicator (3 bouncing dots) ─────────────────────────────────── */
.glk-ti-typing .glk-ti-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}
.glk-ti-typing .glk-ti-bubble span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #aab8c2;
  border-radius: 50%;
  animation: glk-ti-bounce .9s ease-in-out infinite;
}
.glk-ti-typing .glk-ti-bubble span:nth-child(2) { animation-delay: .15s; }
.glk-ti-typing .glk-ti-bubble span:nth-child(3) { animation-delay: .3s; }

@keyframes glk-ti-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-6px); }
}

/* ── Hotel cards ─────────────────────────────────────────────────────────── */
.glk-ti-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px;
}
.glk-ti-card {
  display: block;
  background: #fff;
  border: 1px solid #dce8f0;
  border-radius: 10px;
  padding: 9px 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.glk-ti-card:hover {
  border-color: #00A3D3;
  box-shadow: 0 2px 8px rgba(0,163,211,.12);
}
.glk-ti-card-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1a3c4d;
  margin-bottom: 2px;
}
.glk-ti-card-loc {
  font-size: 11.5px;
  color: #6b8a99;
}
.glk-ti-card-stars {
  color: #f0b429;
  font-size: 11px;
}

/* ── Thumbs rating ───────────────────────────────────────────────────────── */
.glk-ti-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 5px;
  margin-top: -2px;
}
.glk-ti-thumb {
  font-size: 17px;
  opacity: 0.35;
  cursor: pointer;
  line-height: 1;
  transition: opacity .15s, transform .1s;
  user-select: none;
}
.glk-ti-thumb:hover { opacity: 0.75; transform: scale(1.2); }
.glk-ti-rating-done .glk-ti-thumb { cursor: default; opacity: 0.25; }
.glk-ti-rating-done .glk-ti-thumb:hover { transform: none; opacity: 0.25; }
.glk-ti-thumb-on { opacity: 1 !important; transform: scale(1.1); }
.glk-ti-rating-done .glk-ti-thumb-on { opacity: 1 !important; }
.glk-ti-rating-thanks {
  font-size: 16px;
  line-height: 1;
}

/* ── Mobile: anchor to bottom of viewport, full-width panel ─────────────── */
@media (max-width: 480px) {
  #glk-ti-widget {
    bottom: 16px;
    right: 14px;
  }
  #glk-ti-panel {
    width: calc(100vw - 28px);
    right: 0;
  }
}
