/**
 * ReviewsAI - Unified Styles
 * Single source of truth for all styling across the application
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ===================================================================
   CSS Variables - Design Tokens
   =================================================================== */
:root {
  /* Brand Colors */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #dbeafe;

  --color-secondary: #8b5cf6;
  --color-secondary-hover: #7c3aed;
  --color-secondary-light: #e9d5ff;

  --color-accent: #ec4899;
  --color-accent-hover: #db2777;

  /* Gradients */
  --gradient-primary: linear-gradient(to right, #2563eb, #8b5cf6);
  --gradient-secondary: linear-gradient(to right, #8b5cf6, #ec4899);
  --gradient-bg: linear-gradient(to bottom right, #eff6ff, #f3e8ff, #fce7f3);

  /* Typography */
  --font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --spacing-unit: 8px;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* ===================================================================
   Global Styles
   =================================================================== */
body {
  font-family: var(--font-family);
}

/* ===================================================================
   Logo Component (Unified across all pages)
   =================================================================== */
.logo-container {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.logo-icon {
  color: white;
  font-size: 1.25rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

/* ===================================================================
   Button Components
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: all 200ms ease-in-out;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* ===================================================================
   Card Components
   =================================================================== */
.card {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transition: box-shadow 200ms ease-in-out;
}

.card:hover {
  box-shadow: var(--shadow-xl);
}

/* ===================================================================
   Gradient Utilities
   =================================================================== */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-bg {
  background: var(--gradient-bg);
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-secondary {
  background: var(--gradient-secondary);
}

/* ===================================================================
   Animation Utilities
   =================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
  animation: slideUp 0.4s ease-out;
}

/* ===================================================================
   Stat Card (Used in dashboards)
   =================================================================== */
.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 200ms ease-in-out;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===================================================================
   Badge Components
   =================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-success {
  background: #d1fae5;
  color: #10b981;
}

.badge-warning {
  background: #fef3c7;
  color: #f59e0b;
}

.badge-error {
  background: #fee2e2;
  color: #ef4444;
}

/* ===================================================================
   Form Components
   =================================================================== */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: all 200ms ease-in-out;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* ===================================================================
   Responsive Utilities
   =================================================================== */
@media (max-width: 640px) {
  .logo-text {
    font-size: 1.125rem;
  }
}
