/* RxGrab Chrome Extension - Popup Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  width: 350px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 14px;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

/* Container */
.popup-container {
  padding: 16px;
}

/* Header */
.popup-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.popup-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
}

/* Search */
.search-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

#drug-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

#drug-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

#drug-input::placeholder {
  color: #9ca3af;
}

#check-btn {
  width: 100%;
  padding: 10px 16px;
  background: #0f766e;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#check-btn:hover {
  background: #0d6d66;
}

#check-btn:active {
  background: #0a5f59;
}

/* Results */
.results-section {
  margin-bottom: 12px;
}

.results-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f9fafb;
  transition: background 0.1s ease;
}

.result-row:hover {
  background: #f0fdfa;
}

.result-row.cheapest {
  background: #f0fdfa;
  border: 1.5px solid #0f766e;
}

.result-row.cheapest .result-price {
  color: #0f766e;
  font-weight: 700;
}

.result-pharmacy {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.result-price {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.cheapest-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #0f766e;
  background: #ccfbf1;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.savings-note {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f0fdfa;
  border-radius: 6px;
  font-size: 12px;
  color: #0f766e;
  font-weight: 500;
  text-align: center;
}

.full-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  text-decoration: none;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.full-link:hover {
  background: #f0fdfa;
  text-decoration: underline;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 16px 8px;
  color: #6b7280;
  font-size: 13px;
}

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  color: #6b7280;
  font-size: 13px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error */
.error-state {
  text-align: center;
  padding: 16px 8px;
  color: #6b7280;
  font-size: 13px;
}

.error-state a {
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
}

.error-state a:hover {
  text-decoration: underline;
}

/* Footer */
.popup-footer {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 11px;
  color: #9ca3af;
}

.popup-footer a {
  color: #0f766e;
  text-decoration: none;
  font-weight: 500;
}

.popup-footer a:hover {
  text-decoration: underline;
}
