/* ─── Floating button ─────────────────────────────────────────────────── */
#askgpt-btn {
  position: absolute;
  display: none;
  align-items: center;
  gap: 6px;
  background: #10a37f;
  color: #fff;
  padding: 7px 13px 7px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  transition: background 0.15s ease, transform 0.1s ease;
  user-select: none;
  white-space: nowrap;
}

#askgpt-btn:hover {
  background: #0d8f70;
  transform: translateY(-1px);
}

#askgpt-btn:active {
  transform: translateY(0);
}

.askgpt-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── Response box ────────────────────────────────────────────────────── */
#askgpt-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 16px;
  width: 340px;
  max-width: calc(100vw - 48px);
  z-index: 99999;
  box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#askgpt-box.askgpt-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Header */
.askgpt-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f0f0f0;
  background: #f9fafb;
}

.askgpt-popup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #111;
}

.askgpt-popup-icon {
  width: 20px;
  height: 20px;
  color: #10a37f;
}

.askgpt-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.1s, background 0.1s;
}

.askgpt-close:hover {
  color: #111;
  background: #eee;
}

/* Quoted text */
.askgpt-popup-quote {
  font-size: 11.5px;
  color: #888;
  padding: 10px 16px 0;
  font-style: italic;
  line-height: 1.5;
}

/* Body */
.askgpt-popup-body {
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #222;
  max-height: 260px;
  overflow-y: auto;
}

/* Footer */
.askgpt-popup-footer {
  padding: 10px 16px 14px;
  border-top: 1px solid #f0f0f0;
  text-align: right;
}

.askgpt-open-link {
  font-size: 12px;
  color: #10a37f;
  text-decoration: none;
  font-weight: 600;
}

.askgpt-open-link:hover {
  text-decoration: underline;
}

/* Loading dots */
.askgpt-loading {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 8px 0;
}

.askgpt-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10a37f;
  animation: askgpt-bounce 1.2s ease-in-out infinite;
}

.askgpt-loading span:nth-child(1) { animation-delay: 0s; }
.askgpt-loading span:nth-child(2) { animation-delay: 0.2s; }
.askgpt-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes askgpt-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}
/* =========================
   AI SHARE ICONS
========================= */

.ai-icons-container {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ai-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    text-decoration: none;
    background-color: #00a3a2;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: all .2s ease;
}

.ai-icon:hover {
    background-color: #dcf7f2;
    color: #00a3a2;
}

.ai-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* =========================
   QUICK READ
========================= */

.askgpt-quick-read {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf9;
    border: 1px solid #c7f0e7;
    border-left: 4px solid #10a37f;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.askgpt-quick-read strong {
    color: #0f766e;
}

.askgpt-quick-read span {
    color: #374151;
}
