.zen-loop-grid-items {
  display: grid;
}

/* ---------- Card Layout ---------- */
.zen-layout-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.zen-layout-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.zen-layout-card .zen-item-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.zen-layout-card .zen-item-body {
  padding: 1rem;
}

.zen-layout-card .zen-item-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.zen-layout-card .zen-item-excerpt {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.zen-layout-card .zen-read-more {
  display: inline-block;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.zen-layout-card .zen-read-more:hover {
  background: #005d87;
}

/* ---------- List Layout ---------- */
.zen-layout-list {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  border-left: 4px solid #0073aa;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.zen-layout-list:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.zen-layout-list .zen-item-title {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.zen-layout-list .zen-item-title a {
  color: #0073aa;
  text-decoration: none;
}

.zen-layout-list .zen-item-title a:hover {
  text-decoration: underline;
}

.zen-layout-list .zen-item-meta {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 0.5rem;
}

.zen-layout-list .zen-item-excerpt {
  color: #555;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.zlg-no-results-container,
.zlg-loader-container,
.zlg-error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
}

.zlg-no-results-text {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  margin: 0;
}

/* HTML: <div class="loader"></div> */
.zen-loader {
  width: 40px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side, #005baa 90%, #0000);
  background: var(--_g) 0% 50%, var(--_g) 50% 50%, var(--_g) 100% 50%;
  background-size: calc(100% / 3) 50%;
  animation: l3 1s infinite linear;
}

@keyframes l3 {
  20% {
    background-position: 0% 0%, 50% 50%, 100% 50%;
  }
  40% {
    background-position: 0% 100%, 50% 0%, 100% 50%;
  }
  60% {
    background-position: 0% 50%, 50% 100%, 100% 0%;
  }
  80% {
    background-position: 0% 50%, 50% 50%, 100% 100%;
  }
}

.zlg-loop-error {
  text-align: center;
  color: #f00;
  font-size: 0.9rem;
  margin: 0;
}

.zen-loop-filters-wrapper {
  margin-bottom: 2rem;
}

.zen-loop-search-button {
  display: flex !important;
}

.zen-loop-search-button-icon {
  height: 1rem;
  width: 1rem;
}

.zlg-space-x-2 > * + * {
  margin-left: 0.5rem !important;
}

.zlg-space-x-4 > * + * {
  margin-left: 1rem;
}

.zlg-space-x-6 > * + * {
  margin-left: 1.5rem;
}

.zlg-space-y-2 > * + * {
  margin-top: 0.5rem;
}

.zlg-space-y-4 > * + * {
  margin-top: 1rem;
}

.zlg-space-y-6 > * + * {
  margin-top: 1.5rem;
}

.zlg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- Zakat Selangor Filter Skin ---------- */
/* Container for the whole search bar */
.zs-loop-filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* spacing between input and dropdowns */
  align-items: center;
  background: #fff;
  border-radius: 9999px;
  min-height: 60px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.zs-loop-please-select {
  color: #777;
  font-size: 12px;
}

/* Search input */
.zs-loop-search-container {
  flex: 1 1 200px; /* grow to fill space */
}

.zs-loop-search {
  width: 100%;
  padding: 12px 14px;
  border: none !important;
  font-size: 14px;
  outline: none !important;
  background: none !important;
  border-radius: 0px !important;
}

.zs-loop-search:focus {
  border: none !important;
  outline: none !important;
}

/* Dropdowns */
.zs-loop-filters-container {
  display: flex;
  flex-wrap: wrap;
  border: none !important;
  outline: none !important;
  background: transparent;
  font-size: 14px;
  padding: 10px 0;
  appearance: none;
  cursor: pointer;
}

.zs-filter-dropdown {
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.zs-filter-dropdown:focus {
  outline: none;
}

.zs-filter-dropdown::selection {
  color: #777;
  background: none;
  font-size: 12px;
  font-weight: 600;
}

/* Labels (optional, hidden inside bar for Airbnb style) */
.zs-loop-search-label,
.zs-loop-filters-label {
  font-size: 12px;
  padding-left: 8px;
  color: #777;
  font-weight: 600;
}

.zs-loop-search-label {
  padding-left: 14px;
}

/* Search button */
.zs-loop-search-button-container {
  flex-shrink: 0;
  height: 100%;
}

.zs-loop-search-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background-color: #8dc63f !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0px !important;
  outline: none !important;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 600 !important;
  min-width: 100px !important;
  min-height: 60px !important;
}

.zs-loop-search-button:hover,
.zs-loop-search-button:active,
.zs-loop-search-button:focus {
  background-color: #8dc63f !important;
  color: #fff !important;
  border: none !important;
  outline: none !important;
}

.zs-loop-search-button-icon {
  height: 20px !important;
  width: 20px !important;
  fill: #fff !important;
}

/* Make sure dropdowns and input shrink nicely on smaller screens */
@media (max-width: 768px) {
  .zs-loop-filters-wrapper {
    display: block;
    min-height: 0;
    border-radius: 0px;
    box-shadow: none;
  }

  .zs-loop-filters-wrapper > * + * {
    margin-top: 1rem;
  }

  .zs-loop-filters-container {
    flex-direction: column;
  }

  .zs-loop-search,
  .zs-loop-search:focus,
  .zs-filter-dropdown {
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
  }

  .zs-loop-search-button {
    min-height: auto !important;
    border-radius: 3px !important;
  }
}
