/* Suggestions */
.suggestions-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 5px;
  overflow-x: hidden;
  overflow-y: auto;
}

.suggestion-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}

.suggestion-item:hover {
  background: #f8fafc;
  transform: translateX(5px);
}

.suggestion-item.active {
  background: var(--primary);
  color: white;
}

.drug-name {
  font-weight: 600;
  color: var(--dark);
}

.active-ingredient {
  font-size: 0.9rem;
  color: var(--secondary);
  font-style: italic;
}

.drug-name, .active-ingredient {
  word-break: break-word;
  white-space: normal;
}

.suggestion-item.active .drug-name,
.suggestion-item.active .active-ingredient {
  color: white;
}

/* Drug Card */
.drug-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.drug-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.drug-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1.5rem;
}

.drug-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.drug-subtitle {
  opacity: 0.9;
  font-size: 1rem;
}

.drug-body {
  padding: 1.5rem;
}

/* Info Grid */
.info-grid {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.info-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  margin-bottom: 0;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-row {
  display: flex;
  justify-content: column;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.25rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--dark);
  text-align: left;
  min-width: 250px;
}

.info-value {
  color: var(--secondary);
  text-align: left;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#drugNameInput::placeholder {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .info-label {
    min-width: auto;
  }

  .info-value {
    text-align: left;
  }

  .action-buttons {
    flex-direction: column;
  }

  .suggestions-container {
    position: fixed;
    top: auto;
    left: 20px;
    right: 20px;
    max-height: 200px;
  }
}

/* Print Styles */
@media print {
  .search-section,
  .action-buttons,
  .stats-bar {
    display: none !important;
  }
  .app-header {
    background: #2563eb !important;
    -webkit-print-color-adjust: exact;
  }
  body {
    background: white !important;
  }
  .app-container {
    box-shadow: none !important;
    margin: 0 !important;
  }
}
