/* AI Navigation Bubble - iOS-style floating bubble above tab bar */

.ai-nav-bubble {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-nav-bubble.visible {
  opacity: 1;
  pointer-events: all;
}

.bubble-card {
  position: absolute;
  bottom: calc(var(--tab-height, 80px) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: min(90%, 400px);
  background: var(--modern-card-background);
  border-radius: 20px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none; /* Inherit from parent - only enable when visible */
}

.ai-nav-bubble.visible .bubble-card {
  transform: translateX(-50%) translateY(0);
  pointer-events: all; /* Enable pointer events only when bubble is visible */
}

/* Header */
.bubble-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.bubble-avatar {
  flex-shrink: 0;
}

.avatar-border-animated {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(
    135deg,
    #FF6F61,  /* Coral */
    #FFD700,  /* Gold */
    #50C878,  /* Emerald */
    #007AA5,  /* Cerulean */
    #007AFF,  /* Primary */
    #FF6F61   /* Coral repeat */
  );
  background-size: 200% 200%;
  animation: rotateGradient 3s linear infinite;
}

@keyframes rotateGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--modern-card-background);
}

.bubble-info {
  flex: 1;
}

.bubble-name {
  font-size: 17px; /* iOS body */
  font-weight: 600; /* iOS semibold */
  color: var(--brokerly-text-primary, #1C1C1E);
  margin-bottom: 2px;
}

.bubble-subtitle {
  font-size: 13px; /* iOS footnote */
  font-weight: 400; /* iOS regular */
  color: var(--brokerly-text-secondary, #8E8E93);
}

.bubble-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brokerly-secondary-background);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--brokerly-text-secondary, #8E8E93);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.bubble-close:hover {
  background: var(--brokerly-tertiary-background);
  transform: scale(1.1);
}

.bubble-close:active {
  transform: scale(0.95);
}

/* Message */
.bubble-message {
  font-size: 15px; /* iOS subheadline */
  font-weight: 400; /* iOS regular */
  line-height: 1.5;
  color: var(--brokerly-text-primary, #1C1C1E);
  margin-bottom: 16px;
}

/* Actions */
.bubble-actions {
  display: flex;
  gap: 8px;
}

.bubble-action-primary,
.bubble-action-secondary {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-size: 15px; /* iOS subheadline */
  font-weight: 600; /* iOS semibold */
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bubble-action-primary {
  background: linear-gradient(135deg, #FF8C61 0%, #FF6F61 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 111, 97, 0.3);
}

.bubble-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 111, 97, 0.4);
}

.bubble-action-primary:active {
  transform: translateY(0);
}

.bubble-action-secondary {
  background: var(--brokerly-secondary-background);
  color: var(--brokerly-primary, #007AFF);
  border: 1px solid var(--brokerly-border-medium);
}

.bubble-action-secondary:hover {
  background: var(--brokerly-tertiary-background);
  transform: translateY(-2px);
}

.bubble-action-secondary:active {
  transform: translateY(0);
}

.action-icon {
  font-size: 16px;
}

/* Dark mode support - now handled by CSS variables */

/* Mobile adjustments */
@media (max-width: 768px) {
  .bubble-card {
    width: calc(100% - 32px);
    margin: 0 16px;
    left: 0;
    right: 0;
    transform: translateY(20px);
  }

  .ai-nav-bubble.visible .bubble-card {
    transform: translateY(0);
  }
}


