@import "tailwindcss";

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

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-eb-garamond);
  --font-serif: var(--font-eb-garamond);
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-eb-garamond), 'EB Garamond', serif;
  overflow-x: hidden !important;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.font-serif {
  font-family: 'EB Garamond', serif;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Range slider styles */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-track {
  background: transparent;
}

input[type="range"]::-moz-range-track {
  background: transparent;
}

/* Checkbox styles */
input[type="checkbox"] {
  accent-color: #000;
}

input[type="checkbox"]:checked {
  background-color: #000;
  border-color: #000;
}

input[type="checkbox"]:checked::before {
  color: #fff;
}

/* Tiptap Editor Styles */
.ProseMirror {
  outline: none;
  min-height: 200px;
  padding: 1rem;
}

.ProseMirror p {
  margin: 0.5rem 0;
}

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

.ProseMirror h1 {
  font-size: 2rem;
  font-weight: bold;
  margin: 1rem 0;
}

.ProseMirror h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0.75rem 0;
}

.ProseMirror h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

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

.ProseMirror li {
  margin: 0.25rem 0;
}

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

.ProseMirror img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

/* Table Styles */
.ProseMirror table {
  border-collapse: collapse;
  margin: 1rem 0;
  table-layout: fixed;
  width: 100%;
  overflow: hidden;
}

.ProseMirror table td,
.ProseMirror table th {
  min-width: 1em;
  border: 1px solid #d1d5db;
  padding: 6px 8px;
  vertical-align: top;
  box-sizing: border-box;
  position: relative;
}

.ProseMirror table th {
  font-weight: bold;
  text-align: left;
  background-color: #f3f4f6;
}

.ProseMirror table .selectedCell:after {
  z-index: 2;
  position: absolute;
  content: "";
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(200, 200, 255, 0.4);
  pointer-events: none;
}

.ProseMirror table .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: -2px;
  width: 4px;
  background-color: #adf;
  pointer-events: none;
}

.ProseMirror table p {
  margin: 0;
}

/* Highlight/Background Color Styles */
.ProseMirror mark {
  background-color: #fef08a;
  border-radius: 0.25rem;
  padding: 0.125rem 0;
}

.ProseMirror mark[data-color] {
  background-color: var(--highlight-color);
}
