/* ================================
   SPM  listings_styles.css (clean)
   Files using this: 214 / 215 / 216
   ================================ */

/* Layout shell */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  color: #222;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* ----------------
   Search (centered)
   ---------------- */
.search-bar {
  display: flex;
  justify-content: center;
  margin: 14px 0 8px;
}
.search-input {
  width: 360px;
  max-width: 90vw;
  font-size: 16px;
  padding: 8px 10px;
  border: 2px solid #cfd4d9;
  border-radius: 6px;
  background: #fff;
  outline: none;
}
.search-input:focus {
  border-color: #8fb6ff;
  box-shadow: 0 0 0 3px rgba(80, 140, 255, 0.15);
}

/* ----------------------------------------
   Controls rows (alphabet + pagination bars)
   ---------------------------------------- */
.tool-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;      /* allows 12 rows naturally */
  gap: 6px 8px;
  margin: 10px 0;
}

/* Alphabet bar */
.alphabet-bar {
  margin: 15px 0;
  text-align: center;
  display: flex;
  flex-wrap: wrap;      /* wraps naturally on small screens */
  justify-content: center;
  gap: 6px;
}
.alphabet-bar a,
.alphabet-bar span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid transparent;
  color: #2f3a4a;
  background: transparent;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}
.alphabet-bar a:hover {
  background: #eef3ff;
  border-color: #dbe6ff;
}
.alphabet-bar a.active {
  background: #e9eefc;
  border-color: #c9d8ff;
  color: #122b6f;
}

/* Pagination bar */
.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;       /* wraps to 2 rows on small screens */
  gap: 6px 8px;
  margin: 12px 0;
}
.pagination-bar a,
.pagination-bar span {
  display: inline-block;
  padding: 8px 10px;     /* comfortable tap targets */
  border-radius: 6px;
  text-decoration: none;
  line-height: 1;
  border: 1px solid #d7dde4;
  background: #fff;
  color: #2f3a4a;
  user-select: none;
  min-width: 36px;       /* consistent hit area */
  text-align: center;
}
.pagination-bar a:hover {
  background: #f2f5f9;
}
.pagination-bar a.active {
  font-weight: 700;
  border-color: #c6cfda;
  background: #eef3ff;
  color: #122b6f;
}
/* Chevrons (First/Prev/Next/Last) */
.pagination-bar .chevron {
  font-weight: 700;
  min-width: 34px;
  padding: 8px 12px;
  color: #007BFF;         /* blue chevrons */
  border-color: #007BFF;
}
.pagination-bar .chevron.disabled,
.pagination-bar span.disabled {
  color: #9aa7b6;
  border-color: #e3e9ef;
  background: #f6f8fb;
  pointer-events: none;
}

/* -------------
   Results area
   ------------- */
#results {
  min-height: 200px;
}

/* Group header (user_class group) */
.user-class {
  font-size: 1.5rem;
  font-weight: 700;
  color: #124d2b;
  margin: 14px 0 8px;
  padding: 10px 12px;
  background: #e8f7ee;
  border-left: 6px solid #b2e7c8;
  border-radius: 4px;
}

/* Base entry block (provides spacing) */
.user-entry {
  margin: 8px 0;
}

/* ----------------------
   Highlight (search hits)
   ---------------------- */
.highlight {
  background: #ffef7e;
  padding: 0 1px;
  border-radius: 2px;
  font-weight: 600;
}

/* ==========================
   Listing categories (cards)
   ========================== */

/* FL  Free Listing */
.fl-box {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-left: 4px solid #b4d8ff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 1.0rem;
  line-height: 1.45;
  color: #2a3340;
}

/* EL  Enhanced Listing */
.el-box {
  background: #fff;
  border: 1px solid #007BFF;   /* blue 1px border */
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 1.25rem;          /* as specified */
  line-height: 1.5;
  text-align: justify;
  color: #1e2a36;
}

/* PL  Premium Listing (EL + font bump + 2px border) */
.pl-box {
  background: #fff;
  border: 2px solid #007BFF;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1.5rem;           /* EL + 0.25rem */
  line-height: 1.5;
  text-align: justify;
  color: #1a2530;
}

/* QL  Featured Listing (PL + two-column layout + link) */
.ql-box {
  background: #fff;
  border: 3px solid #007BFF;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: row;         /* side-by-side on desktop */
  flex-wrap: nowrap;           /* no wrap on desktop */
  gap: 16px;
  align-items: stretch;
  font-size: 1.5rem;           /* inherits PL size */
  line-height: 1.5;
  text-align: justify;
  color: #18222c;
}
/* Left column for image (300Χ200) */
.ql-left {
  flex: 0 0 300px;
  width: 300px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border: 1px dashed #cfd6df;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
}
.ql-left img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Right column (text) */
.ql-right {
  flex: 1 1 auto;              /* fill remaining space */
  min-width: 0;                /* allows shrink; prevents wrap */
}
/* Link under the two columns */
.ql-link {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: center;
  font-weight: 700;
  color: #0056d7;
  text-decoration: none;
}
.ql-link:hover { text-decoration: underline; }

/* An activity of  note */
.mem-box {
  color: #333;
  font-style: italic;
  text-align: left;
  font-size: 0.85em; /* relative to EL/PL/QL card font-size */
  font-weight: 400;
  margin-top: 6px;
}

/* -----------------
   Responsive tweaks
   ----------------- */

/* QL stacks on mobile: image first, text below */
@media (max-width: 768px) {
  .ql-box {
    flex-direction: column;   /* stack vertically */
    gap: 10px;
  }
  .ql-left {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;      /* keeps ~300x200 proportion */
    border: none;
    background: transparent;
  }
  .ql-right {
    width: 100%;
    min-width: 0;
    padding: 0;
  }
  .ql-link { margin-top: 6px; }
}

/* Improve readability of alphabet & pagination bars on small screens */
@media (max-width: 600px) {
  .alphabet-bar a,
  .pagination-bar a,
  .pagination-bar span {
    font-size: 1.2rem;      /* larger text for mobile */
    padding: 10px 12px;     /* bigger tap area */
    min-width: 40px;        /* ensures wider buttons */
  }
  .alphabet-bar { gap: 8px; }
  .pagination-bar { gap: 8px; }
  .user-class {
    font-size: 1.5rem;
    border-left-width: 8px;
  }
}

/* -------------
   Small utils
   ------------- */
.hidden { display: none !important; }
.center { text-align: center !important; }

