/**
 * Predictive Text Auto-Complete Styling
 */

.predictive-dropdown {
  position: absolute;
  background: white;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.predictive-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.15s ease;
}

.predictive-item:last-child {
  border-bottom: none;
}

.predictive-item:hover,
.predictive-item.selected {
  background-color: #eff6ff;
}

.predictive-item.selected {
  border-left: 4px solid #3b82f6;
  padding-left: 12px;
}

.predictive-key {
  color: #1e40af;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.predictive-key strong {
  background-color: #fef3c7;
  color: #92400e;
  padding: 1px 2px;
  border-radius: 2px;
}

.predictive-preview {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Scrollbar styling */
.predictive-dropdown::-webkit-scrollbar {
  width: 8px;
}

.predictive-dropdown::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.predictive-dropdown::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 4px;
}

.predictive-dropdown::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .predictive-dropdown {
    max-height: 250px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .predictive-item {
    padding: 14px 12px;
  }
  
  .predictive-key {
    font-size: 15px;
  }
  
  .predictive-preview {
    font-size: 13px;
  }
}

/* Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.predictive-dropdown {
  animation: slideIn 0.2s ease;
}

/* Help text for users */
.predictive-help {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 500;
}

/* Badge for new feature */
.predictive-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #10b981;
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
