/* ============================================
   Testimonial Tool - Shared Styles
   Brand: Growth In Reverse
   ============================================ */

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

:root {
  --orange: #ef5028;
  --orange-hover: #d94520;
  --orange-light: #fef0ec;
  --navy: #15202b;
  --navy-light: #1e2d3d;
  --navy-muted: #2a3a4a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green: #10b981;
  --green-light: #ecfdf5;
  --red: #ef4444;
  --red-light: #fef2f2;
  --yellow: #f59e0b;
  --yellow-light: #fffbeb;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --transition: 150ms ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-danger {
  background: var(--red-light);
  color: var(--red);
}
.btn-danger:hover { background: #fee2e2; }

.btn-success {
  background: var(--green-light);
  color: var(--green);
}
.btn-success:hover { background: #d1fae5; }

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

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

/* ---- Form Elements ---- */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-label .optional {
  font-weight: 400;
  color: var(--gray-400);
  font-size: 0.8rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--gray-800);
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(239, 80, 40, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

/* ---- Cards ---- */

.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow var(--transition);
}

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

/* ---- Badges ---- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.01em;
}

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

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

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

.badge-text {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-video {
  background: #ede9fe;
  color: #7c3aed;
}

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

/* ---- Star Rating ---- */

.star-rating {
  display: flex;
  gap: 4px;
}

.star-rating .star {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--gray-300);
  transition: color var(--transition);
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.star-rating .star.active,
.star-rating .star:hover {
  color: var(--yellow);
}

.star-rating.readonly .star {
  cursor: default;
  font-size: 1rem;
}

/* ---- Toast Notifications ---- */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
  max-width: 400px;
}

.toast.toast-error {
  background: var(--red);
}

.toast.toast-success {
  background: var(--green);
}

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

/* ---- Modal ---- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.2s ease;
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ---- Empty State ---- */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-500);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ---- Loading Spinner ---- */

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
}

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

/* ---- Utility ---- */

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

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.hidden { display: none !important; }

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hide-mobile { display: none; }
}

@media (max-width: 480px) {
  .btn { padding: 10px 16px; font-size: 0.85rem; }
  .card { padding: 16px; }
  .modal { margin: 12px; }
}
