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
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* TemplateStyles-Safe Enhanced FeaturedRegionCard CSS */
/* FeaturedRegionCard — TemplateStyles-safe, minimal */
/* Removes webkit properties and other unsupported features */


/* Grid container - enhanced with better mobile handling */
/* 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));
   gap: 1rem;
   gap: 16px;
   align-items: stretch;
   align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}
}


/* Card shell - enhanced with hover states and flex layout */
/* 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%;
   transition: all 0.2s ease;
}
.fr-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
}
.fr-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }


/* Media section - enhanced with consistent aspect ratio */
/* Media */
.fr-media {
.fr-media {
  position: relative;
  height: 200px;
   background: #f3f4f6;
   background: #f3f4f6;
  position: relative;
  height: 180px;
   overflow: hidden;
   overflow: hidden;
  flex-shrink: 0;
}
}
.fr-img {
.fr-img,
  width: 100%;
.fr-img a { display: block; height: 100%; }
  height: 100%;
.fr-img img,
  display: block;
.fr-img .mw-file-element {
}
.fr-img img {
   display: block;
   display: block;
   width: 100%;
   width: 100%;
Line 47: Line 41:
   object-position: center;
   object-position: center;
}
}
.fr-img--placeholder {
 
   display: flex;
/* make whole image clickable when Page= exists */
   align-items: center;
.fr-media-link,
  justify-content: center;
.fr-media-link a {
  height: 100%;
   position: absolute;
  color: #6b7280;
   top: 0; right: 0; bottom: 0; left: 0;
   font-size: .9rem;
   display: block;
   background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
   text-decoration: none;
}
}


/* Body content - enhanced with flex growth */
/* Body */
.fr-body {
.fr-body { padding: 16px 18px 18px; display: flex; flex-direction: column; }
  padding: 12px 16px 16px;
.fr-title { margin: 0; font-size: 1.125rem; line-height: 1.25; color: #1f2937; font-weight: 700; }
  flex: 1;
.fr-title a { color: #1f2937; text-decoration: none; }
  display: flex;
.fr-title a:hover { text-decoration: underline; color: #059669; }
  flex-direction: column;
 
}
.fr-sub { margin: 2px 0 8px 0; color: #6b7280; font-size: .9rem; line-height: 1.3; }


/* Kicker line - enhanced spacing */
/* Status chip */
.fr-kicker {
.fr-status {
   margin: 0 0 .25rem;
   display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-weight: 600;
   font-size: .85rem;
   font-size: .85rem;
   color: #374151;
   color: #374151;
  display: flex;
   margin: 2px 0 10px 0;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.fr-status {
  font-weight: 600;
}
.fr-sep {
  color: #9ca3af;
   margin: 0 .25rem;
}
.fr-acc {
  color: #6b7280;
  font-weight: 500;
}
 
/* Title - enhanced hover states */
.fr-title {
  margin: .15rem 0 .35rem;
  font-size: 1.15rem;
  line-height: 1.25;
  color: #1f2937;
  font-weight: 600;
}
}
.fr-title a {
.fr-status .fr-dot {
   color: inherit;
   width: 8px; height: 8px; border-radius: 50%;
  text-decoration: none;
   display: inline-block; margin-right: 8px;
}
.fr-title a:hover {
   color: #059669;
  text-decoration: underline;
}
}
.fr-status .fr-sep { margin: 0 8px; color: #9ca3af; font-weight: 400; }
.fr-status .fr-acc { color: #6b7280; font-weight: 500; }


/* Subtitle - enhanced readability */
/* Dot colors controlled by card’s status class */
.fr-sub {
.fr--status-stable .fr-status .fr-dot { background: #22c55e; }
  margin: 0 0 .5rem;
.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; }
}
.fr--status-unknown .fr-status .fr-dot { background: #9ca3af; }


/* Hook - enhanced with height control (no webkit properties) */
/* Hook + CTA */
.fr-hook {
.fr-hook {
   margin: 0 0 .75rem;
   margin: 0 0 10px 0;
  font-size: .95rem;
   color: #4b5563;
   color: #374151;
   line-height: 1.45;
   line-height: 1.4;
   max-height: 4.5em; /* 3 lines */
  flex: 1;
 
  /* Alternative to webkit-line-clamp using max-height */
   max-height: 5.6em; /* 4 lines at 1.4 line-height */
   overflow: hidden;
   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; }


/* CTA - enhanced with better button styling */
/* Responsive tweaks */
.fr-cta {
@media (min-width: 1024px) { .fr-media { height: 220px; } }
  margin: 0;
@media (max-width: 480px) { .fr-media { height: 180px; } }
  margin-top: auto;
}
.fr-cta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  font-weight: 600;
  text-decoration: none;
  font-size: .9rem;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.fr-cta a:hover {
  color: #047857;
  text-decoration: underline;
}
.fr-missing {
  color: #9ca3af;
  font-style: italic;
  font-size: .9rem;
}
 
/* Mobile responsive enhancements */
@media (max-width: 768px) {
  .fr-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}


@media (max-width: 480px) {
  .fr-grid {
    gap: 1rem;
  }
 
  .fr-media {
    height: 160px;
  }
 
  .fr-body {
    padding: 10px 14px 14px;
  }
 
  .fr-kicker {
    font-size: .8rem;
    gap: .4rem;
  }
 
  .fr-title {
    font-size: 1.1rem;
    margin: .1rem 0 .3rem;
  }
 
  .fr-sub {
    font-size: .8rem;
  }
 
  .fr-hook {
    font-size: .9rem;
    max-height: 4.05em; /* 3 lines at 1.35 line-height */
    line-height: 1.35;
  }
}


@media (max-width: 360px) {
/* --- kill any MW wrapper styling around each card --- */
  .fr-grid {
.fr-grid > * {
    grid-template-columns: minmax(260px, 1fr);
  background: transparent !important;
  }
   border: 0 !important;
 
   border-radius: 0 !important;
  .fr-media {
   box-shadow: none !important;
    height: 140px;
   padding: 0 !important;
   }
   margin: 0 !important;
 
  .fr-body {
    padding: 8px 12px 12px;
   }
 
  .fr-kicker {
    font-size: .75rem;
   }
 
  .fr-title {
    font-size: 1rem;
   }
 
  .fr-sub {
    font-size: .75rem;
   }
 
  .fr-hook {
    font-size: .85rem;
    line-height: 1.3;
    max-height: 3.3em; /* ~3 lines */
  }
}
}


/* Accessibility improvements - TemplateStyles safe */
/* --- lock the status chip to its intended size --- */
@media (prefers-reduced-motion: reduce) {
.fr-status {
   .fr-card:hover {
  display: inline-flex !important;
    transform: none;
  align-items: center !important;
   }
  padding: 6px 12px !important;
   .fr-card,
   margin: 4px 0 12px 0 !important;
   .fr-cta a {
  background: #f8fafc !important;
    transition: none;
   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 */

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 */