/* ================================================
   Shared Styles for Category & Post List Widgets
   ================================================= */

/* Base Container */
.category-tag-links-widget,
.post-list-widget {
  width: 100%;
}

/* Titles */
.category-tag-widget-title,
.custom-post-list-widget-title {
  margin-bottom: 20px;
  font-weight: 600;
}

/* Item Wrapper */
.category-tag-item,
.custom-post-list-item {
  margin-bottom: 15px;
}

/* Item Links */
.category-tag-item a,
.custom-post-list-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  color: #333;
  position: relative;
  overflow: hidden;
}

/* Hover Effects */
.category-tag-item a:hover,
.custom-post-list-item a:hover {
  background-color: #007cba;
  color: #fff;
  border-color: #007cba;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

/* Hover shimmer effect */
.category-tag-item a::before,
.custom-post-list-item a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.category-tag-item a:hover::before,
.custom-post-list-item a:hover::before {
  left: 100%;
}

/* Count / Meta */
.count,
.post-meta {
  font-size: 0.85em;
  opacity: 0.7;
  margin-left: 5px;
}

/* Media / Icons */
.category-media-icon,
.post-media-icon {
  display: inline-flex;
  align-items: center;
}

.category-media-image img,
.post-media-image img {
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.media-left .category-media,
.media-left .post-media {
  order: -1;
  margin-right: 8px;
}

.media-right .category-media,
.media-right .post-media {
  order: 1;
  margin-left: 8px;
}

span.category-media-wrap {
  display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
  .category-tag-items,
  .custom-post-list-items {
    gap: 5px;
  }

  .category-tag-item,
  .custom-post-list-item {
    flex: 1 1 calc(50% - 5px);
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .category-tag-item,
  .custom-post-list-item {
    flex: 1 1 100%;
  }

  .category-tag-item a,
  .custom-post-list-item a {
    width: 100%;
    text-align: center;
    /* justify-content: center; */
  }
}

/* Color Variations */
.style-primary a {
  background-color: #007cba;
  color: #fff;
  border-color: #007cba;
}
.style-primary a:hover {
  background-color: #005a87;
  border-color: #005a87;
}

.style-secondary a {
  background-color: #6c757d;
  color: #fff;
  border-color: #6c757d;
}
.style-secondary a:hover {
  background-color: #545b62;
  border-color: #545b62;
}

.style-success a {
  background-color: #28a745;
  color: #fff;
  border-color: #28a745;
}
.style-success a:hover {
  background-color: #1e7e34;
  border-color: #1e7e34;
}

/* Dropdowns (if used in future widgets) */
.category-item-with-dropdown {
  position: relative;
}

.category-tag-links-widget .dropdown-toggle,
.post-list-widget .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  color: #333;
  cursor: pointer;
}

.category-tag-links-widget .dropdown-toggle:hover,
.post-list-widget .dropdown-toggle:hover {
  background-color: #007cba;
  color: #fff;
  border-color: #007cba;
}

.category-tag-links-widget .dropdown-menu,
.post-list-widget .dropdown-menu {
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
  padding: 5px 0;
}
