/*
 * Lexxy content display styles for ActionText
 * Lexxy provides its own editor styles via stylesheet_link_tag "lexxy"
 */

.lexxy-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.lexxy-content * {
  box-sizing: border-box;
}

.lexxy-content h1,
.lexxy-content h2,
.lexxy-content h3 {
  font-weight: bold;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.lexxy-content p {
  margin-bottom: 1em;
}

.lexxy-content blockquote {
  border-left: 0.3em solid #ccc;
  margin-left: 0.3em;
  padding-left: 0.6em;
}

@media (prefers-color-scheme: dark) {
  .lexxy-content blockquote {
    border-color: #6b7280;
  }
}

.lexxy-content ul,
.lexxy-content ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.lexxy-content li {
  margin-bottom: 0.25em;
}

.lexxy-content pre {
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  background-color: #f3f4f6;
  border-radius: 0.25em;
  overflow-x: auto;
}

@media (prefers-color-scheme: dark) {
  .lexxy-content pre {
    background-color: #374151;
    color: #e5e7eb;
  }
}

.lexxy-content code {
  font-family: monospace;
  font-size: 0.9em;
  background-color: #f3f4f6;
  padding: 0.1em 0.3em;
  border-radius: 0.25em;
}

@media (prefers-color-scheme: dark) {
  .lexxy-content code {
    background-color: #374151;
    color: #e5e7eb;
  }
}

.lexxy-content pre code {
  background: none;
  padding: 0;
}

.lexxy-content img {
  width: 100%;
  height: auto;
  inline-size: 100%;
  max-block-size: none;
}

.lexxy-content a {
  color: #2563eb;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .lexxy-content a {
    color: #60a5fa;
  }
}

/* ActionText attachment styles */
.lexxy-content .attachment {
  display: block;
  position: relative;
  width: 100%;
}

.lexxy-content .attachment img {
  width: 100%;
  height: auto;
}

.lexxy-content .attachment__caption {
  text-align: center;
}

.lexxy-content .attachment--preview {
  width: 100%;
  text-align: center;
}

.lexxy-content .attachment--file {
  margin: 0.5em 0;
  padding: 0.5em 1em;
  border: 1px solid #d1d5db;
  border-radius: 0.25em;
}

@media (prefers-color-scheme: dark) {
  .lexxy-content .attachment--file {
    border-color: #6b7280;
  }
}
