/* ==========================================================================
   Bổ sung riêng cho WordPress (không thay đổi visual của HTML View):
   class lõi WP, nội dung soạn thảo, admin bar, icon mạng xã hội footer.
   ========================================================================== */

/* Class trợ năng của WordPress */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed !important; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
  padding: 10px 16px; border-radius: var(--radius-sm); background: var(--color-primary); color: var(--color-dark);
}

/* Admin bar: header sticky không bị che (chỉ khi đăng nhập) */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Nội dung soạn thảo (Classic Editor / TinyMCE) trong .prose */
.prose img { height: auto; }
.prose .alignleft { float: left; margin: 0.3em 1.4em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: 0.3em 0 1em 1.4em; max-width: 50%; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose .wp-caption { max-width: 100%; }
.prose .wp-caption img { border-radius: var(--radius-md); width: 100%; }
.prose .wp-caption-text { margin-top: 8px; font-size: var(--text-small); color: var(--color-muted); text-align: center; }
.prose ol { padding-left: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--color-surface-alt); color: var(--color-heading); }
.prose iframe, .prose video { max-width: 100%; border: 0; border-radius: var(--radius-md); }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.prose .gallery-item { margin: 0; }
.prose .gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.prose::after { content: ""; display: table; clear: both; }
@media (max-width: 599px) {
  .prose .alignleft, .prose .alignright { float: none; max-width: 100%; margin: 1em 0; }
}

/* Trạng thái rỗng */
.empty-state .prose > * + * { margin-top: 1em; }

/* Form tìm kiếm trong trang 404 */
.entry .search-form--main { margin-top: 1.2em; }
.entry .prose .btn { margin: 4px 10px 4px 0; text-decoration: none; }

/* Icon mạng xã hội ở footer (chỉ xuất hiện khi đã nhập liên kết) */
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18); color: var(--color-on-dark);
}
.footer-social a:hover { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-dark); }
.footer-social .icon { width: 18px; height: 18px; }
