@import "tailwindcss";

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

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #ffffff;
    --foreground: #ededed;
  }
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sora), sans-serif;
}

@layer utilities {
  /* Hide arrows in number inputs */
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    @apply appearance-none;
    margin: 0;
  }

  input[type=number] {
    -moz-appearance: textfield;
  }
}

.ProseMirror {
  min-height: 200px;
  outline: none;
}
.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #9CA3AF;
  pointer-events: none;
  height: 0;
}
.ProseMirror h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.ProseMirror h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.ProseMirror h3 {
  font-size: 1.125rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.ProseMirror ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}
.ProseMirror ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
}
.ProseMirror a {
  color: #5E17EB;
  text-decoration: underline;
}
.ProseMirror .character-count {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Rich Text Content Display Styles */
.rich-text-content {
  font-size: 16px;
  color: #4B5563;
  line-height: 24px;
  max-width: none;
}

/* Headings */
.rich-text-content h1 {
  font-size: 24px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 16px;
  margin-top: 24px;
}

.rich-text-content h2 {
  font-size: 20px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 12px;
  margin-top: 20px;
}

.rich-text-content h3 {
  font-size: 18px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 8px;
  margin-top: 16px;
}

/* Paragraphs */
.rich-text-content p {
  margin-bottom: 16px;
  font-size: 16px;
  color: #4B5563;
  line-height: 24px;
}

/* .rich-text-content p strong {
  color: #000000;
  font-weight: bold;
} */

/* Text Formatting */
/* .rich-text-content strong {
  font-weight: bold;
  color: #000000;
} */

.rich-text-content em {
  font-style: italic;
}

.rich-text-content u {
  text-decoration: underline;
}

.rich-text-content s {
  text-decoration: line-through;
}

/* Links */
.rich-text-content a {
  color: #5E17EB;
  text-decoration: underline;
}

.rich-text-content a:hover {
  color: #4A0E99;
}

/* Unordered Lists */
.rich-text-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
  counter-reset: none;
}

.rich-text-content ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}

.rich-text-content ul li::before {
  content: '●';
  color: #4B5563;
  font-size: 16px;
  line-height: 24px;
  flex-shrink: 0;
}

/* Ordered Lists */
.rich-text-content ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
  counter-reset: list-counter;
}

.rich-text-content ol li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  counter-increment: list-counter;
  position: relative;
}

.rich-text-content ol li::before {
  content: counter(list-counter) '.';
  color: #4B5563;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  flex-shrink: 0;
}

/* Nested Lists */
.rich-text-content ul ul,
.rich-text-content ol ol,
.rich-text-content ul ol,
.rich-text-content ol ul {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 20px;
}

/* Remove margin from last paragraph in lists */
.rich-text-content li p:last-child {
  margin-bottom: 0;
}

/* Handle nested content in lists */
.rich-text-content li > p {
  margin-bottom: 8px;
}

.tiptap-editor-borderless .tiptap-editor-container {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.tiptap-editor-borderless .ProseMirror {
  border: none !important;
  outline: none !important;
  background: transparent !important;
}