/* ─── Blog article typography ──────────────────────────────────────────── */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #2C3947; /* ink-700 */
  overflow-wrap: break-word;
}
.article-content h1,.article-content h2,.article-content h3,
.article-content h4,.article-content h5,.article-content h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.5em;
  color: #0E1621; /* ink-900 */
}
.article-content h1 { font-size: 1.75rem; }
.article-content h2 { font-size: 1.375rem; border-bottom: 1px solid #EAEEF2; padding-bottom: 0.4em; }
.article-content h3 { font-size: 1.125rem; }
.article-content h4 { font-size: 1rem; }

.article-content p { margin-top: 0; margin-bottom: 1.2em; }
.article-content p:last-child { margin-bottom: 0; }

.article-content a {
  color: #1B4C9B; /* brand-600 */
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-content a:hover { color: #0B2545; }

.article-content strong, .article-content b { font-weight: 600; }
.article-content em, .article-content i { font-style: italic; }
.article-content u { text-decoration: underline; text-underline-offset: 3px; }

.article-content ul, .article-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}
.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content li { margin-bottom: 0.4em; }
.article-content li > ul, .article-content li > ol { margin-top: 0.4em; margin-bottom: 0; }

.article-content blockquote {
  border-left: 4px solid #C4D5E9; /* brand-200 */
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  background: #F2F6FB; /* brand-50 */
  border-radius: 0 0.5em 0.5em 0;
  color: #42505E; /* ink-600 */
  font-style: italic;
}

.article-content pre {
  background: #1A2530; /* ink-800 */
  color: #EAEEF2;
  padding: 1em 1.25em;
  border-radius: 0.5em;
  overflow-x: auto;
  font-size: 0.875em;
  margin-bottom: 1.2em;
}
.article-content code {
  background: #EAEEF2;
  color: #2C3947;
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-size: 0.875em;
}
.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5em;
  margin: 1.5em 0;
  display: block;
}
.article-content figure { margin: 1.5em 0; }
.article-content figcaption {
  text-align: center;
  font-size: 0.875em;
  color: #7C8894; /* ink-400 */
  margin-top: 0.5em;
}

.article-content hr {
  border: none;
  border-top: 1px solid #EAEEF2;
  margin: 2em 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2em;
  font-size: 0.9375em;
  overflow-x: auto;
  display: block;
}
.article-content th, .article-content td {
  border: 1px solid #D8DEE5;
  padding: 0.5em 0.75em;
  text-align: left;
}
.article-content th { background: #F6F8FA; font-weight: 600; }
.article-content tr:nth-child(even) td { background: #F6F8FA; }

/* ─── Admin form inputs ─────────────────────────────────────────────────── */
.admin-input {
  appearance: none;
  border: 1px solid #D8DEE5; /* ink-200 */
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #0E1621;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-input:focus {
  border-color: #1B4C9B;
  box-shadow: 0 0 0 3px rgba(27,76,155,0.12);
}
.admin-input::placeholder { color: #AEB8C2; }

textarea.admin-input { line-height: 1.6; }

select.admin-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A6875' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}

/* ─── Admin table ──────────────────────────────────────────────────────── */
.admin-table { border-collapse: collapse; }
.admin-table th, .admin-table td { vertical-align: middle; }

/* ─── Tailwind utilities not in SPA build ──────────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aspect-\[16\/9\] { aspect-ratio: 16/9; }

/* ─── Green (not in SPA build) for admin status badges ─────────────────── */
.bg-green-50  { background-color: #f0fdf4; }
.bg-green-100 { background-color: #dcfce7; }
.border-green-200 { border-color: #bbf7d0; }
.text-green-700   { color: #15803d; }

/* ─── Missing Tailwind utilities (not generated by React SPA build) ────── */

/* Responsive table columns (admin posts list) */
@media (max-width: 639px)  { .sm\:table-cell { display: none; } }
@media (min-width: 640px)  { .sm\:table-cell { display: table-cell; } .sm\:hidden { display: none; } }
@media (max-width: 767px)  { .md\:table-cell { display: none; } }
@media (min-width: 768px)  { .md\:table-cell { display: table-cell; } .md\:hidden { display: none; } }
@media (min-width: 1024px) { .lg\:grid-cols-\[1fr_320px\] { grid-template-columns: 1fr 320px; } }
@media (min-width: 768px)  { .md\:py-12 { padding-top: 3rem; padding-bottom: 3rem; } }

/* Max-width for article content column */
.max-w-\[52rem\]  { max-width: 52rem; }

/* Padding utilities */
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.px-4  { padding-left: 1rem; padding-right: 1rem; }

/* Line clamp */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Shadow */
.hover\:shadow-lift:hover { box-shadow: 0 4px 16px 0 rgba(0,0,0,0.12); }

/* Text sizes */
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-\[0\.8125rem\] { font-size: 0.8125rem; }

/* Group hover utilities */
.group:hover .group-hover\:opacity-100 { opacity: 1; }
.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }

/* ─── Quill editor customization ───────────────────────────────────────── */
#quill-editor {
  border: 1px solid #D8DEE5;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}
#quill-toolbar {
  border: 1px solid #D8DEE5;
  border-radius: 0.5rem 0.5rem 0 0;
  background: #F6F8FA;
}
.ql-toolbar .ql-formats { margin-right: 10px; }
#image-upload-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 3px 5px;
  display: inline-flex;
  align-items: center;
}
#image-upload-btn:hover { background: #EAEEF2; border-radius: 3px; }

/* ─── Zalo floating button (SSR pages) ───────────────────────────────── */
.zalo-float {
  position: fixed;
  z-index: 40;
  right: 1rem;
  bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: #2563EB;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: background 0.15s;
}
.zalo-float:hover { background: #1D4ED8; }
@media (min-width: 1024px) {
  .zalo-float { bottom: 2rem; }
}
