Toggle menu
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
 
(6 intermediate revisions by the same user not shown)
Line 4: Line 4:


/* Grid wrapper (used on Main Page) */
/* Grid wrapper (used on Main Page) */
.fr-grid {
.fa-grid {
   display: grid;
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
Line 27: Line 27:
.fa-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.fa-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }


/* --- 16:9 banner with cover, no @supports --- */
/* --- 16:9 banner with cover --- */
.fa-media {
.fa-media {
   position: relative;
   position: relative;
   overflow: hidden;
   overflow: hidden;
   background: #f3f4f6;
   background: #f3f4f6;
   line-height: 0;         /* remove inline-img baseline gap */
   line-height: 0;       /* remove inline-img baseline gap */
  height: auto;            /* ensure no fixed height remains */
   border-bottom: 1px solid #eef2f7;
   border-bottom: 1px solid #eef2f7;
}
}
Line 40: Line 39:
   display: block;
   display: block;
   width: 100%;
   width: 100%;
   padding-top: 56.25%;     /* 16:9 ratio */
   padding-top: 56.25%; /* 16:9 ratio */
}
}


/* Fill the box */
/* Fill the box */
.fa-img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.fa-img { position: absolute; inset: 0; }
.fa-img,
.fa-img,
.fa-img a,
.fa-img a,
Line 64: Line 63:
   object-position: center center;
   object-position: center center;
}
}
/* keep card footers aligned */
.fa-body { display: flex; flex-direction: column; }
.fa-cta { margin-top: auto; }


/* Placeholder */
/* Placeholder */
Line 84: Line 78:
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   gap: 8px; /* consistent vertical rhythm */
   gap: 8px;
}
 
/* Title (now directly under image) */
.fa-title {
  margin: 8px 0 2px 0;
  line-height: 1.2;
  font-size: 1.125rem; /* 18px */
  color: #1f2937;
}
}
.fa-title a { color: inherit; text-decoration: none; }
.fa-title a:hover { text-decoration: underline; }


/* Kicker (status + path) */
/* Kicker (path) */
.fa-kicker {
.fa-kicker {
   margin: 0;
   margin: 0 0 8px 0;
   color: #6b7280;
   color: #6b7280;
   font-size: .88rem;
   font-size: .88rem;
Line 98: Line 102:
}
}
.k-item { display: inline-flex; align-items: center; gap: 4px; }
.k-item { display: inline-flex; align-items: center; gap: 4px; }
.fa-status { font-weight: 700; color: #374151; }
/* Title */
.fa-title {
  margin: 0;
  font-size: 1.125rem; /* 18px */
  line-height: 1.25;
  color: #1f2937;
}
.fa-title a { color: inherit; text-decoration: none; }
.fa-title a:hover { text-decoration: underline; }


/* Subline (location) */
/* Province line (avoid redundant country) */
.fa-sub {
.fa-sub { margin: 0 0 6px 0; color: #6b7280; }
  margin: 0;
  color: #4b5563;
  font-size: .92rem;
}


/* Provenance/meta (dot-separated via CSS) */
/* Meta (dot-separated) */
.fa-provenance {
.fa-provenance {
   margin: 0;
   margin: 0 0 8px 0;
   color: #64748b;
   color: #64748b;
   font-size: .88rem;
   font-size: .88rem;
Line 132: Line 121:
}
}
.fa-provenance .pv-item + .pv-item::before {
.fa-provenance .pv-item + .pv-item::before {
   content: "·";
   content: "";
   margin: 0 8px;
   padding: 0 6px;
   color: #cbd5e1;
   color: #9ca3af;
}
}


/* Hook (one-line pitch) */
/* Hook (one-line pitch) */
.fa-hook {
.fa-hook { margin: 0; color: #334155; font-size: .95rem; }
  margin: 0;
 
  color: #334155;
/* Footer (pinned) */
  font-size: .95rem;
.fa-foot {
  margin-top: auto;              /* push footer to bottom */
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}
}
/* 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 */
/* CTA */
.fa-cta {
.fa-cta { margin: 0; font-weight: 600; }
  margin: 2px 0 0 0;
  font-weight: 600;
}
.fa-cta a {
.fa-cta a {
   color: #2d5016;
   color: #2d5016;
Line 158: Line 157:
.fa-cta .fa-missing { color: #6b7280; }
.fa-cta .fa-missing { color: #6b7280; }


/* Badges (kept for future use if needed) */
/* ---------- Pills (shared base) ---------- */
.fa-badge {
.pill,
   display: inline-block;
.status-pill {
   font-size: .75rem;
   display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
   font-size: .9rem;
   line-height: 1;
   line-height: 1;
   padding: 4px 6px;
   border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #1f2937;
}
/* Tiny dot (used by status + area) */
.pill-dot {
  width: 8px;
  height: 8px;
   border-radius: 999px;
   border-radius: 999px;
   background: #eef2ff;
   background: #9ca3af;
  color: #3730a3;
  border: 1px solid #e5e7eb;
}
}
.fa-badge--tier { background: #ecfeff; color: #155e75; }
.fa-badge--pres { background: #f0fdf4; color: #166534; }


/* Make body a column so footer can sit at the bottom cleanly */
/* ---------- Conservation status (colored) ---------- */
.fa-body {
.status-pill {
   display: flex;
   background: #f3f4f6;
   flex-direction: column;
   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; }
.sp--vulnerable .pill-dot { background: #b45309; }
.sp--endangered .pill-dot { background: #b91c1c; }
.sp--critical .pill-dot  { background: #991b1b; }
.sp--extinct .pill-dot    { background: #111827; }
.sp--unknown .pill-dot    { background: #9ca3af; }


/* Footer wrapper places Status above CTA and gives a subtle divider */
/* ---------- Growing area (neutral) ---------- */
.fa-foot {
.pill--area {
   margin-top: auto;          /* pushes footer block to the bottom of the card */
   background: #f8fafc;          /* light neutral */
   border-top: 1px solid #e5e7eb;
   border-color: #e5e7eb;
   padding-top: 10px;
   color: #1f2937;
}
}
/* keep the dot visible but neutral */
.pill--area .pill-dot { background: #6b7280; }


/* Status line near CTA */
/* ---------- Accessions (neutral number + label) ---------- */
.fa-statusline {  
.pill--access {
   margin: 0 0 6px 0;  
   background: #eff6ff;           /* light blue */
   font-weight: 600;  
   border-color: #dbeafe;        /* blue-100 */
  color: #1f2937;
}
}
 
.pill--access .pill-dot { display: none; }
/* Divider between status and CTA */
.pill--access .pill-num { font-weight: 700; }
.fa-foot-sep {
.pill--access .pill-label {
   height: 1px;
   font-weight: 600;
   background: #e5e7eb;
   color: #6b7280;
   margin: 8px 0;
   font-size: .9rem;
}
}
/* Reuse your existing .fa-status text color/weight if defined; harmless otherwise */
.fa-cta { margin: 0; }


/* Small screens */
/* Small screens */
@media (max-width: 480px) {
@media (max-width: 480px) {
  .fa-media { height: 160px; }
   .fa-body { padding: 12px 14px 14px 14px; gap: 6px; }
   .fa-body { padding: 12px 14px 14px 14px; gap: 6px; }
   .fa-title { font-size: 1.05rem; }
   .fa-title { font-size: 1.05rem; }
   .fa-provenance { font-size: .86rem; }
   .fa-provenance { font-size: .86rem; }
}
}
/* Hard cap the media height so wide screens don't blow it up */
.fa-media { max-height: 420px; }
@media (max-width: 600px) { .fa-media { max-height: 240px; } }

Latest revision as of 06:38, 26 August 2025

/* ================================
   FeaturedRegionCard — TemplateStyles-safe CSS
   ================================ */

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

/* Card shell */
.fa-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  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 --- */
.fa-media {
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
  line-height: 0;       /* remove inline-img baseline gap */
  border-bottom: 1px solid #eef2f7;
}
.fa-media::before {
  content: "";
  display: block;
  width: 100%;
  padding-top: 56.25%;  /* 16:9 ratio */
}

/* Fill the box */
.fa-img { position: absolute; inset: 0; }
.fa-img,
.fa-img a,
.fa-media .image,
.fa-media .mw-file-description {
  display: block;
  width: 100%;
  height: 100%;
}

/* Actual <img> element */
.fa-media img,
.fa-media .mw-file-element {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center center;
}

/* Placeholder */
.fa-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: .9rem;
}

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

/* Title (now directly under image) */
.fa-title {
  margin: 8px 0 2px 0;
  line-height: 1.2;
  font-size: 1.125rem; /* 18px */
  color: #1f2937;
}
.fa-title a { color: inherit; text-decoration: none; }
.fa-title a:hover { text-decoration: underline; }

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

/* Province line (avoid redundant country) */
.fa-sub { margin: 0 0 6px 0; color: #6b7280; }

/* Meta (dot-separated) */
.fa-provenance {
  margin: 0 0 8px 0;
  color: #64748b;
  font-size: .88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.fa-provenance .pv-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.fa-provenance .pv-item + .pv-item::before {
  content: "•";
  padding: 0 6px;
  color: #9ca3af;
}

/* Hook (one-line pitch) */
.fa-hook { margin: 0; color: #334155; font-size: .95rem; }

/* Footer (pinned) */
.fa-foot {
  margin-top: auto;               /* push footer to bottom */
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}
/* 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 */
.fa-cta { margin: 0; font-weight: 600; }
.fa-cta a {
  color: #2d5016;
  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) ---------- */
.pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  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) ---------- */
.status-pill {
  background: #f3f4f6;
  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; }
.sp--vulnerable .pill-dot { background: #b45309; }
.sp--endangered .pill-dot { background: #b91c1c; }
.sp--critical .pill-dot   { background: #991b1b; }
.sp--extinct .pill-dot    { background: #111827; }
.sp--unknown .pill-dot    { background: #9ca3af; }

/* ---------- 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) ---------- */
.pill--access {
  background: #eff6ff;           /* light blue */
  border-color: #dbeafe;         /* blue-100 */
  color: #1f2937;
}
.pill--access .pill-dot { display: none; }
.pill--access .pill-num { font-weight: 700; }
.pill--access .pill-label {
  font-weight: 600;
  color: #6b7280;
  font-size: .9rem;
}

/* Small screens */
@media (max-width: 480px) {
  .fa-body { padding: 12px 14px 14px 14px; gap: 6px; }
  .fa-title { font-size: 1.05rem; }
  .fa-provenance { font-size: .86rem; }
}

/* Hard cap the media height so wide screens don't blow it up */
.fa-media { max-height: 420px; }
@media (max-width: 600px) { .fa-media { max-height: 240px; } }