/* Custom scrollbars and styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Smooth transitions */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* Rendered HTML Styling inside modal */
.html-render-box {
  line-height: 1.6;
}

.html-render-box h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
  color: #0f172a;
}

.html-render-box h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.65rem 0 0.4rem;
  color: #1e293b;
}

.html-render-box h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.5rem 0 0.3rem;
  color: #334155;
}

.html-render-box h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.4rem 0 0.25rem;
  color: #334155;
}

.html-render-box p {
  margin-bottom: 0.6rem;
  color: #334155;
}

.html-render-box ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
}

.html-render-box ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
}

.html-render-box li {
  margin-bottom: 0.25rem;
}

.html-render-box strong, .html-render-box b {
  font-weight: 600;
  color: #0f172a;
}

.html-render-box a {
  color: #4f46e5;
  text-decoration: underline;
}

.html-render-box blockquote {
  border-left: 4px solid #6366f1;
  background-color: #f1f5f9;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  margin: 0.75rem 0;
  color: #334155;
}

.html-render-box blockquote p {
  margin-bottom: 0;
  font-size: 0.78rem;
  color: #334155;
}

.html-render-box table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
}

.html-render-box th, .html-render-box td {
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.6rem;
}

.html-render-box th {
  background-color: #f8fafc;
  font-weight: 600;
}

/* Status Badge & Table styling */
.status-badge {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  word-break: keep-all !important;
}

.status-cell {
  white-space: nowrap !important;
  min-width: 160px !important;
  width: 160px !important;
  text-align: center;
}

/* Smooth Top-Down Modal Transitions */
.modal-overlay {
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
}

.modal-content-slide {
  transform: translateY(-45px) scale(0.96);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.modal-overlay.active .modal-content-slide {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Calligraphy Brand Typography (Nét Bút Thư Pháp) */
.font-brand {
  font-family: 'Kaushan Script', 'Dancing Script', cursive;
  letter-spacing: 0.02em;
  padding-right: 0.15em;
}
