@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --background: #ffffff;
  --foreground: #171717;
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

/* React Tiny Link styles */
.rtl-card-container {
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
  transition: border-color 0.2s ease !important;
  margin: 0.75rem 0 !important;
  max-width: 100% !important;
}

.rtl-card-container:hover {
  border-color: #d1d5db !important;
}

.rtl-card-media {
  height: 120px !important;
  background-size: cover !important;
  background-position: center !important;
}

.rtl-card-content {
  padding: 0.75rem !important;
  background: #f9fafb !important;
}

.rtl-card-description {
  font-size: 0.875rem !important;
  color: #4b5563 !important;
  line-height: 1.25rem !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.rtl-card-title {
  font-size: 1rem !important;
  color: #111827 !important;
  font-weight: 500 !important;
  margin-bottom: 0.25rem !important;
  line-height: 1.5rem !important;
}

/* TipTap Editor Styles */
.ProseMirror {
  min-height: calc(100vh - 200px);
  padding: 1rem;
}

.ProseMirror:focus {
  outline: none;
}

.ProseMirror > * + * {
  margin-top: 0.75em;
}

.ProseMirror p.is-editor-empty:first-child::before {
  color: #adb5bd;
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

/* Image styles */
.ProseMirror img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ProseMirror img:hover {
  transform: scale(1.01);
}

/* Heading styles */
.ProseMirror h1 {
  font-size: 2em;
  font-weight: bold;
  margin-top: 0.5em;
  color: #111827;
}

.ProseMirror h2 {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 0.83em;
  color: #1f2937;
}

.ProseMirror h3 {
  font-size: 1.17em;
  font-weight: bold;
  margin-top: 1em;
  color: #374151;
}

/* List styles */
.ProseMirror ul {
  list-style-type: disc;
  padding-left: 1.5em;
  color: #374151;
}

.ProseMirror ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  color: #374151;
}

/* Code block styles */
.ProseMirror pre {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0.75em 1em;
  margin: 0.5em 0;
  font-family: "Courier New", Courier, monospace;
  color: #374151;
}

/* Blockquote styles */
.ProseMirror blockquote {
  border-left: 3px solid #e5e7eb;
  padding-left: 1em;
  margin-left: 0;
  font-style: italic;
  color: #4b5563;
}

/* Horizontal rule styles */
.ProseMirror hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2em 0;
}
