/* Custom CSS for Digital Projects Marketplace - Light UI Theme */

:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --background: #F8FAFC;
  --cards: #FFFFFF;
  --text: #0F172A;
  --text-secondary: #64748B;
  --border: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

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

body {
  background-color: var(--background);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent iOS Safari from auto-zooming on input focus (requires >=16px) */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Touch-friendly smooth scrolling */
.touch-scroller {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Glassmorphism & backdrop blurs */
.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-modal {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Subtle card hover elevation */
.card-hover {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -8px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
}

/* Status badges */
.badge-available {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.badge-sold {
  background-color: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.badge-reserved {
  background-color: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

/* Inclusions check list */
.inclusion-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background-color: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pop-in {
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hide scrollbar for category tabs */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ================= RICH TEXT EDITOR & CONTENT VIEW TYPOGRAPHY ================= */
.rich-editor-body:empty:before {
  content: attr(placeholder);
  color: #94a3b8;
  pointer-events: none;
  display: block;
}

.rich-editor-body,
.rich-content-view {
  word-break: break-word;
}

.rich-editor-body p,
.rich-content-view p {
  margin-bottom: 0.65rem;
  line-height: 1.65;
}

.rich-editor-body p:last-child,
.rich-content-view p:last-child {
  margin-bottom: 0;
}

.rich-editor-body h2,
.rich-content-view h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #E2E8F0;
}

.rich-editor-body h3,
.rich-content-view h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1E293B;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.rich-editor-body h4,
.rich-content-view h4 {
  font-size: 0.925rem;
  font-weight: 600;
  color: #334155;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
}

.rich-editor-body ul,
.rich-content-view ul {
  list-style-type: disc;
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.rich-editor-body ol,
.rich-content-view ol {
  list-style-type: decimal;
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.rich-editor-body li,
.rich-content-view li {
  margin-bottom: 0.25rem;
  line-height: 1.55;
}

.rich-editor-body blockquote,
.rich-content-view blockquote {
  border-left: 3.5px solid #2563EB;
  background-color: #F8FAFC;
  padding: 0.6rem 1rem;
  margin: 0.75rem 0;
  color: #475569;
  font-style: italic;
  border-radius: 0 0.5rem 0.5rem 0;
}

.rich-editor-body hr,
.rich-content-view hr {
  border: 0;
  height: 1px;
  background-color: #E2E8F0;
  margin: 1.25rem 0;
}

.rich-editor-body a,
.rich-content-view a {
  color: #2563EB;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.rich-editor-body a:hover,
.rich-content-view a:hover {
  color: #1D4ED8;
}

.rich-editor-body img,
.rich-content-view img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #E2E8F0;
  display: block;
}

.rich-editor-body code,
.rich-content-view code {
  background-color: #F1F5F9;
  color: #0F172A;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Animated Ambient Glowing Shadow for Cards (No sharp border) */
.animated-glow-box {
  position: relative;
  border-radius: 1.5rem; /* 24px */
}

.animated-glow-box::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 2rem;
  background: linear-gradient(60deg, #2563eb, #60a5fa, #818cf8, #38bdf8, #2563eb);
  background-size: 300% 300%;
  animation: glow-aura-rotate 5s ease-in-out infinite;
  filter: blur(20px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.animated-glow-box:hover::before {
  opacity: 0.55;
  filter: blur(24px);
}

@keyframes glow-aura-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

