/* playit.gg documentation styles */

/* Cursor blink animation for terminal elements */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.cursor-blink::after {
  content: '_';
  animation: blink 1s infinite;
  color: currentColor;
}

/* Code block styling enhancements */
pre {
  position: relative;
  margin: 1.5rem 0 !important;
}

pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Scrollbar - navy theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 107, 53, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 53, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 53, 0.5);
}

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

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

/* ===== ARTICLE CONTENT SPACING ===== */

/* Base typography */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* Paragraphs */
.article-content p {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Headings */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  color: #1e293b;
}

.dark .article-content h1,
.dark .article-content h2,
.dark .article-content h3,
.dark .article-content h4 {
  color: #e2e8f0;
}

.article-content h1 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.article-content h2 {
  font-size: 1.625rem;
  margin-top: 2.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.35;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid rgba(255, 107, 53, 0.2);
}

.article-content h3 {
  font-size: 1.375rem;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.article-content h4 {
  font-size: 1.125rem;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  line-height: 1.45;
}

/* First element after heading shouldn't have top margin */
.article-content h1 + p,
.article-content h2 + p,
.article-content h3 + p,
.article-content h4 + p {
  margin-top: 0;
}

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 53, 0.2);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-height: 450px;
  width: auto;
  object-fit: contain;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

table th,
table td {
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 107, 53, 0.2);
  text-align: left;
}

table th {
  background-color: rgba(255, 107, 53, 0.1);
  font-weight: 600;
}

/* List styling */
.article-content ul {
  margin: 1.5rem 0;
  padding-left: 1.75rem;
  list-style-type: disc;
}

.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.75rem;
  list-style-type: decimal;
}

.article-content li {
  margin: 0.75rem 0;
  line-height: 1.7;
}

.article-content li p {
  margin: 0.5rem 0;
}

/* Nested lists */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
  margin: 0.5rem 0;
}

.article-content ul ul {
  list-style-type: circle;
}

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

/* Blockquote styling */
.article-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #ff6b35;
  background-color: rgba(255, 107, 53, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: normal;
}

.article-content blockquote p {
  margin: 0.5rem 0;
}

.article-content blockquote p:first-child {
  margin-top: 0;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid rgba(255, 107, 53, 0.2);
  margin: 3rem 0;
}

/* Inline code */
.article-content code:not(pre code) {
  padding: 0.2rem 0.5rem;
  font-size: 0.875em;
  border-radius: 4px;
  background-color: #f1f5f9;
  color: #e85d2c;
  font-family: 'JetBrains Mono', monospace;
}

.dark .article-content code:not(pre code) {
  background-color: #161b22;
  color: #ff6b35;
}

/* Code blocks */
.article-content pre {
  background-color: #f1f5f9;
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 8px;
  margin: 1.75rem 0;
}

.dark .article-content pre {
  background-color: #0d1117;
  border-color: rgba(255, 107, 53, 0.1);
}

/* Strong/bold text */
.article-content strong {
  font-weight: 600;
  color: #1e293b;
}

.dark .article-content strong {
  color: #e2e8f0;
}

/* Links */
.article-content a {
  color: #e85d2c;
  text-decoration: none;
}

.dark .article-content a {
  color: #ff6b35;
}

.article-content a:hover {
  text-decoration: underline;
}

/* Ensure images in paragraphs get proper spacing */
.article-content p img {
  display: block;
  margin: 1.5rem auto;
}