/*
 * components.css - UI Components for ScanFood
 * FIT ANGELS Design System
 * Updated: 2025-10-03 19:45
 */

/* ========================================
   1. BUTTONS
   ======================================== */

.btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  min-height: 60px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--wellness-coral);
  color: white;
  box-shadow: 0 8px 32px rgba(255, 107, 71, 0.3);
}

.btn-primary:hover {
  background: rgba(255, 107, 71, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 107, 71, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--wellness-coral);
  border: 2px solid var(--wellness-coral);
}

.btn-secondary:hover {
  background: var(--wellness-coral);
  color: white;
}

.btn-sm {
  min-height: 54px;
  padding: 12px 24px;
  font-size: 0.875rem;
}

.btn-lg {
  min-height: 66px;
  padding: 20px 40px;
  font-size: 1.125rem;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   2. CARDS
   ======================================== */

.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(247, 191, 180, 0.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--wellness-text);
}

.card-body {
  color: var(--muted-foreground);
}

/* ========================================
   3. FORMS
   ======================================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--wellness-text);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: 'Manrope', sans-serif;
  background: white;
  transition: all 0.3s ease;
  min-height: 60px;
}

.form-input:focus {
  outline: none;
  border-color: var(--wellness-coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 71, 0.1);
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

.form-error {
  color: var(--destructive);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

.form-help {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ========================================
   4. BADGES
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ========================================
   5. TABLES
   ======================================== */

.table-container {
  overflow-x: auto;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--wellness-softPink);
}

.table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wellness-text);
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: var(--muted);
}

/* ========================================
   6. MODALS
   ======================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: white;
  border-radius: var(--radius-2xl);
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--wellness-text);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ========================================
   7. ALERTS
   ======================================== */

.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-left: 4px solid #16a34a;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

.alert-warning {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
  border-left: 4px solid #d97706;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border-left: 4px solid #2563eb;
}

/* ========================================
   8. LOADING SPINNER
   ======================================== */

.spinner {
  border: 4px solid var(--muted);
  border-top: 4px solid var(--wellness-coral);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

/* ========================================
   9. FOOTER
   ======================================== */

.footer {
  background: var(--wellness-text);
  color: var(--wellness-cream);
  padding: 3rem 1rem 2rem;
  margin-top: 4rem;
  border-top: 4px solid var(--wellness-coral);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

.footer-company {
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-company strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--wellness-coral);
}

.footer-company a {
  color: var(--wellness-coral);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-company a:hover {
  color: var(--wellness-blush);
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--wellness-cream);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--wellness-coral);
}

.footer-copyright {
  font-size: 0.875rem;
  opacity: 0.8;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 249, 246, 0.1);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    text-align: left;
  }
  
  .footer-links {
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-copyright {
    text-align: right;
    border-top: none;
    padding-top: 0;
  }
}

/* ========================================
   10. PRIVACY POLICY PAGE
   ======================================== */

.privacy-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.privacy-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.privacy-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--wellness-text);
  margin: 1rem 0 0.5rem;
}

.privacy-date {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--wellness-coral);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

.btn-back:hover {
  background: var(--wellness-softPink);
  transform: translateX(-4px);
}

.privacy-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--wellness-text);
}

.privacy-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--wellness-text);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--wellness-coral);
}

.privacy-content h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--wellness-text);
}

.privacy-content p {
  margin-bottom: 1.25rem;
}

.privacy-content ul,
.privacy-content ol {
  margin-bottom: 1.25rem;
  padding-left: 2rem;
}

.privacy-content li {
  margin-bottom: 0.75rem;
}

.privacy-content strong {
  color: var(--wellness-text);
  font-weight: 700;
}

.privacy-content a {
  color: var(--wellness-coral);
  text-decoration: none;
  border-bottom: 1px solid var(--wellness-coral);
  transition: all 0.3s ease;
}

.privacy-content a:hover {
  color: var(--wellness-text);
  border-bottom-color: var(--wellness-text);
}

.privacy-content blockquote {
  background: var(--wellness-softPink);
  border-left: 4px solid var(--wellness-coral);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius);
}

.privacy-content blockquote p:last-child {
  margin-bottom: 0;
}

.compliance-table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.compliance-table thead {
  background: var(--wellness-coral);
  color: white;
}

.compliance-table th,
.compliance-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compliance-table th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.compliance-table tbody tr:hover {
  background: var(--wellness-softPink);
}

.compliance-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 768px) {
  .privacy-header h1 {
    font-size: 2rem;
  }
  
  .privacy-content {
    font-size: 1rem;
  }
  
  .privacy-content h2 {
    font-size: 1.5rem;
  }
  
  .compliance-table {
    font-size: 0.875rem;
  }
  
  .compliance-table th,
  .compliance-table td {
    padding: 0.75rem 0.5rem;
  }
}
