/* ── Gift Finder FAB ── */
.gift-finder-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(232, 93, 58, 0.35);
  z-index: 998;
  cursor: pointer;
  transition: transform 0.2s;
  border: 3px solid #fff;
  overflow: hidden;
  padding: 0;
  background: var(--color-primary-light);
  animation: gfPulse 2.5s ease-in-out infinite;
}

.gift-finder-fab:hover {
  transform: scale(1.08);
  animation: none;
}

.gift-finder-fab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes gfPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(232, 93, 58, 0.35); }
  50% { box-shadow: 0 4px 24px rgba(232, 93, 58, 0.55), 0 0 0 8px rgba(232, 93, 58, 0.1); }
}

/* ── Speech Bubble ── */
.gift-finder-bubble {
  position: fixed;
  bottom: 56px;
  left: 100px;
  background: #fff;
  color: var(--color-text);
  font-size: 0.85em;
  line-height: 1.4;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 998;
  max-width: 220px;
  cursor: pointer;
  animation: gfBubbleIn 0.4s ease;
}

.gift-finder-bubble::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #fff;
}

.gift-finder-bubble strong {
  color: var(--color-primary);
}

.gift-finder-bubble.hidden {
  display: none;
}

@keyframes gfBubbleIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Chat Panel ── */
.gift-finder-panel {
  position: fixed;
  bottom: 96px;
  left: 24px;
  width: 380px;
  height: 520px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 998;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.gift-finder-panel.open {
  display: flex;
}

/* ── Panel Header ── */
.gift-finder-header {
  background: var(--color-primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gift-finder-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.gift-finder-header-info {
  flex: 1;
}

.gift-finder-header-name {
  font-weight: 700;
  font-size: 0.95em;
}

.gift-finder-header-status {
  font-size: 0.75em;
  opacity: 0.85;
}

.gift-finder-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4em;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.gift-finder-close:hover {
  opacity: 1;
}

/* ── Messages Area ── */
.gift-finder-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Message Bubbles ── */
.gf-msg {
  display: flex;
  gap: 8px;
  max-width: 90%;
  animation: gfFadeIn 0.3s ease;
}

.gf-msg-bot {
  align-self: flex-start;
}

.gf-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.gf-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
}

.gf-msg-user .gf-msg-avatar {
  display: none;
}

.gf-msg-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88em;
  line-height: 1.45;
}

.gf-msg-bot .gf-msg-bubble {
  background: var(--color-bg-warm);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.gf-msg-user .gf-msg-bubble {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* ── Option Chips ── */
.gf-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
  animation: gfFadeIn 0.3s ease;
}

.gf-chip {
  padding: 8px 16px;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--color-primary);
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.gf-chip:hover {
  background: var(--color-primary);
  color: #fff;
}

.gf-chip-secondary {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.gf-chip-secondary:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ── Result Cards ── */
.gf-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: gfFadeIn 0.3s ease;
}

.gf-result-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}

.gf-result-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.gf-result-img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg-warm);
}

.gf-result-img-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background: var(--color-bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.gf-result-info {
  flex: 1;
  min-width: 0;
}

.gf-result-name {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gf-result-price {
  font-size: 0.78em;
  color: var(--color-primary);
  font-weight: 700;
}

/* ── Action Links ── */
.gf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  animation: gfFadeIn 0.3s ease;
}

.gf-action-link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-align: center;
}

.gf-action-primary {
  background: var(--color-primary);
  color: #fff;
}

.gf-action-primary:hover {
  background: var(--color-primary-dark);
}

.gf-action-outline {
  background: #fff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.gf-action-outline:hover {
  background: var(--color-primary-light);
}

/* ── Animation ── */
@keyframes gfFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .gift-finder-fab {
    bottom: 20px;
    left: 20px;
    width: 58px;
    height: 58px;
  }

  .gift-finder-panel {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .gift-finder-bubble {
    bottom: 48px;
    left: 84px;
    max-width: 180px;
    font-size: 0.8em;
  }
}
