Toggle menu
648
116
71
6.9K
Landrace.Wiki - The Landrace Cannabis Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Home/FeaturedRegionCard/styles.css: Difference between revisions

Template page
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ================================
/* Featured Region Cards (Home) */
  FeaturedRegionCard — TemplateStyles-safe CSS
  ================================ */


/* Grid wrapper (used on Main Page) */
.fa-grid{
.fa-grid {
   display:grid;
   display: grid;
   grid-template-columns:repeat(3, minmax(0,1fr));
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
   gap:16px;
   gap: 16px;
   margin:12px 0 24px;
  align-items: stretch;
  max-width: 1200px;
   margin: 0 auto;
}
}


/* Card shell */
@media (max-width: 1024px){
.fa-card {
  .fa-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  display: flex;
}
  flex-direction: column;
@media (max-width: 600px){
  background: #ffffff;
   .fa-grid{ grid-template-columns:1fr; }
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .2s ease;
   height: 100%;
}
}
.fa-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }


/* --- 16:9 banner with cover --- */
/* Card */
.fa-media {
.fa-card{
   position: relative;
   display:flex;
   overflow: hidden;
   flex-direction:column;
   background: #f3f4f6;
   background:#fff;
   line-height: 0;       /* remove inline-img baseline gap */
  border:1px solid #e5e7eb;
   border-bottom: 1px solid #eef2f7;
  border-radius:14px;
  overflow:hidden;
   box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .15s ease, box-shadow .2s ease;
   height:100%;
}
}
.fa-media::before {
 
   content: "";
.fa-card:hover{
  display: block;
   transform:translateY(-2px);
  width: 100%;
   box-shadow:0 10px 28px rgba(0,0,0,.12);
   padding-top: 56.25%; /* 16:9 ratio */
}
}


/* Fill the box */
/* Media */
.fa-img { position: absolute; inset: 0; }
.fa-media{
.fa-img,
   position:relative;
.fa-img a,
   background:#f3f4f6;
.fa-media .image,
   border-bottom:1px solid #eef2f7;
.fa-media .mw-file-description {
   display: block;
   width: 100%;
   height: 100%;
}
}


/* Actual <img> element */
/* 16:9 ratio */
.fa-media img,
.fa-media::before{
.fa-media .mw-file-element {
   content:"";
   display: block;
   display:block;
   width: 100% !important;
   width:100%;
   height: 100% !important;
   padding-top:56.25%;
   max-width: none !important;
  object-fit: cover;
  object-position: center center;
}
}


/* Placeholder */
.fa-img{
.fa-img--placeholder {
   position:absolute;
   display: flex;
   inset:0;
   align-items: center;
   display:block;
   justify-content: center;
   width:100%;
   color: #9ca3af;
   height:100%;
   font-size: .9rem;
}
}


/* Body */
/* MediaWiki file wrapper quirks */
.fa-body {
.fa-img a,
   padding: 14px 16px 16px 16px;
.fa-img .image,
   display: flex;
.fa-img .mw-file-element,
   flex-direction: column;
.fa-img img{
   gap: 8px;
   display:block;
  width:100% !important;
  height:100% !important;
   max-width:none !important;
   object-fit:cover;
   object-position:center;
}
}


/* Title (now directly under image) */
/* Placeholder that still looks designed */
.fa-title {
.fa-img--placeholder{
   margin: 8px 0 2px 0;
   position:absolute;
   line-height: 1.2;
  inset:0;
   font-size: 1.125rem; /* 18px */
   display:flex;
   color: #1f2937;
  align-items:center;
  justify-content:center;
   font-size:.95rem;
   color:#6b7280;
  background:
    radial-gradient(1200px 300px at 10% 0%, rgba(45,106,79,.18), transparent 60%),
    radial-gradient(900px 260px at 90% 10%, rgba(16,185,129,.14), transparent 55%),
    #f3f4f6;
}
}
.fa-title a { color: inherit; text-decoration: none; }
.fa-title a:hover { text-decoration: underline; }


/* Kicker (path) */
/* Body */
.fa-kicker {
.fa-body{
   margin: 0 0 8px 0;
   display:flex;
   color: #6b7280;
   flex-direction:column;
  font-size: .88rem;
   gap:10px;
   line-height: 1.3;
   padding:14px 16px 16px;
   display: flex;
   min-height:0;
   flex-wrap: wrap;
  gap: 6px 10px;
}
}
.k-item { display: inline-flex; align-items: center; gap: 4px; }


/* Province line (avoid redundant country) */
/* Title */
.fa-sub { margin: 0 0 6px 0; color: #6b7280; }
.fa-title{
  margin:0;
  font-size:1.05rem;
  font-weight:700;
  line-height:1.25;
}


/* Meta (dot-separated) */
.fa-title a{
.fa-provenance {
   color:#1f4d36; /* brand-ish green */
  margin: 0 0 8px 0;
   text-decoration:none;
   color: #64748b;
  font-size: .88rem;
  display: flex;
  flex-wrap: wrap;
   align-items: center;
}
}
.fa-provenance .pv-item {
 
   display: inline-flex;
.fa-title a:hover{
  align-items: center;
   text-decoration:underline;
  white-space: nowrap;
}
}
.fa-provenance .pv-item + .pv-item::before {
 
   content: "•";
/* Kicker */
   padding: 0 6px;
.fa-kicker{
   color: #9ca3af;
   margin:0;
   font-size:.85rem;
   color:#6b7280;
}
}


/* Hook (one-line pitch) */
.k-item{
.fa-hook { margin: 0; color: #334155; font-size: .95rem; }
  display:inline-block;
  line-height:1.35;
}


/* Footer (pinned) */
.fa-hook{
.fa-foot {
   margin:0;
   margin-top: auto;               /* push footer to bottom */
   color:#374151;
   border-top: 1px solid #e5e7eb;
   font-size:.93rem;
   padding-top: 10px;
   line-height:1.5;
}
/* Statusline holds three pills in a row (wraps on mobile) */
.fa-statusline {
  display: flex;
   align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px 0;
  font-weight: 600;
}
.fa-foot-sep { height: 1px; background: #e5e7eb; margin: 8px 0; }


/* CTA */
  /* 3-line clamp without webkit */
.fa-cta { margin: 0; font-weight: 600; }
   display:block;
.fa-cta a {
   max-height:4.5em/* 1.5 * 3 lines */
   color: #2d5016;
   overflow:hidden;
   text-decoration: none;
   border-bottom: 1px solid rgba(45,80,22,.3);
   padding-bottom: 1px;
}
}
.fa-cta a:hover { border-bottom-color: rgba(45,80,22,.6); }
.fa-cta .fa-missing { color: #6b7280; }


/* ---------- Pills (shared base) ---------- */
/* Footer pinned to bottom */
.pill,
.fa-foot{
.status-pill {
   margin-top:auto;
   display: inline-flex;
   display:flex;
  align-items: center;
   flex-direction:column;
   gap: 6px;
   gap:10px;
   padding: 6px 10px;
   padding-top:4px;
  border-radius: 999px;
   font-weight: 600;
   font-size: .9rem;
  line-height: 1;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #1f2937;
}
/* Tiny dot (used by status + area) */
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
}
}


/* ---------- Conservation status (colored) ---------- */
.fa-foot-sep{
.status-pill {
   height:1px;
   background: #f3f4f6;
   background:#eef2f7;
   color: #374151;
}
}
.sp--stable    { background: #e8f5e9; color: #1b5e20; border-color: #c8e6c9; }
.sp--vulnerable { background: #fff7ed; color: #7c2d12; border-color: #fed7aa; }
.sp--endangered { background: #fff1f2; color: #7f1d1d; border-color: #fecdd3; }
.sp--critical  { background: #fee2e2; color: #7f1d1d; border-color: #fecaca; }
.sp--extinct    { background: #f3f4f6; color: #111827; border-color: #e5e7eb; }
.sp--unknown    { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }


.sp--stable .pill-dot    { background: #2e7d32; }
/* Status line */
.sp--vulnerable .pill-dot { background: #b45309; }
.fa-statusline{
.sp--endangered .pill-dot { background: #b91c1c; }
  margin:0;
.sp--critical .pill-dot   { background: #991b1b; }
   display:flex;
.sp--extinct .pill-dot    { background: #111827; }
  flex-wrap:wrap;
.sp--unknown .pill-dot    { background: #9ca3af; }
   gap:8px;
 
   align-items:center;
/* ---------- Growing area (neutral) ---------- */
.pill--area {
   background: #f8fafc;           /* light neutral */
   border-color: #e5e7eb;
  color: #1f2937;
}
}
/* keep the dot visible but neutral */
.pill--area .pill-dot { background: #6b7280; }


/* ---------- Accessions (neutral number + label) ---------- */
/* Pills */
.pill--access {
.status-pill,
   background: #eff6ff;           /* light blue */
.pill{
   border-color: #dbeafe;         /* blue-100 */
   display:inline-flex;
   color: #1f2937;
   align-items:center;
}
   gap:8px;
.pill--access .pill-dot { display: none; }
  border-radius:999px;
.pill--access .pill-num { font-weight: 700; }
  padding:6px 10px;
.pill--access .pill-label {
  font-size:.82rem;
   font-weight: 600;
  border:1px solid #e5e7eb;
   color: #6b7280;
   background:#f9fafb;
   font-size: .9rem;
   color:#374151;
   line-height:1;
}
}


/* Small screens */
.pill-dot{
@media (max-width: 480px) {
   width:8px;
   .fa-body { padding: 12px 14px 14px 14px; gap: 6px; }
  height:8px;
   .fa-title { font-size: 1.05rem; }
   border-radius:999px;
   .fa-provenance { font-size: .86rem; }
   background:#9ca3af;
}
}


/* Hard cap the media height so wide screens don't blow it up */
/* Status variants */
.fa-media { max-height: 420px; }
.sp--endangered{ background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.25); }
@media (max-width: 600px) { .fa-media { max-height: 240px; } }
.sp--endangered .pill-dot{ background:#ef4444; }


/* ==== Featured Region Cards: tighten copy + spacing ==== */
.sp--vulnerable{ background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.28); }
.sp--vulnerable .pill-dot{ background:#f59e0b; }


/* small gap below the "Featured Growing Regions" heading */
.sp--near\ threatened,
.mw-parser-output h2 + .fa-grid,
.sp--near-threatened{ background:rgba(234,179,8,.10); border-color:rgba(234,179,8,.28); }
.mw-parser-output h2 + .fr-grid { margin-top: 10px; }
.sp--near\ threatened .pill-dot,
.sp--near-threatened .pill-dot{ background:#eab308; }


/* make the card’s content pack tighter */
.sp--least\ concern,
.mw-parser-output .fa-card,
.sp--least-concern{ background:rgba(16,185,129,.10); border-color:rgba(16,185,129,.28); }
.mw-parser-output .fr-card {
.sp--least\ concern .pill-dot,
  display: flex;
.sp--least-concern .pill-dot{ background:#10b981; }
  flex-direction: column;
}


/* reduce inner padding a touch */
.sp--unknown{ background:#f3f4f6; border-color:#e5e7eb; }
.mw-parser-output .fa-card .fa-content,
.sp--unknown .pill-dot{ background:#9ca3af; }
.mw-parser-output .fr-card .fr-content { padding: 14px 16px; }


/* tighter body text: slightly smaller + shorter leading + trimmed margins */
.pill--access .pill-num{
.mw-parser-output .fa-card .fa-body,
   font-weight:800;
.mw-parser-output .fr-card .fr-body {
   font-variant-numeric:tabular-nums;
   font-size: .95rem;
   line-height: 1.45;
  color: #495057;
  margin: 6px 0 6px 0;
}
}
.mw-parser-output .fa-card .fa-body p,
.mw-parser-output .fr-card .fr-body p { margin: 0; }


/* keep pills/footnote pinned to the bottom without leaving excess gap */
/* CTA */
.mw-parser-output .fa-card .fa-pills,
.fa-cta{
.mw-parser-output .fr-card .fr-pills,
  margin:0;
.mw-parser-output .fa-card .fa-meta,
  font-size:.9rem;
.mw-parser-output .fr-card .fr-meta,
}
.mw-parser-output .fa-card .fa-footer,
.mw-parser-output .fr-card .fr-footer { margin-top: auto; }


/* optional: shave a bit of vertical space on the pills row */
.fa-cta a{
.mw-parser-output .fa-card .fa-pills,
  color:#1f4d36;
.mw-parser-output .fr-card .fr-pills { gap: 6px; }
  text-decoration:none;
  font-weight:600;
}


/* keep card heights reasonable (remove if you want fully auto heights) */
.fa-cta a:hover{
.mw-parser-output .fa-card,
  text-decoration:underline;
.mw-parser-output .fr-card { min-height: 0; }
}

Latest revision as of 22:57, 19 January 2026

/* Featured Region Cards (Home) */

.fa-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:16px;
  margin:12px 0 24px;
}

@media (max-width: 1024px){
  .fa-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px){
  .fa-grid{ grid-template-columns:1fr; }
}

/* Card */
.fa-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .15s ease, box-shadow .2s ease;
  height:100%;
}

.fa-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(0,0,0,.12);
}

/* Media */
.fa-media{
  position:relative;
  background:#f3f4f6;
  border-bottom:1px solid #eef2f7;
}

/* 16:9 ratio */
.fa-media::before{
  content:"";
  display:block;
  width:100%;
  padding-top:56.25%;
}

.fa-img{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
}

/* MediaWiki file wrapper quirks */
.fa-img a,
.fa-img .image,
.fa-img .mw-file-element,
.fa-img img{
  display:block;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover;
  object-position:center;
}

/* Placeholder that still looks designed */
.fa-img--placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.95rem;
  color:#6b7280;
  background:
    radial-gradient(1200px 300px at 10% 0%, rgba(45,106,79,.18), transparent 60%),
    radial-gradient(900px 260px at 90% 10%, rgba(16,185,129,.14), transparent 55%),
    #f3f4f6;
}

/* Body */
.fa-body{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px 16px 16px;
  min-height:0;
}

/* Title */
.fa-title{
  margin:0;
  font-size:1.05rem;
  font-weight:700;
  line-height:1.25;
}

.fa-title a{
  color:#1f4d36; /* brand-ish green */
  text-decoration:none;
}

.fa-title a:hover{
  text-decoration:underline;
}

/* Kicker */
.fa-kicker{
  margin:0;
  font-size:.85rem;
  color:#6b7280;
}

.k-item{
  display:inline-block;
  line-height:1.35;
}

.fa-hook{
  margin:0;
  color:#374151;
  font-size:.93rem;
  line-height:1.5;

  /* 3-line clamp without webkit */
  display:block;
  max-height:4.5em;   /* 1.5 * 3 lines */
  overflow:hidden;
}

/* Footer pinned to bottom */
.fa-foot{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:4px;
}

.fa-foot-sep{
  height:1px;
  background:#eef2f7;
}

/* Status line */
.fa-statusline{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

/* Pills */
.status-pill,
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:6px 10px;
  font-size:.82rem;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  color:#374151;
  line-height:1;
}

.pill-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#9ca3af;
}

/* Status variants */
.sp--endangered{ background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.25); }
.sp--endangered .pill-dot{ background:#ef4444; }

.sp--vulnerable{ background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.28); }
.sp--vulnerable .pill-dot{ background:#f59e0b; }

.sp--near\ threatened,
.sp--near-threatened{ background:rgba(234,179,8,.10); border-color:rgba(234,179,8,.28); }
.sp--near\ threatened .pill-dot,
.sp--near-threatened .pill-dot{ background:#eab308; }

.sp--least\ concern,
.sp--least-concern{ background:rgba(16,185,129,.10); border-color:rgba(16,185,129,.28); }
.sp--least\ concern .pill-dot,
.sp--least-concern .pill-dot{ background:#10b981; }

.sp--unknown{ background:#f3f4f6; border-color:#e5e7eb; }
.sp--unknown .pill-dot{ background:#9ca3af; }

.pill--access .pill-num{
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

/* CTA */
.fa-cta{
  margin:0;
  font-size:.9rem;
}

.fa-cta a{
  color:#1f4d36;
  text-decoration:none;
  font-weight:600;
}

.fa-cta a:hover{
  text-decoration:underline;
}