/* ==========================================================================
   Blog Section Styles - Modern, Unified & Responsive
   ========================================================================== */

/* Page container & header */
.blog-page {
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.blog-header {
  margin-bottom: 2rem;
}

.blog-title {
  font-size: 2.25rem;
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: #111;
}

.blog-intro {
  margin: 0 0 1.5rem;
  color: #555;
  line-height: 1.8;
}

/* Toolbar: Search & Filter Pills */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
  margin: 1.5rem auto 2rem;
}

.blog-search {
  flex: 1 1 15rem;
}

.blog-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.95rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-search input:focus {
  outline: none;
  border-color: #131a2d;
  box-shadow: 0 0 0 3px rgba(19, 26, 45, 0.12);
}

.blog-filters,
.blog-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-filter,
.blog-tag-filter {
  appearance: none;
  border: 1px solid #dcdfe4;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.blog-filter:hover,
.blog-tag-filter:hover {
  background: #f3f4f6;
  border-color: #cbd5e1;
}

.blog-filter.is-active,
.blog-tag-filter.is-active {
  background: #131a2d;
  border-color: #131a2d;
  color: #fff;
}

/* Cards Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.blog-card.is-hidden {
  display: none !important;
}

.blog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

/* Type Badges */
.blog-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  background: #f1f3f6;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.blog-badge--lab {
  background: #e6f7f8;
  color: #08636b;
  border-color: #c2ecee;
}

.blog-badge--whiteboard {
  background: #f1edfb;
  color: #492e7c;
  border-color: #ded5f7;
}

.blog-badge--podcast {
  background: #fdf0f0;
  color: #8e2020;
  border-color: #fad2d2;
}

.blog-badge--article {
  background: #f1f3f6;
  color: #334155;
  border-color: #e2e8f0;
}

.blog-card-date {
  font-size: 0.8rem;
  color: #6b7280;
}

.blog-card-title {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: 700;
}

.blog-card-title a {
  text-decoration: none;
  color: #111827;
  transition: color 0.15s ease;
}

.blog-card-title a:hover {
  color: #1f5fbf;
}

.blog-card-excerpt {
  margin: 0 0 1.25rem;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.65;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.blog-mini-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  border-radius: 4px;
  background: #f3f4f6;
  color: #4b5563;
}

.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #131a2d;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.blog-card-cta:hover {
  color: #1f5fbf;
}

.blog-card-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

.blog-card:hover .blog-card-arrow {
  transform: translateX(-3px);
}

[dir="ltr"] .blog-card:hover .blog-card-arrow {
  transform: translateX(3px);
}

.blog-empty-filter,
.blog-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 1.05rem;
}

/* ==========================================================================
   Single Post Styles
   ========================================================================== */

.blog-single {
  max-width: 50rem;
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.blog-single-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.blog-kicker {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.blog-kicker a {
  color: inherit;
  text-decoration: none;
}

.blog-kicker a:hover {
  color: #111;
  text-decoration: underline;
}

.blog-single-title {
  margin: 0.5rem 0 1rem;
  font-size: 2.3rem;
  line-height: 1.25;
  font-weight: 700;
  color: #111827;
}

.blog-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.88rem;
}

.blog-single-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.blog-single-content {
  font-size: 1.125rem;
  line-height: 1.9;
  color: #27272a;
}

.blog-single-content p {
  margin: 1.25em 0;
}

.blog-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem auto;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Call to Action Button shortcode */
.blog-action-wrapper {
  margin: 2.25rem 0;
  text-align: start;
}

.blog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-btn--primary {
  background: #131a2d;
  color: #fcfcfd !important;
  border: 1px solid #131a2d;
  box-shadow: 0 2px 8px rgba(19, 26, 45, 0.15);
}

.blog-btn--primary:hover,
.blog-btn--primary:focus {
  background: #1e293b;
  border-color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(19, 26, 45, 0.25);
  color: #ffffff !important;
}

.blog-btn--outline {
  background: transparent;
  color: #131a2d;
  border: 1.5px solid #131a2d;
}

.blog-btn--outline:hover {
  background: #f8fafc;
  color: #131a2d;
}

/* Audio Player Shortcode */
.blog-audio-card {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.blog-audio-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1rem;
  color: #1e293b;
  margin-bottom: 1rem;
}

.blog-audio-icon {
  color: #8e2020;
}

.blog-audio-element {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  outline: none;
}

.blog-audio-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.blog-audio-download {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.blog-audio-download:hover {
  color: #0f172a;
  text-decoration: underline;
}

/* Related Posts */
.blog-related {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.blog-related-card {
  display: block;
  padding: 1rem 1.15rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.blog-related-card:hover {
  background: #f3f4f6;
  border-color: #cbd5e1;
}

.blog-related-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 0.35rem;
}

.blog-related-date {
  font-size: 0.78rem;
  color: #6b7280;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-single-title {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   Blog Comments & Reactions (Cloudflare KV Persisted - Premium UI)
   ========================================================================== */

.blog-comments-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
}

.blog-comments-header {
  margin-bottom: 2rem;
}

.blog-comments-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blog-comments-heading {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
}

.blog-admin-toggle-btn {
  appearance: none;
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0.55;
  margin-bottom: 0.4rem;
}

.blog-admin-toggle-btn:hover {
  opacity: 1;
  color: #0f172a;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.blog-admin-toggle-btn.is-active {
  opacity: 1;
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.blog-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.blog-admin-bar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.blog-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.blog-admin-post-metric {
  font-size: 0.84rem;
  color: #475569;
  font-weight: 500;
}

.blog-admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-admin-action-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.blog-admin-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.blog-admin-action-btn--logout {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

.blog-admin-action-btn--logout:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.blog-comments-subtext {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.6;
}

/* 1-click Quick Reactions Bar */
.blog-reactions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.blog-reaction-btn {
  appearance: none;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-reaction-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.blog-reaction-btn:active {
  transform: translateY(0);
}

.blog-reaction-btn.is-selected {
  background: #131a2d;
  border-color: #131a2d;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(19, 26, 45, 0.25);
}

.blog-reaction-emoji {
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.blog-reaction-btn:hover .blog-reaction-emoji {
  transform: scale(1.15);
}

.blog-reaction-label {
  font-size: 0.88rem;
}

.blog-reaction-count {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
  padding-inline-start: 0.2rem;
}

.blog-reaction-btn.is-selected .blog-reaction-count {
  opacity: 1;
  color: #94a3b8;
}

/* Comment Form Card */
.blog-comment-form-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 2.75rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-comment-form-card:focus-within {
  border-color: #cbd5e1;
  box-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.06);
}

.blog-comment-row {
  margin-bottom: 1.1rem;
}

.blog-comment-field-label {
  display: block;
}

.blog-field-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}

.blog-comment-input,
.blog-comment-textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.15s ease;
}

.blog-comment-input::placeholder,
.blog-comment-textarea::placeholder {
  color: #94a3b8;
}

.blog-comment-input:focus,
.blog-comment-textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: #1f5fbf;
  box-shadow: 0 0 0 3px rgba(31, 95, 191, 0.12);
}

.blog-comment-textarea {
  min-height: 105px;
  resize: vertical;
  line-height: 1.65;
}

.blog-comment-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.blog-comment-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  background: #131a2d;
  color: #fcfcfd !important;
  border: 1px solid #131a2d;
  box-shadow: 0 2px 8px rgba(19, 26, 45, 0.18);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  margin-inline-start: auto;
}

.blog-comment-submit-btn:hover:not(:disabled) {
  background: #1e293b;
  border-color: #1e293b;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(19, 26, 45, 0.28);
}

.blog-comment-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.blog-send-icon {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease;
}

[dir="rtl"] .blog-send-icon {
  transform: scaleX(-1);
}

.blog-comment-submit-btn:hover:not(:disabled) .blog-send-icon {
  transform: translate(-2px, -2px);
}

[dir="rtl"] .blog-comment-submit-btn:hover:not(:disabled) .blog-send-icon {
  transform: scaleX(-1) translate(2px, -2px);
}

.blog-comment-status {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  animation: blog-fade-in 0.2s ease;
}

.blog-comment-status.is-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.blog-comment-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@keyframes blog-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Comments Stream List */
.blog-comments-stream {
  margin-top: 2.25rem;
}

.blog-comments-stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.blog-comments-count-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.blog-comments-badge {
  background: #131a2d;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* Hide any element with [hidden] regardless of display property */
[data-blog-comments] [hidden],
.blog-comments-loading[hidden],
.blog-comments-empty[hidden] {
  display: none !important;
}

.blog-comments-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  color: #64748b;
  font-size: 0.92rem;
}

.blog-comment-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2.5px solid #e2e8f0;
  border-top-color: #131a2d;
  border-radius: 50%;
  animation: blog-spin 0.65s linear infinite;
}

@keyframes blog-spin {
  to { transform: rotate(360deg); }
}

.blog-comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 3rem 1.5rem;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

.blog-comments-empty svg {
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.blog-comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Single Comment Card */
.blog-comment-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-comment-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.blog-comment-card-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
}

.blog-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  user-select: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.blog-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
}

.blog-comment-author {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  line-height: 1.3;
}

.blog-comment-date {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.blog-comment-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.blog-comment-delete-btn {
  appearance: none;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.blog-comment-delete-btn:hover {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
  transform: scale(1.02);
}

.blog-comment-body {
  margin-top: 0.85rem;
  padding-inline-start: calc(40px + 0.9rem);
  font-size: 0.96rem;
  line-height: 1.8;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 640px) {
  .blog-comment-body {
    padding-inline-start: 0;
  }
}

/* Admin Modals */
.blog-admin-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1rem;
  box-sizing: border-box;
}

.blog-admin-modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  animation: blog-card-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-admin-modal-card--lg {
  max-width: 680px;
}

@keyframes blog-card-pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.blog-admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.blog-admin-modal-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  color: #0f172a;
}

.blog-admin-modal-close {
  appearance: none;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.blog-admin-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.blog-admin-modal-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.blog-admin-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.84rem;
}

.blog-admin-modal-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.blog-admin-btn-secondary {
  appearance: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.blog-admin-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.blog-admin-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.blog-admin-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.blog-admin-stat-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.blog-admin-stat-label {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}

.blog-admin-stat-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.blog-admin-subheading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1.25rem 0 0.5rem;
}

.blog-admin-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.blog-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: start;
}

.blog-admin-table th,
.blog-admin-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.blog-admin-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.blog-admin-table-link {
  color: #1d4ed8;
  text-decoration: none;
  font-family: monospace;
  font-size: 0.8rem;
}

.blog-admin-table-link:hover {
  text-decoration: underline;
}

.blog-admin-btn-sm {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  border-radius: 6px;
  text-decoration: none;
}

.blog-admin-btn-sm:hover {
  background: #e2e8f0;
  color: #0f172a;
}



