/* ── CashDir Directory Plugin Styles ── */
:root {
  --cd-green-dark:   #04342C;
  --cd-green-mid:    #0F6E56;
  --cd-green-bright: #1D9E75;
  --cd-green-light:  #5DCAA5;
  --cd-green-pale:   #E1F5EE;
  --cd-text:         #1a1a1a;
  --cd-muted:        #6b7280;
  --cd-border:       #e5e7eb;
  --cd-white:        #ffffff;
  --cd-radius:       10px;
}

.cd-directory-wrap {
  font-family: 'DM Sans', sans-serif;
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

/* ── Filter Bar ── */
.cd-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--cd-green-dark);
  padding: 16px 20px;
  border-radius: var(--cd-radius);
  margin-bottom: 16px;
}

.cd-filter-search {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}

.cd-search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  pointer-events: none;
}

.cd-filter-bar input[type=text] {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.cd-filter-bar input[type=text]::placeholder { color: rgba(255,255,255,0.4); }
.cd-filter-bar input[type=text]:focus { border-color: var(--cd-green-light); }

.cd-filter-bar select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  min-width: 150px;
}

.cd-filter-bar select option { background: var(--cd-green-dark); color: #fff; }

.cd-filter-btn {
  padding: 10px 20px;
  background: var(--cd-green-bright);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cd-filter-btn:hover { opacity: 0.88; }

.cd-clear-btn {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.cd-clear-btn:hover { color: var(--cd-green-light); text-decoration: none; }

/* ── Results Bar ── */
.cd-results-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cd-results-count {
  font-size: 14px;
  color: var(--cd-muted);
}

.cd-active-filter {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--cd-green-pale);
  color: var(--cd-green-mid);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cd-active-filter a {
  color: var(--cd-green-mid);
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}

/* ── Listing Cards ── */
.cd-listings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cd-listing-card {
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  padding: 20px 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cd-listing-card:hover {
  border-color: var(--cd-green-bright);
  box-shadow: 0 4px 16px rgba(29,158,117,0.08);
}

.cd-listing-logo {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--cd-green-pale);
  color: var(--cd-green-mid);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.cd-listing-body { flex: 1; min-width: 0; }

.cd-listing-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cd-listing-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--cd-text);
}

.cd-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.cd-badge-halal  { background: var(--cd-green-pale); color: var(--cd-green-mid); }
.cd-badge-region { background: #f3f4f6; color: var(--cd-muted); }

.cd-listing-desc {
  font-size: 14px;
  color: var(--cd-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.cd-listing-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.cd-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--cd-border);
  color: var(--cd-muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

a.cd-tag:hover {
  border-color: var(--cd-green-bright);
  color: var(--cd-green-bright);
  text-decoration: none;
}

.cd-visit-btn {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 20px;
  background: var(--cd-green-bright);
  color: #fff !important;
  text-decoration: none !important;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.cd-visit-btn:hover { opacity: 0.85; }

/* ── Empty State ── */
.cd-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--cd-muted);
}

.cd-empty-icon { font-size: 40px; margin-bottom: 12px; }
.cd-empty h3  { font-size: 20px; color: var(--cd-text); margin-bottom: 8px; }
.cd-empty p   { font-size: 15px; }
.cd-empty a   { color: var(--cd-green-bright); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .cd-filter-bar { flex-direction: column; }
  .cd-filter-bar select, .cd-filter-search { width: 100%; min-width: unset; }
  .cd-filter-btn { width: 100%; }
  .cd-listing-card { flex-direction: column; }
  .cd-visit-btn { margin-left: 0; }
}
