/**
 * JobsFlow Main Stylesheet
 * Phase 0 - Authentication & Landing Pages
 */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* Base styles and Tailwind setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f3f6f9;
}

::-webkit-scrollbar-thumb {
  background: #9fb1c7;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5b697a;
}

/* Thin scrollbar for sidebar navigation */
.custom-thin-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-thin-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-thin-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(159, 177, 199, 0.5);
  border-radius: 2px;
}

.custom-thin-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 105, 122, 0.7);
}

/* Firefox thin scrollbar */
.custom-thin-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 177, 199, 0.5) transparent;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Backdrop blur fallback for older browsers */
.backdrop-blur-glass {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Focus visible for better keyboard navigation */
*:focus-visible {
  outline: 2px solid #2B5F8F;
  outline-offset: 2px;
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes countUp {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.animate-slide-down {
  animation: slideDown 0.3s ease-out;
}

/* Password strength indicator */
.password-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: #e6edf5;
  overflow: hidden;
  transition: all 0.3s ease;
}

.password-strength-bar .fill {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-bar .fill.weak {
  width: 25%;
  background: #ef4444;
}

.password-strength-bar .fill.fair {
  width: 50%;
  background: #f59e0b;
}

.password-strength-bar .fill.good {
  width: 75%;
  background: #2B5F8F;
}

.password-strength-bar .fill.strong {
  width: 100%;
  background: #22c55e;
}

/* Loading spinner */
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
}

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

/* Custom gradient backgrounds - Updated with new logo colors */
.gradient-hero-primary {
  background: linear-gradient(135deg, #4DB8AC 0%, #2B5F8F 100%);
}

.gradient-hero-secondary {
  background: linear-gradient(135deg, #F89B4D 0%, #FDB856 100%);
}

.gradient-statistics {
  background: linear-gradient(135deg, #2B5F8F 0%, #1E4D7B 100%);
}

.gradient-footer {
  background: linear-gradient(180deg, #122134 0%, #0f172a 100%);
}

/* Hover transform for cards */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom utility classes for JobsFlow branding - Updated for new logo */
.text-accent {
  color: #2B5F8F; /* Navy blue from logo */
}

.bg-accent {
  background-color: #2B5F8F; /* Navy blue from logo */
}

.text-teal {
  color: #4DB8AC; /* Teal from logo */
}

.bg-teal {
  background-color: #4DB8AC; /* Teal from logo */
}

.text-orange {
  color: #F89B4D; /* Orange from logo */
}

.bg-orange {
  background-color: #F89B4D; /* Orange from logo */
}

.text-ink {
  color: #0f172a; /* secondary-900 */
}

.text-muted {
  color: #5b697a; /* secondary-500 */
}

.bg-bg {
  background-color: #f3f6f9; /* neutral-100 */
}

.border-line {
  border-color: #e6edf5; /* neutral-300 */
}

.bg-line {
  background-color: #e6edf5; /* neutral-300 */
}

/* Payment/Salary Color */
.text-payment {
  color: #71c6bd; /* Custom payment color - turquoise */
}

.bg-payment {
  background-color: #71c6bd; /* Custom payment color - turquoise */
}

.text-payment-light {
  color: #8dd4cc; /* Lighter shade for secondary payment text */
}

.bg-payment-light {
  background-color: #e6f7f5; /* Light background for payment info boxes */
}

.border-payment {
  border-color: #71c6bd; /* Payment border color */
}

.border-payment-light {
  border-color: #b3e0dc; /* Light payment border */
}

/* Hero gradient - Updated with new logo colors */
.hero-gradient {
  background: linear-gradient(135deg, #4DB8AC 0%, #2B5F8F 50%, #1E4D7B 100%);
}

/* Multi-color JobsFlow logo text - OFFICIAL BRAND COLORS */
.logo-jobsflow .jobs {
  color: #2b5f8f; /* Navy blue for "Jobs" */
}

.logo-jobsflow .flow-fl {
  color: #4db8ac; /* Teal for "Fl" */
}

.logo-jobsflow .flow-ow {
  color: #f89b4d; /* Orange for "ow" - CORRECTED TO BRAND COLOR */
}

/* Card styles */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button styles - Updated with new logo colors */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background-color: #2B5F8F;
  color: white;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #1E4D7B;
  transform: scale(1.05);
}

/* Max container width */
.max-w-container {
  max-width: 1280px;
}

/* Hide scrollbar for horizontal scroll */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* Gentle pulse animation for popular jobs button */
@keyframes gentlePulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.animate-gentle-pulse {
  animation: gentlePulse 2s ease-in-out infinite;
}

/* Sticky search bar slide-down animation */
.sticky-search-bar {
  position: fixed !important;
  top: 64px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 40 !important;
  transform: translateY(-100%) !important;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  opacity: 1 !important;
}

.sticky-search-bar.show {
  transform: translateY(0) !important;
}

/* ============================================================================
   CUSTOM MODAL SYSTEM
   ============================================================================ */

/* Modal Overlay */
.custom-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Container */
.custom-modal-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 90%;
  margin: 20px;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

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

/* Modal Header */
.custom-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.custom-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

/* Modal Body */
.custom-modal-body {
  padding: 20px 24px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Modal Icons */
.custom-modal-icon-success,
.custom-modal-icon-error,
.custom-modal-icon-warning {
  font-size: 48px;
  text-align: center;
  margin-bottom: 16px;
}

.custom-modal-icon-success {
  color: #10b981;
}

.custom-modal-icon-error {
  color: #ef4444;
}

.custom-modal-icon-warning {
  color: #f59e0b;
}

/* Modal Footer */
.custom-modal-footer {
  padding: 16px 24px;
  background: #f9fafb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
}

/* Modal Buttons */
.custom-modal-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.custom-modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-modal-btn:active {
  transform: translateY(0);
}

.custom-modal-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Primary Button (OK, Confirm) */
.custom-modal-btn-primary {
  background: #3b82f6;
  color: white;
}

.custom-modal-btn-primary:hover {
  background: #2563eb;
}

/* Secondary Button (Cancel) */
.custom-modal-btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.custom-modal-btn-secondary:hover {
  background: #d1d5db;
}

/* Success Button */
.custom-modal-btn-success {
  background: #10b981;
  color: white;
}

.custom-modal-btn-success:hover {
  background: #059669;
}

/* Danger Button */
.custom-modal-btn-danger {
  background: #ef4444;
  color: white;
}

.custom-modal-btn-danger:hover {
  background: #dc2626;
}

/* Warning Button */
.custom-modal-btn-warning {
  background: #f59e0b;
  color: white;
}

.custom-modal-btn-warning:hover {
  background: #d97706;
}

/* ============================================================================
   RICH TEXT CONTENT STYLING (TinyMCE output)
   ============================================================================ */

/* Base styles for rich text content areas */
.rich-text-content {
  color: #4b5563; /* gray-600 */
  font-size: 0.875rem; /* text-sm */
  line-height: 1.625; /* leading-relaxed */
}

/* Headings in rich text */
.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4 {
  font-weight: 600;
  color: #1f2937; /* gray-800 */
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.rich-text-content h1 { font-size: 1.5em; }
.rich-text-content h2 { font-size: 1.25em; }
.rich-text-content h3 { font-size: 1.125em; }
.rich-text-content h4 { font-size: 1em; }

/* Paragraphs */
.rich-text-content p {
  margin-bottom: 0.75em;
}

.rich-text-content p:last-child {
  margin-bottom: 0;
}

/* Unordered lists (bullet points) */
.rich-text-content ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.75em;
}

.rich-text-content ul ul {
  list-style-type: circle;
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

.rich-text-content ul ul ul {
  list-style-type: square;
}

/* Ordered lists */
.rich-text-content ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.75em;
}

.rich-text-content ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

/* List items */
.rich-text-content li {
  margin-bottom: 0.25em;
  padding-left: 0.25em;
}

.rich-text-content li:last-child {
  margin-bottom: 0;
}

/* Nested list items */
.rich-text-content li > ul,
.rich-text-content li > ol {
  margin-top: 0.25em;
}

/* Bold and italic */
.rich-text-content strong,
.rich-text-content b {
  font-weight: 600;
  color: #374151; /* gray-700 */
}

.rich-text-content em,
.rich-text-content i {
  font-style: italic;
}

/* Underline */
.rich-text-content u {
  text-decoration: underline;
}

/* Links */
.rich-text-content a {
  color: #2563eb; /* blue-600 */
  text-decoration: underline;
}

.rich-text-content a:hover {
  color: #1d4ed8; /* blue-700 */
}

/* Blockquotes */
.rich-text-content blockquote {
  border-left: 3px solid #d1d5db; /* gray-300 */
  padding-left: 1em;
  margin: 0.75em 0;
  color: #6b7280; /* gray-500 */
  font-style: italic;
}

/* Horizontal rule */
.rich-text-content hr {
  border: none;
  border-top: 1px solid #e5e7eb; /* gray-200 */
  margin: 1em 0;
}
