/* Custom styles — extends Tailwind CDN */

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* Login card shadow */
.login-card {
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* NocoDB iframe wrapper */
.iframe-wrapper {
  height: calc(100vh - 64px);
}

/* Modal panel slide transition */
#modal-panel {
  transition: transform 0.3s ease-in-out;
}

/* EasyMDE inside modal */
#rapport-editor-wrap .EasyMDEContainer {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

#rapport-editor-wrap .EasyMDEContainer .CodeMirror {
  border: none;
  border-radius: 0;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

#rapport-editor-wrap .editor-toolbar {
  border-bottom: 1px solid #e5e7eb;
  border-top: none;
  border-left: none;
  border-right: none;
  background: #f9fafb;
  border-radius: 0;
}

#rapport-editor-wrap .editor-toolbar button {
  color: #374151;
}

#rapport-editor-wrap .editor-toolbar button:hover,
#rapport-editor-wrap .editor-toolbar button.active {
  background: #e5e7eb;
  border-color: transparent;
}

#rapport-editor-wrap .editor-preview,
#rapport-editor-wrap .editor-preview-side {
  padding: 1rem;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  line-height: 1.7;
}

#rapport-editor-wrap .editor-preview h1,
#rapport-editor-wrap .editor-preview-side h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

#rapport-editor-wrap .editor-preview h2,
#rapport-editor-wrap .editor-preview-side h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

#rapport-editor-wrap .editor-preview h3,
#rapport-editor-wrap .editor-preview-side h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Markdown rendered content */
.markdown-content {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #374151;
}

.markdown-content h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.markdown-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.markdown-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.375rem;
  color: #374151;
}

.markdown-content p {
  margin-bottom: 0.75rem;
}

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

.markdown-content ul {
  list-style-type: disc;
}

.markdown-content ol {
  list-style-type: decimal;
}

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

.markdown-content li > ul,
.markdown-content li > ol {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.markdown-content code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  background-color: #e5e7eb;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #1f2937;
}

.markdown-content pre {
  background-color: #1f2937;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.markdown-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: 0.8125rem;
}

.markdown-content blockquote {
  border-left: 3px solid #d1d5db;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 0.75rem;
  color: #6b7280;
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.markdown-content th {
  background-color: #f3f4f6;
  font-weight: 600;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1rem 0;
}

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

.markdown-content a:hover {
  color: #1d4ed8;
}

.markdown-content img {
  max-width: 100%;
  border-radius: 0.375rem;
}

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

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