/* Custom CSS rules for GetPaperSolutions */

/* Premium typography details */
h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar Styles for elegant UI */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9; /* slate-100 */
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1; /* slate-300 */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; /* slate-400 */
}

/* Micro-animations and page transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Glassmorphism details */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .glass {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Custom PDF container borders and shadowing */
.pdf-canvas-container {
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
}

/* Button & interactive components micro-transitions */
button, a, input, select, textarea {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card hover focus highlights */
.hover-card-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
}

/* Loading skeleton waves */
@keyframes skeletonWave {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-pulse {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonWave 1.5s infinite ease-in-out;
}

/* Hide HTML5 search input clear button */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* Prevent PDF viewer from stretching layout and ensure fixed width bounds */
.pdf-viewport-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch; /* Smooth inertia scrolling on iOS */
}

.pdf-canvas {
  max-width: none !important;
  max-height: none !important;
}

.pdf-canvas-container, .popup-canvas-container {
  max-width: none !important;
  max-height: none !important;
  transition: transform 0.05s ease-out; /* Smooth responsive feedback during pinch-zoom gesture */
}

/* Styling inside WYSIWYG editor and solutions content views */
.question-editor h1, .answer-editor h1, .prose h1 {
  display: block !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  margin-top: 8px !important;
  margin-bottom: 4px !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
}
.question-editor h2, .answer-editor h2, .prose h2 {
  display: block !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-top: 8px !important;
  margin-bottom: 4px !important;
  line-height: 1.3 !important;
  color: #0f172a !important;
}
.question-editor h3, .answer-editor h3, .prose h3 {
  display: block !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin-top: 6px !important;
  margin-bottom: 4px !important;
  line-height: 1.35 !important;
  color: #0f172a !important;
}
.question-editor h4, .answer-editor h4, .prose h4 {
  display: block !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  margin-top: 6px !important;
  margin-bottom: 4px !important;
  line-height: 1.4 !important;
  color: #0f172a !important;
}

/* Make list marker bold when list content is bold */
.question-editor li:has(strong)::marker,
.question-editor li:has(b)::marker,
.question-editor li:has([style*="font-weight: bold"])::marker,
.question-editor li:has([style*="font-weight: 700"])::marker,
.answer-editor li:has(strong)::marker,
.answer-editor li:has(b)::marker,
.answer-editor li:has([style*="font-weight: bold"])::marker,
.answer-editor li:has([style*="font-weight: 700"])::marker,
.prose li:has(strong)::marker,
.prose li:has(b)::marker,
.prose li:has([style*="font-weight: bold"])::marker,
.prose li:has([style*="font-weight: 700"])::marker {
  font-weight: 700 !important;
}
.question-editor p, .answer-editor p, .prose p {
  margin-top: 0px !important;
  margin-bottom: 4px !important;
  line-height: 1.5 !important;
}
.question-editor li, .answer-editor li, .prose li {
  margin-top: 0px !important;
  margin-bottom: 4px !important;
}
.question-editor sub, .answer-editor sub, .prose sub {
  font-size: 75% !important;
  line-height: 0 !important;
  position: relative !important;
  vertical-align: baseline !important;
  bottom: -0.25em !important;
}
.question-editor sup, .answer-editor sup, .prose sup {
  font-size: 75% !important;
  line-height: 0 !important;
  position: relative !important;
  vertical-align: baseline !important;
  top: -0.5em !important;
}
.question-editor ul, .answer-editor ul, .prose ul {
  display: block !important;
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}
.question-editor ul ul, .answer-editor ul ul, .prose ul ul {
  list-style-type: circle !important;
}
.question-editor ul ul ul, .answer-editor ul ul ul, .prose ul ul ul {
  list-style-type: square !important;
}
.question-editor ol, .answer-editor ol, .prose ol {
  display: block !important;
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}

/* Remove default browser high-contrast outline focus rings across inputs, select menus, and buttons to prevent visual flashes */
input:focus, select:focus, textarea:focus, button:focus {
  outline: none !important;
}
