:root {
  --ef-navy: rgb(0, 51, 102);
  --ef-navy-light: #003366;
  --ef-blue: #2563eb; /* Primary site blue -- used for "View" per client request */
  --ef-blue-dark: #1d4ed8;
  --ef-accent: #0f6e56; /* Pre-Qualify / funding CTA -- kept distinct from View */
  --ef-accent-dark: #0b5643;
  --ef-bg-soft: #f6f8fb;
  --ef-border: #e4e9f1;
  --ef-text: #1b2333;
  --ef-text-muted: #6b7386;
  --ef-radius: 10px;
  --ef-font:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}

.ef-wrap {
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--ef-font);
  color: var(--ef-text);
  /* Reset properties themes commonly set globally (on html/body/*),
     so this widget looks the same no matter which theme it's dropped
     into -- without needing !important. */
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  text-align: left;
  box-sizing: border-box;
}
.ef-wrap *,
.ef-wrap *::before,
.ef-wrap *::after {
  box-sizing: inherit;
}
.ef-wrap button,
.ef-wrap input,
.ef-wrap select,
.ef-wrap textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* ---------- Funding banner ---------- */
.ef-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(
    135deg,
    var(--ef-navy) 0%,
    var(--ef-navy-light) 100%
  );
  border-radius: var(--ef-radius);
  padding: 22px 28px;
  margin-bottom: 24px;
  color: #fff;
}
.ef-banner strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.2px;
}
.ef-banner p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: #c7cfe0;
}

/* ---------- Tabs ---------- */
.ef-tabs {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}
.ef-tab {
  background: none;
  border: none;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ef-text-muted);
  border-radius: 999px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.ef-tab.is-active {
  background: rgb(0, 51, 102);
  color: #fff;
}
.ef-tab-disabled {
  color: #b3b9c6;
  cursor: not-allowed;
  padding-left: 0;
}

/* ---------- Filters ---------- */
.ef-filters {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--ef-bg-soft);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.ef-wrap .ef-filters input[type="text"],
.ef-wrap .ef-filters input[type="number"],
.ef-wrap .ef-filters select {
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid var(--ef-border);
  border-radius: 7px;
  background: #fff;
  color: var(--ef-text);
  width: auto !important;
  max-width: 100% !important;
  display: inline-block !important;
  flex-shrink: 1;
  box-sizing: border-box;
}

.ef-wrap .ef-filters input[type="text"] {
  flex: 1 1 280px !important;
  min-width: 180px;
  max-width: 420px !important;
}
.ef-wrap .ef-filters input[type="number"] {
  flex: 0 0 120px !important;
  width: 120px !important;
}
.ef-wrap .ef-filters select {
  flex: 0 0 220px !important;
  width: 220px !important;
  min-width: 150px;
}
.ef-filter-price-group {
  display: flex !important;
  gap: 10px;
  flex: 0 0 auto;
}

.ef-filters-clear {
  font-size: 13px;
  color: var(--ef-text-muted);
  text-decoration: underline;
  margin-left: 4px;
}

.ef-source {
  font-size: 12.5px;
  color: var(--ef-text-muted);
  margin: 4px 0 20px;
}

.ef-error {
  color: #993c1d;
  font-size: 14px;
  background: #fdf2ee;
  border: 1px solid #f3d9ce;
  border-radius: 8px;
  padding: 14px 16px;
}

/* ---------- Listing rows (matches empireflippers.com/marketplace layout) ---------- */
.ef-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ef-listing-row {
  display: flex;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  border-left: 3px solid #003366;
  padding: 18px;
  transition: box-shadow 0.15s ease;
}
.ef-listing-row:hover {
  box-shadow: 0 8px 24px rgba(20, 33, 61, 0.08);
}

.ef-row-media {
  position: relative;
  flex: 0 0 260px;
  height: 190px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ef-row-media svg {
  width: 40px;
  height: 40px;
  color: var(--ef-navy-light);
  opacity: 0.5;
}

/* .ef-media-saas {
  background: #eef2ff;
}
.ef-media-ecom {
  background: #ecfdf5;
}
.ef-media-content {
  background: #fff7ed;
}
.ef-media-service {
  background: #f5f3ff;
} */

.ef-row-photo {
  width: 100%;
  height: 100%;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 0.5rem;
  display: block;
}

.ef-row-icon-fallback {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
}

.ef-row-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ef-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ef-row-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ef-badge-id {
  font-size: 11px;
  font-weight: 700;
  background: var(--ef-navy);
  color: #fff;
  padding: 4px 11px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}
.ef-row-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ef-text-muted);
}
.ef-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ef-text-muted);
}
.ef-status-dot.ef-status-new {
  background: var(--ef-blue);
}

.ef-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ef-row-niches {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ef-text);
  margin: 0 0 12px;
}
.ef-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.ef-badge-saas {
  background: var(--ef-navy);
}
.ef-badge-ecom {
  background: var(--ef-accent);
}
.ef-badge-content {
  background: #c2760c;
}
.ef-badge-service {
  background: #6d4ab7;
}
.ef-badge-default {
  background: #888;
}

.ef-row-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--ef-border);
}
.ef-stat-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ef-text-muted);
  margin-bottom: 2px;
}
.ef-stat-value {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ef-text);
}

.ef-row-summary {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ef-text-muted);
  margin: 0 0 12px;
}
.ef-read-more {
  color: var(--ef-blue);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.ef-read-more:hover {
  text-decoration: underline;
}

.ef-row-trends {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: auto;
}
.ef-trend-item {
  font-size: 12.5px;
  color: var(--ef-text-muted);
}
.ef-trend {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
}
.ef-trend-up {
  color: #0f8a5f;
}
.ef-trend-down {
  color: #c4442c;
}

@media (max-width: 700px) {
  .ef-listing-row {
    flex-direction: column;
  }
  .ef-row-media {
    flex: none;
    width: 100%;
    height: 160px;
  }
  .ef-row-actions {
    width: 100%;
  }
  .ef-row-actions .ef-btn {
    flex: 1;
    text-align: center;
  }
}

/* ---------- Buttons ---------- */
.ef-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.ef-btn-primary {
  background: var(--ef-accent);
  color: #fff;
  border-radius: 1000px;
}
.ef-btn-primary:hover {
  background: var(--ef-accent-dark);
}

/* "View" button -- matches the client's site blue, per explicit request. */
.ef-btn-view {
  background: #147799;
  color: #fff;
  border-radius: 1000px;
}
/* .ef-btn-view:hover {
  background: var(--ef-blue-dark);
} */

.ef-btn-outline {
  background: #fff;
  color: var(--ef-text);
  border-color: var(--ef-border);
}
.ef-btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ---------- Pager ---------- */
.ef-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}
.ef-pager-current {
  font-size: 13px;
  color: var(--ef-text-muted);
}

/* ---------- Forms (Pre-Qualify + Valuation) ---------- */
.ef-form-wrap {
  max-width: 480px;
}
.ef-form-note {
  color: var(--ef-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.ef-form label {
  display: block;
  font-size: 13px;
  color: var(--ef-text);
  margin-bottom: 14px;
  font-weight: 500;
}
.ef-form input,
.ef-form select,
.ef-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--ef-border);
  border-radius: 7px;
  box-sizing: border-box;
  font-weight: 400;
}
.ef-form-result {
  font-size: 13px;
  margin-top: 12px;
}

.ef-valuation-result {
  margin-top: 24px;
  padding: 20px;
  background: var(--ef-bg-soft);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
}
.ef-valuation-result h3 {
  margin-top: 0;
  font-size: 16px;
  color: var(--ef-navy);
}
.ef-valuation-result .ef-val-range {
  font-size: 22px;
  font-weight: 700;
  color: var(--ef-accent);
}

@media (max-width: 600px) {
  .ef-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .ef-wrap .ef-filters input[type="text"] {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
  .ef-wrap .ef-filters select {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .ef-filter-price-group {
    flex: 1 1 100% !important;
  }
  .ef-wrap .ef-filters input[type="number"] {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0;
  }
}
