/*
 * Posty - Custom Styles
 * Modern, clean UI for Telegram post creation
 */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* Telegram preview scrollbar (dark) */
.bg-telegram-bg ::-webkit-scrollbar-thumb {
  background: #2d3a4a;
}

.bg-telegram-bg ::-webkit-scrollbar-thumb:hover {
  background: #3d4a5a;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background-color: #bae6fd;
  color: #0c4a6e;
}

/* Textarea auto-height transition */
textarea {
  transition: height 0.1s ease-out;
}

/* Global wait cursor during form submission */
body.cursor-wait,
body.cursor-wait * {
  cursor: wait !important;
}

/* Button disabled state */
button[disabled] {
  pointer-events: none;
}

/* Markdown Content Styling - Telegram-like */
.markdown-content {
  /* Telegram uses system fonts */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.markdown-content strong {
  font-weight: 600;
  color: inherit;
}

.markdown-content em {
  font-style: italic;
  color: inherit;
}

.markdown-content u {
  text-decoration: underline;
  color: inherit;
}

.markdown-content s,
.markdown-content del {
  text-decoration: line-through;
  color: inherit;
}

.markdown-content a {
  color: #0088cc; /* Telegram blue */
  text-decoration: none;
}

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

.markdown-content code {
  background-color: #f0f0f0;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
}

.markdown-content pre {
  background-color: #f0f0f0;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.markdown-content li {
  margin: 0.25rem 0;
}

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

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

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