/**
 * Posts Loader Styles
 * Styling for JavaScript-rendered posts and filters
 */

/* Custom search input */
.custom-search-wrapper {
  position: relative;
  width: 100%;
}

.blog-search-input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  font-size: 16px;
  border: 1px solid #e1e5ed;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.blog-search-input:focus {
  border-color: transparent;
}

.blog-search-input::placeholder {
  color: #858dad;
  opacity: 0.7;
}

.blog-search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.blog-search-button svg {
  display: block;
}

/* Filter Menu */
#filter-menu-overlay {
  animation: fadeIn 0.2s ease;
  margin: 0px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.filter-menu-categories label,
.filter-menu-tags label {
  padding-left: 0px !important;
}
.filter-menu-categories input,
.filter-menu-tags input {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}

/* Custom Checkbox Styling */
.filter-menu-categories input[type="checkbox"],
.filter-menu-tags input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid #c2c7d6;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-menu-categories input[type="checkbox"]:hover,
.filter-menu-tags input[type="checkbox"]:hover {
  border-color: #3b2c3d;
}

.filter-menu-categories input[type="checkbox"]:checked,
.filter-menu-tags input[type="checkbox"]:checked {
  background-color: #3b2c3d;
  border-color: #3b2c3d;
}

.filter-menu-categories input[type="checkbox"]:checked::after,
.filter-menu-tags input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 8px;
  background-image: url('data:image/svg+xml;utf8,<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.85925 0.292893C10.2498 0.683418 10.2498 1.31658 9.85925 1.70711L4.35925 7.20711C4.16949 7.39687 3.91142 7.50239 3.64308 7.49996C3.37473 7.49753 3.11862 7.38734 2.93233 7.19417L0.280188 4.44405C-0.10319 4.0465 -0.0917088 3.41344 0.305833 3.03007C0.703375 2.64669 1.33644 2.65817 1.71981 3.05571L3.66508 5.07285L8.44504 0.292893C8.83556 -0.0976311 9.46873 -0.0976311 9.85925 0.292893Z" fill="white"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: translate(-50%, -50%);
}

#filter-menu-apply:hover:not(:disabled) {
  opacity: 0.9;
}

#filter-menu-apply:disabled {
  color: #848dad !important;
  pointer-events: none;
  background: #e0e3eb !important;
}

#filter-menu-close:hover {
  opacity: 0.7;
}

/* Category filters */
.wp-block-categories-list .cat-item {
  display: inline-block;
  flex: 1 1 auto;
}

.wp-block-categories-list {
  width: 100%;
  text-align: center;
}

.wp-block-categories-list .cat-item a {
  display: inline-block;
  padding: 6px 14px;
  background: #ffff;
  border-radius: 20px;
  font-size: 15px;
  line-height: 20px;
  color: #292e3d;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  width: 100%;
  border: 1px solid #292e3d;
  font-weight: 600;
}

.wp-block-categories-list .cat-item a:hover {
  background: #e1e5ed;
  color: #292e3d;
}

.wp-block-categories-list .cat-item.active a {
  background: #292e3d;
  color: white;
  font-weight: 600;
}

.wp-block-categories-list .post-count {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 4px;
}

/* Post terms styling */
.wp-block-post-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.wp-block-post-terms__term {
  display: inline-block;
}

.wp-block-post-terms__term a {
  padding: 6px 12px;
  background: #f0f2f7;
  border-radius: 16px;
  font-size: 14px;
  line-height: 20px;
  color: #667399;
  text-decoration: none;
  transition: background 0.2s ease;
}

.wp-block-post-terms__term a:hover {
  background: #e1e5ed;
  color: #292e3d;
}

/* Post title styling */
.wp-block-post-title a {
  color: #292e3d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.wp-block-post-title a:hover {
  color: #667399;
}

/* Pagination styling */
.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  color: #292e3d;
  text-decoration: none;
  transition: all 0.2s ease;
}

.wp-block-query-pagination a:hover {
  background: #f0f2f7;
}

.wp-block-query-pagination .page-numbers.current {
  background: #292e3d;
  color: white;
}

/* Loading state */
#posts-loading {
  text-align: center;
  padding: 40px 0;
  color: #667399;
}

/* Featured image */
.wp-block-post-featured-image {
  margin: 0 0 16px 0;
}

.wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Post excerpt */
.wp-block-post-excerpt {
  margin-top: 4px;
}

.wp-block-post-excerpt__excerpt {
  margin: 0;
}

/* No results */
#posts-no-results {
  text-align: center;
  color: #667399;
}
