/* Underline current page */
header .header-inner .menu-container .menu .community:after {
  transform: translateX(-50%) scaleX(1);
}

/* ========================================
   Hero Section
   ======================================== */
/* Lit slate, as on the homepage and pricing. The forum sheet below rises into
   the bottom of this band. */
.hero {
  padding: 148px 0 152px;
  background:
    radial-gradient(50% 80% at 50% 0%, rgba(120, 150, 220, 0.16), transparent 70%),
    linear-gradient(160deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
  text-align: center;
}

.hero .hero-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 24px;
}

.hero .guidelines-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.hero .guidelines-btn:hover {
  background: var(--hero-badge-border);
}

/* ========================================
   Login Prompt
   ======================================== */
.login-prompt {
  color: var(--gray-700);
  margin-bottom: 16px;
}

.login-prompt p {
  margin: 0;
}

.login-prompt a {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
}

.login-prompt a:hover {
  text-decoration: underline;
}

.ban-notice {
  margin-bottom: 20px;
  padding: 16px;
  background-color: var(--red-100);
  border: 1px solid var(--red-200);
  border-radius: 6px;
  color: var(--red-800);
  text-align: center;
}

.ban-notice h4 {
  margin-top: 0;
  color: var(--red-800);
}

.ban-notice p {
  margin-bottom: 0;
}

/* ========================================
   Community Wrapper
   ======================================== */
.community-wrapper {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 24px;
}

/* post_history.php shares this file but has no hero, so only the page with a
   band gets the raised sheet. */
.hero + .community-wrapper {
  position: relative;
  box-sizing: border-box;
  margin: -100px auto 64px;
  padding: 28px 32px 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--elevation-lg);
}

.community-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: var(--gray-50);
  padding: 16px 20px;
  border-radius: 12px;
}

.action-left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Search Filter Label */
.search-filter-label {
  text-align: center;
  color: var(--black);
  font-size: 14px;
  padding: 10px;
  margin-bottom: 15px;
  font-style: italic;
  border-radius: 6px;
  background-color: var(--whiteBackground);
  border: 1px solid var(--gray-border);
}

.search-box {
  display: flex;
  align-items: center;
  max-width: 300px;
  flex-grow: 1;
  height: 40px;
}

.search-box input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-input-border);
  border-radius: 4px;
  font-size: 14px;
  min-width: 0;
  height: 100%;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* Search icon button */
.search-icon-button {
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  margin-left: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.search-icon-button:hover {
  background-color: var(--blue-700);
}

/* Post listings */
.posts-container {
  margin-top: 20px;
}

.empty-state {
  text-align: center;
  margin: 50px 0;
}

/* Post card layout with select checkbox */
.post-card {
  display: flex;
  background-color: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 8px 24px var(--shadow);
}

/* Selection checkbox styling */
.post-select {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background-color: var(--gray-50);
  border-right: 1px solid var(--gray-border);
  min-width: 40px;
}

/* Votes section */
.post-votes {
  background-color: var(--whiteBackground);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--gray-border);
  min-width: 60px;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  padding: 5px;
  transition: all 0.2s ease;
}

.vote-btn:hover {
  color: var(--primary-blue-dark);
}

.vote-btn.voted.upvote {
  color: var(--blue-600);
}

.vote-btn.voted.downvote {
  color: var(--red-600);
}

.vote-count {
  font-weight: bold;
  font-size: 18px;
  margin: 8px 0;
  color: var(--black);
}

.post-content {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.post-title {
  font-size: 18px;
  color: var(--black);
  flex: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-type,
.post-status {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.post-type.bug {
  background-color: var(--red-100);
  color: var(--red-800);
}

.post-type.feature {
  background-color: var(--sky-100);
  color: var(--sky-700);
}

.post-status.open {
  background-color: var(--green-50);
  color: var(--green-600);
}

.post-status.in_progress {
  background-color: var(--amber-100);
  color: var(--amber-600);
}

.post-status.completed {
  background-color: var(--blue-100);
  color: var(--primary-blue);
}

.post-status.declined {
  background-color: var(--red-50);
  color: var(--red-600);
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 10px;
}

.post-info {
  font-size: 14px;
  color: var(--black);
}

.post-author,
.post-date {
  margin-right: 10px;
}

.post-views {
  position: relative;
  top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-views svg {
  vertical-align: middle;
  color: var(--black);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.status-update {
  padding: 5px 8px;
  border: 1px solid var(--gray-input-border);
  border-radius: 4px;
  background-color: var(--white);
}

.delete-post-btn {
  background-color: var(--red-100);
  color: var(--red-600);
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* Highlighted post */
@keyframes highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--blue-600-alpha-70);
  }

  70% {
    box-shadow: 0 0 0 10px var(--blue-600-alpha-0);
  }

  100% {
    box-shadow: 0 0 0 0 var(--blue-600-alpha-0);
  }
}

/* Style for selected posts */
.post-card.selectable {
  border-left: 3px solid var(--primary-blue);
}

/* Bulk actions styling */
.bulk-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: var(--gray-bg-light);
  border-radius: 6px;
  margin-bottom: 15px;
}

.selection-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.selected-count {
  font-size: 14px;
  color: var(--black);
  font-weight: 500;
}

/* Loading indicator */
#loading-indicator {
  text-align: center;
  padding: 20px;
  color: var(--black);
}

.spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--blue-600-alpha-30);
  border-radius: 50%;
  border-top-color: var(--primary-blue);
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

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

/* Filter dropdown styling */
.filter-dropdown {
  position: relative;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-input-border);
  border-radius: 4px;
  background-color: var(--white);
  min-width: 150px;
}

.filter-select:hover {
  border-color: var(--gray-placeholder);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 1px var(--blue-600-alpha-20);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 120px 0 120px;
  }

  .hero + .community-wrapper {
    margin: -80px 12px 32px;
    padding: 20px 16px 4px;
    border-radius: var(--radius-lg);
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .community-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-left {
    width: 100%;
  }

  .search-box {
    max-width: none;
    width: 100%;
  }

  .bulk-actions {
    flex-direction: column;
    gap: 10px;
  }

  .community-wrapper {
    max-width: 100%;
    margin: 24px auto;
  }

  .login-to-post {
    display: none !important;
  }

  .create-new-post {
    width: 100% !important;
  }

  .filter-dropdown {
    width: 100% !important;
  }

  .filter-select {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .post-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
    align-items: flex-start;
  }

  .admin-actions {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  .status-update {
    flex: 1;
    min-width: 0;
    max-width: none;
  }

  .delete-post-btn {
    white-space: nowrap;
    padding: 5px 8px;
    height: 100%;
  }

  .post-footer {
    padding-top: 10px;
    gap: 12px;
  }

}

@media (max-width: 480px) {
  .post-select {
    min-width: 30px;
    padding: 5px;
  }

  .post-votes {
    min-width: 40px;
    padding: 5px;
  }
}
