/* =====================================================
   BLOG PAGES - TECH BLOGGERS
   =====================================================
   Blog-specific styles:
   - Single Post Page
   - Comment Section
   - Create Post Page
   - Manage Posts Page
   - Delete Post Confirmation
===================================================== */

/* ==========================
   SINGLE POST PAGE
========================== */

/* Single Post Container */
.single-post {
  max-width: 750px; /* narrower width for readability */
  margin: 3rem auto 2rem auto; /* top spacing replaces breadcrumb, center content, keep bottom spacing */
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
}

/* Post Header */
.post-header {
  padding: 2rem 2rem 1rem;
}

.post-category {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-tag {
  background: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(88, 166, 255, 0.3);
}

/* Single post page title - specific selector */
.single-post .post-title {
  font-size: 2rem; /* slightly reduced */
  color: #fff;
  margin-bottom: 2rem !important; /* increased spacing below title */
  line-height: 1.4;
  font-weight: 700;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #30363d;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #58a6ff;
}

.author-avatar--default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #30363d;
  color: #58a6ff;
  font-size: 1rem;
}

.author-name {
  color: #c9d1d9;
  font-weight: 500;
}

.post-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #8b949e;
  font-size: 0.9rem;
}

.post-date i {
  font-size: 0.8rem;
}

.post-actions {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 20px;
  color: #8b949e;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  text-decoration: none;
  line-height: 1.5;
  min-height: 36px;
  box-sizing: border-box;
}

.action-btn:hover,
.action-btn.active {
  border-color: #58a6ff;
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
}

.action-btn i {
  font-size: 0.9rem;
}

/* Post Featured Image */
.post-featured-image {
  width: 100%;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: auto; /* no forced stretch */
  object-fit: cover;
  border-radius: 0; /* inherits card's radius */
  display: block;
  margin: 1.5rem 0; /* breathing room */
  margin-bottom: 0;
}

/* Default Post Image - Tech Bloggers Logo (for single post page) */
.single-post .default-post-image {
  width: 100%;
  height: 300px;
  background: #161b22;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #30363d;
  border-bottom: 1px solid #30363d;
  margin: 1.5rem 0;
  margin-bottom: 0;
}

.default-post-image .logo-text {
  font-size: 2.5rem;
  font-weight: bold;
  color: #58a6ff;
  text-shadow: 0 0 12px rgba(88, 166, 255, 0.3);
  letter-spacing: 0.05em;
}

/* Smaller logo text for cards */
.card .default-post-image .logo-text,
.recom-card .default-post-image .logo-text {
  font-size: 1.5rem;
}

/* Post Content */
.post-content {
  padding: 2rem;
  line-height: 1.7; /* better readability */
  font-size: 1rem;
  color: #c9d1d9;
}

.post-content p,
.post-content ul,
.post-content li {
  margin-bottom: 1rem;
}

.post-content ul {
  padding-left: 2rem;
}

.post-content ul li::marker {
  color: #58a6ff;
}

/* Author Bio */
.author-bio {
  padding: 2rem;
  border-top: 1px solid #30363d;
  background: rgba(48, 54, 61, 0.3);
}

.author-bio h3 {
  margin-bottom: 1.5rem;
  color: #fff;
  font-size: 1.3rem;
}

.post-summary {
  padding: 2rem;
  border-top: 1px solid #30363d;
  background: rgba(48, 54, 61, 0.3);
}

.post-summary h3 {
  margin-bottom: 1.5rem;
  color: #fff;
  font-size: 1.3rem;
}

.summary-content p {
  color: #c9d1d9;
  line-height: 1.6;
  margin: 0;
}

.author-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.author-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #58a6ff;
}

.author-image--default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #30363d;
  color: #58a6ff;
  font-size: 2rem;
}

.author-details h4 {
  margin-bottom: 0.8rem;
  color: #fff;
  font-size: 1.2rem;
}

.author-details p {
  color: #c9d1d9;
  line-height: 1.6;
  margin: 0;
}

/* ==========================
   COMMENT SECTION
========================== */

.comments-section {
  max-width: 750px; /* same width as post */
  margin: 2rem auto;
  padding: 2rem 1rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
}

.comments-section h2 {
  /* margin-bottom: 1rem; */
  padding: 0.5rem 1rem;
  font-size: 1.4rem;
  color: #fff;
}

.comment {
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #30363d;
}

.comment:last-child {
  border-bottom: none;
}

.comment-author {
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #58a6ff;
}

.comment-text {
  color: #c9d1d9;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Comment Actions (Reply button) */
.comment-actions {
  margin-top: 0.5rem;
}

.comment-actions .btn-reply {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  border: none;
  background: none;
  color: #58a6ff;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.comment-actions .btn-reply:hover {
  color: #7bb3ff;
  text-decoration: none;
}

/* Reply Form */
.reply-form {
  margin-top: 1rem;
  padding: 1rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
}

.reply-form .form-group {
  margin-bottom: 1rem;
}

.reply-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #161b22;
  color: #c9d1d9;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
}

.reply-form textarea:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.reply-form .form-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Reply form button specific styles - using !important to override base styles */
.reply-form .btn {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
}

/* Ensure all reply form buttons inherit proper colors */
.reply-form button {
  color: inherit !important;
}

.reply-form .btn--primary {
  background: #58a6ff !important;
  color: #fff !important;
  border: 1px solid #58a6ff !important;
  padding: 0.25rem 0.5rem !important;
}

.reply-form .btn--primary:hover {
  background: #1f6feb !important;
  border-color: #1f6feb !important;
  color: #fff !important;
}

/* Very specific selector for cancel button */
.reply-form .btn.btn--secondary.btn-sm.cancel-reply,
.reply-form .btn--secondary,
.reply-form .cancel-reply {
  background: transparent !important;
  color: #58a6ff !important;
  border: 1px solid #58a6ff !important;
  margin-left: 0.5rem !important;
}

.reply-form .btn.btn--secondary.btn-sm.cancel-reply:hover,
.reply-form .btn--secondary:hover,
.reply-form .cancel-reply:hover {
  background: rgba(88, 166, 255, 0.1) !important;
  border-color: #58a6ff !important;
  color: #fff !important;
}

/* Reply comments (nested) */
.comment.reply {
  margin-left: 2rem;
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid #30363d;
  background: rgba(88, 166, 255, 0.05);
}

/* Add Comment Form */
.add-comment {
  margin-top: 1.5rem;
}

.add-comment h3 {
  margin-bottom: 0.5rem;
}

.add-comment textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

.add-comment textarea:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

.add-comment button {
  margin-top: 1rem;
}

/* Reply Form (nested under a comment) */
.reply-form {
  margin-top: 0.8rem;
  padding-left: 1rem;
  border-left: 2px solid #30363d;
}

.reply-form textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.reply-form textarea:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

.reply-form .btn-action {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Reply Form Actions */
.reply-actions {
  display: flex;
  gap: 1rem;
}

.reply-form .btn-cancel {
  background: transparent;
  color: #c9d1d9;
  border: 1px solid #545c65;
  border-radius: 6px;
  padding: 0.3rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.reply-form .btn-cancel:hover {
  background: rgba(240, 62, 62, 0.15);
  border-color: #f03e3e;
  color: #f03e3e;
}

/* FORCE REPLY FORM BUTTON STYLES - HIGHEST PRIORITY */
.comment .reply-form button[type="button"].cancel-reply {
  background: transparent !important;
  color: #c9d1d9 !important;
  border: 1px solid #30363d !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.75rem !important;
}

.comment .reply-form button[type="button"].cancel-reply:hover {
  background: rgba(88, 166, 255, 0.1) !important;
  border-color: #58a6ff !important;
  color: #58a6ff !important;
}

.comment .reply-form button[type="submit"] {
  background: #58a6ff !important;
  color: #fff !important;
  border: 1px solid #58a6ff !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.75rem !important;
}

.comment .reply-form button[type="submit"]:hover {
  background: #1f6feb !important;
  border-color: #1f6feb !important;
  color: #fff !important;
}

/* ==========================
   FORM ALERTS AND ERRORS
========================== */

/* Alert styling for form messages */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert-error {
  background: rgba(248, 81, 73, 0.1);
  border-color: #f85149;
  color: #f85149;
}

.alert-error p {
  margin: 0;
  font-weight: 500;
}

.alert-error p:not(:last-child) {
  margin-bottom: 0.5rem;
}

/* Form field errors */
.form-error {
  color: #f85149;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(248, 81, 73, 0.05);
  border: 1px solid rgba(248, 81, 73, 0.2);
  border-radius: 4px;
}

.form-error ul {
  margin: 0;
  padding-left: 1rem;
}

.form-error li {
  margin: 0.25rem 0;
}

/* Image limit specific styling */
.image-limit-error {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.image-limit-error .error-icon {
  color: #ffc107;
  margin-right: 0.5rem;
}

.image-limit-error .error-title {
  color: #ffc107;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.image-limit-error .error-details {
  color: #8b949e;
  font-size: 0.9rem;
  margin: 0;
}

/* ==========================
   CREATE POST PAGE
========================== */

.create-post-container {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 2rem;
  margin: 3rem auto;
  max-width: 800px;
}

.create-post-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 2rem;
}

.create-post-form label {
  color: #c9d1d9;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.create-post-form input[type="text"],
.create-post-form textarea,
.create-post-form select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 1rem !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important;
  line-height: 1.6;
}

.create-post-form input[type="text"]:focus,
.create-post-form textarea:focus,
.create-post-form select:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

/* Row for Category & Status */
.form-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-section #title {
  margin-bottom: 2rem;
}

.form-section #summary {
  margin-bottom: 0.5rem;
}

.create-post-container h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Layout for rows (Category & Status) */
.form-row {
  display: flex;
  gap: 2rem;
}

.form-row .form-group {
  flex: 1;
}

/* Textareas (override if needed) */
#content {
  min-height: 200px; /* blog content */
  margin-bottom: 0px;
}

#summary {
  min-height: 100px; /* short summary */
}

/* Image Section */
.image-placeholder {
  background: rgba(48, 54, 61, 0.2);
  aspect-ratio: 16 / 9;
  border: 2px dashed #30363d;
  border-radius: 8px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b949e;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  overflow: hidden;
}

/* When image is present */
.image-placeholder[style*="background-image"] {
  border: none;
  color: transparent;
  background-size: cover; /* fills box consistently */
  background-position: center;
  background-repeat: no-repeat;
}

.image-container {
  display: flex;
  justify-content: center;
}

/* Handle img elements inside image-placeholder */
.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.image-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
}

.image-actions .or {
  color: #8b949e;
  font-size: 0.9rem;
}

.upload-btn {
  color: #58a6ff !important;
}

.upload-btn:hover {
  color: #fff !important;
}

/* Create/Edit Post Form - Center buttons and ensure consistent heights */
.create-post-form .form-actions {
  gap: 1.5rem; /* increased spacing between buttons */
  justify-content: center; /* center the buttons */
  display: flex;
  align-items: center;
}

.create-post-form .form-actions .btn,
.create-post-form .form-actions button,
.create-post-form .form-actions input[type="submit"] {
  display: inline-flex; /* consistent rendering */
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem; /* consistent padding */
  height: auto; /* let padding control height */
  line-height: 1.5; /* consistent line height */
  box-sizing: border-box; /* include padding in height calculation */
  vertical-align: middle;
}

/* ==========================
   MANAGE POSTS PAGE
========================== */

.manage-posts-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.manage-posts-controls .search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-bar {
  width: 100%;
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 1rem;
  height: 42px;
}

.search-bar:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

.search-clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #8b949e;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 4px;
  width: 32px;
  height: 32px;
}

.search-clear-btn i {
  font-size: 1rem;
}

.search-clear-btn:hover {
  color: #c9d1d9;
  background: rgba(110, 118, 129, 0.1);
}

.search-clear-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.manage-posts-controls .search-button {
  padding: 0;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #21262d;
  color: #c9d1d9;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.manage-posts-controls .search-button i {
  font-size: 1rem;
}

.manage-posts-controls .search-button:hover {
  background: #30363d;
  border-color: #58a6ff;
  color: #58a6ff;
}

.manage-posts-controls .search-button:active {
  background: #0d1117;
  transform: scale(0.98);
}

/* Filter Section */
.filter-section {
  margin: -1rem auto 2rem;
}

.filter-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 1rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
}

.filter-wrapper i {
  color: #8b949e;
  font-size: 1rem;
}

.filter-select {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 42px;
}

/* When a select is inside a filter wrapper, rely on the wrapper's border only */
.filter-wrapper .filter-select {
  border: none;
  background: #0d1117;
  height: 36px;           /* tighter control for vertical centering */
  line-height: 36px;      /* align text vertically */
  padding: 0 12px;        /* horizontal padding only */
  margin: 0;              /* remove any UA margins */
  display: inline-block;
  vertical-align: middle;
}
.filter-wrapper .filter-select:hover,
.filter-wrapper .filter-select:focus {
  box-shadow: none;
  border: none;
}

.filter-select:hover {
  border-color: #58a6ff;
  box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.1);
}

.filter-select:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

.manage-posts-heading {
  text-align: center;
  color: #fff;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.manage-posts-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* (No manage-specific filter overrides – use the same as all_posts) */

/* Sub-pixel rendering can make the bottom look heavier.
   Add a subtle inner shadow to even out perceived thickness */
.filter-wrapper-manage {
  box-shadow: inset 0 0 0 0 rgba(0,0,0,0.0); /* reset */
}

.new-post-wrapper {
  display: flex;
  justify-content: flex-end;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Post Card */
.post-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align items to top */
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1.5rem;
  gap: 1rem;
  height: 100%;
}

.post-image {
  flex: 0 0 160px;
  aspect-ratio: 16 / 9;
  background: rgba(48, 54, 61, 0.3);
  border: 1px dashed #30363d;
  border-radius: 6px;
  color: #8b949e;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Hide placeholder text when background image is applied */
.post-image[style*="background-image"] span {
  display: none;
}

/* Remove dashed border when background image is applied */
.post-image[style*="background-image"] {
  border: none;
}

.post-image span {
  position: absolute;
  color: #8b949e;
  font-size: 0.8rem;
}

.post-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Manage posts page - post card title */
.post-card .post-title {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  /* Text truncation for post titles - limit to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  max-height: calc(1.3em * 2); /* Fallback for browsers that don't support -webkit-line-clamp */
}

/* Post title link styling */
.post-card .post-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-card .post-title-link:hover {
  color: #58a6ff;
  text-decoration: none;
}

.post-excerpt {
  color: #8b949e;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.post-status {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  border: 1px solid;
}

.post-status.published {
  border-color: #238636;
  background: rgba(35, 134, 54, 0.2);
  color: #9dbda3;
}

.post-status.draft {
  border-color: #a371f7;
  background: rgba(163, 113, 247, 0.2);
  color: #c5a5fd;
}

/* Actions */
.post-actions {
  display: flex;
  gap: 0.75rem; /* Space between buttons */
  align-items: flex-start; /* Align to top */
  flex-shrink: 0; /* Don't let buttons shrink */
}

.btn-icon {
  background: #0d1117;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 0.7rem; /* Balanced padding */
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  display: flex; /* Use flex for vertical layout */
  flex-direction: column; /* Stack icon and label vertically */
  align-items: center;
  justify-content: center;
  gap: 0.4rem; /* Space between icon and label */
  line-height: 1;
  min-width: 60px; /* Minimum width for text */
  text-decoration: none; /* Remove underline from links */
}

.btn-icon i {
  font-size: 1.1rem; /* Slightly larger icon */
}

.btn-icon .btn-label {
  font-size: 0.75rem; /* Small label text */
  font-weight: 500;
  text-transform: capitalize;
  white-space: nowrap;
}

.btn-icon:hover {
  background: #21262d;
  border-color: #58a6ff;
  color: #58a6ff;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.page-link {
  padding: 0.5rem 0.9rem;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #0d1117;
  color: #c9d1d9;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-link:hover {
  background: #21262d;
  color: #58a6ff;
}

.page-link.active {
  background: #58a6ff;
  border-color: #58a6ff;
  color: #fff;
}

/* ==========================
   DELETE POST CONFIRMATION
========================== */

.delete-confirmation {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.confirmation-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.confirmation-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
  text-align: center;
}

.post-preview {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-image {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 1rem;
  border-radius: 6px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Delete confirmation - post preview title */
.post-preview .post-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.post-summary {
  color: #c9d1d9;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #8b949e;
}

.post-status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-published {
  background: rgba(63, 185, 80, 0.2);
  color: #3fb950;
}

.status-draft {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.warning-message {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid #f85149;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.warning-message.warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid #ffc107;
}

.warning-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.warning-text h3 {
  color: #f85149;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.warning-text p {
  color: #f85149;
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
}

.warning-message.warning .warning-text h3 {
  color: #ffc107;
}

.warning-message.warning .warning-text p {
  color: #ffc107;
}

.confirmation-form {
  margin-top: 1rem;
}

.confirmation-form .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ==========================
   RESPONSIVE STYLES
========================== */

@media (max-width: 768px) {
  /* Center post actions on smaller screens */
  .post-card {
    flex-direction: column;
    align-items: center;
  }

  .post-actions {
    justify-content: center;
    margin-left: 0;
    width: 100%;
  }
}
