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
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* FeaturedRegionCard — TemplateStyles-safe (strict) */
/* FeaturedRegionCard — TemplateStyles-safe, minimal */


/* Grid on main page */
/* Grid wrapper (use on Main Page section) */
.fr-grid {
.fr-grid {
   display: grid;
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
   grid-gap: 1rem;           /* use grid-gap (no 'gap') */
   gap: 16px;
   align-items: stretch;
   align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}
}


/* Card */
/* Card */
.fr-card {
.fr-card {
   background: #fff;
  display: flex;
  flex-direction: column;
   background: #ffffff;
   border: 1px solid #e5e7eb;
   border: 1px solid #e5e7eb;
   border-radius: 12px;
   border-radius: 12px;
   overflow: hidden;
   overflow: hidden;
   box-shadow: 0 1px 2px rgba(0,0,0,.03);
   box-shadow: 0 1px 2px rgba(0,0,0,.04);
   display: flex;
   transition: box-shadow .2s ease;
  flex-direction: column;
  height: 100%;
}
}
.fr-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.fr-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }


/* Media */
/* Media */
.fr-media {
.fr-media {
   position: relative;
   position: relative;
   height: 180px;
   height: 200px;
  background: #f3f4f6;
   overflow: hidden;
   overflow: hidden;
  background: #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
}
.fr-img { width: 100%; height: 100%; display: block; }
.fr-img,
.fr-img img {
.fr-img a { display: block; height: 100%; }
.fr-img img,
.fr-img .mw-file-element {
   display: block;
   display: block;
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
   object-fit: cover;       /* keep; if rejected, swap to height:auto */
   object-fit: cover;
}
  object-position: center;
 
/* Bottom gradient for badge readability */
.fr-media::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(to top, rgba(0,0,0,.22) 0%, rgba(0,0,0,0) 35%);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  z-index: 0;
}
}


/* Placeholder */
/* make whole image clickable when Page= exists */
.fr-img--placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #6b7280;
  font-size: .9rem;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}
 
/* Make whole image clickable (template adds the link) */
.fr-media-link,
.fr-media-link,
.fr-media-link a {
.fr-media-link a {
   position: absolute; top: 0; right: 0; bottom: 0; left: 0;
   position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
   display: block;
   display: block;
   z-index: 1;
   text-decoration: none;
}
}
.fr-media-link a { text-decoration: none; }
.fr-media-link a:focus { outline: 2px solid #059669; outline-offset: 2px; border-radius: 8px; }


/* Badge (status + accessions) */
/* Body */
.fr-badge {
.fr-body { padding: 16px 18px 18px; display: flex; flex-direction: column; }
  position: absolute; left: 16px; bottom: 10px;
.fr-title { margin: 0; font-size: 1.125rem; line-height: 1.25; color: #1f2937; font-weight: 700; }
  display: inline-block;
.fr-title a { color: #1f2937; text-decoration: none; }
  padding: 4px 10px;
.fr-title a:hover { text-decoration: underline; color: #059669; }
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  border: 1px solid #e6e6e6;
  font-size: .85rem; font-weight: 600; color: #374151;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  z-index: 2;
  white-space: nowrap;
}
.fr-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.fr-badgelabel { vertical-align: middle; }
.fr-badge .fr-sep { color: #9ca3af; margin: 0 6px; }
.fr-badge .fr-acc { color: #6b7280; font-weight: 600; }


/* Dot colors by status */
.fr-sub { margin: 2px 0 8px 0; color: #6b7280; font-size: .9rem; line-height: 1.3; }
.fr--status-stable .fr-dot { background: #16a34a; }
.fr--status-vulnerable .fr-dot { background: #ca8a04; }
.fr--status-endangered .fr-dot { background: #f97316; }
.fr--status-critical .fr-dot { background: #ef4444; }
.fr--status-extinct .fr-dot { background: #6b7280; }
.fr--status-unknown .fr-dot { background: #9ca3af; }


/* Body */
/* Status chip */
.fr-body {
.fr-status {
   padding: 12px 16px 14px;
  display: inline-flex;
   flex: 1;
  align-items: center;
   display: flex;
   padding: 6px 12px;
   flex-direction: column;
   border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
   font-weight: 600;
   font-size: .85rem;
  color: #374151;
  margin: 2px 0 10px 0;
}
}
 
.fr-status .fr-dot {
/* Title (reserve two lines for even stacks) */
   width: 8px; height: 8px; border-radius: 50%;
.fr-title {
   display: inline-block; margin-right: 8px;
   margin: .05rem 0 .3rem;
  font-size: 1.15rem;
  line-height: 1.25;
   color: #1f2937;
  font-weight: 600;
  min-height: 2.5em;
}
}
.fr-title a { color: #1f2937; text-decoration: none; }
.fr-status .fr-sep { margin: 0 8px; color: #9ca3af; font-weight: 400; }
.fr-title a:hover { color: #059669; text-decoration: underline; }
.fr-status .fr-acc { color: #6b7280; font-weight: 500; }


/* Subtitle (single line, ellipsized) */
/* Dot colors controlled by card’s status class */
.fr-sub {
.fr--status-stable .fr-status .fr-dot { background: #22c55e; }
  margin: 0 0 .45rem;
.fr--status-vulnerable .fr-status .fr-dot { background: #eab308; }
  font-size: .85rem;
.fr--status-endangered .fr-status .fr-dot { background: #f97316; }
  color: #6b7280;
.fr--status-critical .fr-status .fr-dot { background: #ef4444; }
  line-height: 1.3;
.fr--status-extinct .fr-status .fr-dot { background: #6b7280; }
  white-space: nowrap;
.fr--status-unknown .fr-status .fr-dot { background: #9ca3af; }
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2em;
}


/* Hook (3-line clamp via max-height) */
/* Hook + CTA */
.fr-hook {
.fr-hook {
   margin: 0 0 .6rem;
   margin: 0 0 10px 0;
  font-size: .95rem;
   color: #4b5563;
   color: #374151;
   line-height: 1.45;
   line-height: 1.35;
   max-height: 4.5em; /* 3 lines */
   max-height: 4.05em;
   overflow: hidden;
   overflow: hidden;
  flex: 1;
}
}
.fr-cta { margin-top: auto; }
.fr-cta a { color: #059669; font-weight: 600; text-decoration: none; }
.fr-cta a:hover { text-decoration: underline; color: #047857; }
.fr-missing { color: #9ca3af; font-style: italic; }


/* CTA */
/* Responsive tweaks */
.fr-cta { margin: 0; margin-top: auto; }
@media (min-width: 1024px) { .fr-media { height: 220px; } }
.fr-cta a {
@media (max-width: 480px)  { .fr-media { height: 180px; } }
   display: inline-block;         /* no inline-flex */
 
   color: #059669;
 
   font-weight: 600;
/* --- kill any MW wrapper styling around each card --- */
   text-decoration: none;
.fr-grid > * {
   font-size: .9rem;
   background: transparent !important;
   padding: 4px 0;
   border: 0 !important;
   border-radius: 0 !important;
   box-shadow: none !important;
   padding: 0 !important;
   margin: 0 !important;
}
}
.fr-cta a:hover { color: #047857; text-decoration: underline; }
.fr-missing { color: #9ca3af; font-style: normal; font-size: .9rem; }


/* Responsive */
/* --- lock the status chip to its intended size --- */
@media (min-width: 960px) { .fr-media { height: 210px; } }
.fr-status {
@media (max-width: 480px) {
  display: inline-flex !important;
   .fr-grid { grid-gap: 1rem; }
  align-items: center !important;
   .fr-media { height: 170px; }
  padding: 6px 12px !important;
   .fr-body { padding: 10px 14px 14px; }
  margin: 4px 0 12px 0 !important;
   .fr-title { font-size: 1.1rem; }
   background: #f8fafc !important;
   .fr-sub { font-size: .8rem; }
   border: 1px solid #e5e7eb !important;
   .fr-hook { font-size: .9rem; }
   border-radius: 999px !important;
   width: auto !important;
   height: auto !important;
   box-shadow: none !important;
}
}
.fr-status::before,
.fr-status::after { content: none !important; }  /* in case a skin adds pseudo-elements */

Latest revision as of 08:14, 25 August 2025

/* FeaturedRegionCard — TemplateStyles-safe, minimal */

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

/* Card */
.fr-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;
}
.fr-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* Media */
.fr-media {
  position: relative;
  height: 200px;
  background: #f3f4f6;
  overflow: hidden;
}
.fr-img,
.fr-img a { display: block; height: 100%; }
.fr-img img,
.fr-img .mw-file-element {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* make whole image clickable when Page= exists */
.fr-media-link,
.fr-media-link a {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: block;
  text-decoration: none;
}

/* Body */
.fr-body { padding: 16px 18px 18px; display: flex; flex-direction: column; }
.fr-title { margin: 0; font-size: 1.125rem; line-height: 1.25; color: #1f2937; font-weight: 700; }
.fr-title a { color: #1f2937; text-decoration: none; }
.fr-title a:hover { text-decoration: underline; color: #059669; }

.fr-sub { margin: 2px 0 8px 0; color: #6b7280; font-size: .9rem; line-height: 1.3; }

/* Status chip */
.fr-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: .85rem;
  color: #374151;
  margin: 2px 0 10px 0;
}
.fr-status .fr-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 8px;
}
.fr-status .fr-sep { margin: 0 8px; color: #9ca3af; font-weight: 400; }
.fr-status .fr-acc { color: #6b7280; font-weight: 500; }

/* Dot colors controlled by card’s status class */
.fr--status-stable .fr-status .fr-dot { background: #22c55e; }
.fr--status-vulnerable .fr-status .fr-dot { background: #eab308; }
.fr--status-endangered .fr-status .fr-dot { background: #f97316; }
.fr--status-critical .fr-status .fr-dot { background: #ef4444; }
.fr--status-extinct .fr-status .fr-dot { background: #6b7280; }
.fr--status-unknown .fr-status .fr-dot { background: #9ca3af; }

/* Hook + CTA */
.fr-hook {
  margin: 0 0 10px 0;
  color: #4b5563;
  line-height: 1.45;
  max-height: 4.5em; /* 3 lines */
  overflow: hidden;
}
.fr-cta { margin-top: auto; }
.fr-cta a { color: #059669; font-weight: 600; text-decoration: none; }
.fr-cta a:hover { text-decoration: underline; color: #047857; }
.fr-missing { color: #9ca3af; font-style: italic; }

/* Responsive tweaks */
@media (min-width: 1024px) { .fr-media { height: 220px; } }
@media (max-width: 480px)  { .fr-media { height: 180px; } }


/* --- kill any MW wrapper styling around each card --- */
.fr-grid > * {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* --- lock the status chip to its intended size --- */
.fr-status {
  display: inline-flex !important;
  align-items: center !important;
  padding: 6px 12px !important;
  margin: 4px 0 12px 0 !important;
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 999px !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}
.fr-status::before,
.fr-status::after { content: none !important; }  /* in case a skin adds pseudo-elements */