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
Line 17: Line 17:
/* Override main page card styles that might be interfering */
/* Override main page card styles that might be interfering */
.fr-grid .home-card,
.fr-grid .home-card,
.fr-grid [class*="home-card"],
.fr-grid [class*="home-card"] {
.fr-card.home-card {
   background: transparent !important;
   background: transparent !important;
   border: none !important;
   border: none !important;
Line 28: Line 27:


/* Reset any MediaWiki template container styling */
/* Reset any MediaWiki template container styling */
.fr-grid > *,
.fr-grid > div,
.fr-grid > * > * {
.fr-grid > span {
   border: none !important;
   border: none !important;
   background: transparent !important;
   background: transparent !important;
Line 37: Line 36:
}
}


/* Target common MediaWiki template wrapper classes */
/* Ensure cards have their proper styling restored */
.fr-grid .template,
.fr-grid .mw-parser-output,
.fr-grid [class*="template"] {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}
 
/* Ensure cards have their own styling */
.fr-card {
.fr-card {
  background: #fff !important;
   border: 1px solid #e5e7eb !important;
   border: 1px solid #e5e7eb !important;
   background: #fff !important;
   border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  transition: all 0.2s ease !important;
  position: relative !important;
   margin: 0 !important;
   margin: 0 !important;
   padding: 0 !important;
   padding: 0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
}
}



Revision as of 07:27, 25 August 2025

/* FeaturedRegionCard — TemplateStyles-safe (strict) — FIXED VERSION */

/* Grid on main page */
.fr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 1.5rem;
  align-items: stretch;
  margin: 0 auto;
  max-width: 1200px;
  /* Override MediaWiki container styles */
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

/* Override main page card styles that might be interfering */
.fr-grid .home-card,
.fr-grid [class*="home-card"] {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: auto !important;
}

/* Reset any MediaWiki template container styling */
.fr-grid > div,
.fr-grid > span {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Ensure cards have their proper styling restored */
.fr-card {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Card */
.fr-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.2s ease;
  position: relative;
}
.fr-card:hover { 
  box-shadow: 0 8px 25px rgba(0,0,0,.12);
}

/* Media */
.fr-media {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f8fafc;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.fr-img { 
  width: 100%; 
  height: 100%; 
  display: block; 
  position: relative;
}
.fr-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Enhanced gradient overlay for better 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,.4) 0%, 
    rgba(0,0,0,.2) 25%,
    rgba(0,0,0,0) 50%
  );
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  z-index: 1;
}

/* Placeholder */
.fr-img--placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 500;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* Make whole image clickable */
.fr-media-link,
.fr-media-link a {
  position: absolute; 
  top: 0; right: 0; bottom: 0; left: 0;
  display: block;
  z-index: 2;
}
.fr-media-link a { 
  text-decoration: none; 
}
.fr-media-link a:focus { 
  outline: 3px solid #059669; 
  outline-offset: 2px; 
  border-radius: 12px; 
}

/* Badge (status + accessions) - MAJOR IMPROVEMENTS */
.fr-badge {
  position: absolute; 
  left: 16px; 
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 24px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.3);
  font-size: .875rem; 
  font-weight: 600; 
  color: #374151;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 3;
  white-space: nowrap;
  line-height: 1;
}

.fr-dot { 
  width: 8px; 
  height: 8px; 
  border-radius: 50%; 
  display: inline-block; 
  margin-right: 8px; 
  flex-shrink: 0;
}

.fr-badgelabel { 
  margin-right: 2px;
}

.fr-badge .fr-sep { 
  color: #9ca3af; 
  margin: 0 8px;
  font-weight: 400;
}

.fr-badge .fr-acc { 
  color: #6b7280; 
  font-weight: 500;
  font-size: .8rem;
}

/* Enhanced dot colors by status */
.fr--status-stable .fr-dot { background: #22c55e; }
.fr--status-vulnerable .fr-dot { background: #eab308; }
.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 - IMPROVED SPACING */
.fr-body {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Title - BETTER LINE HEIGHT AND SPACING */
.fr-title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #1f2937;
  font-weight: 700;
  overflow: hidden;
}
.fr-title a { 
  color: #1f2937; 
  text-decoration: none; 
  transition: color 0.15s ease;
}
.fr-title a:hover { 
  color: #059669; 
  text-decoration: underline; 
}

/* Subtitle - IMPROVED TRUNCATION */
.fr-sub {
  margin: 0 0 16px;
  font-size: .9rem;
  color: #6b7280;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hook - BETTER TEXT CLAMPING */
.fr-hook {
  margin: 0 0 20px;
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.5;
  max-height: 4.5em;
  overflow: hidden;
  flex: 1;
}

/* CTA - IMPROVED STYLING */
.fr-cta { 
  margin: 0; 
  margin-top: auto; 
  padding-top: 4px;
}
.fr-cta a {
  color: #059669;
  font-weight: 600;
  text-decoration: none;
  font-size: .95rem;
  padding: 8px 0;
  transition: all 0.15s ease;
}
.fr-cta a:hover { 
  color: #047857; 
  text-decoration: underline;
}
.fr-missing { 
  color: #9ca3af; 
  font-style: italic; 
  font-size: .9rem; 
  font-weight: 500;
}

/* Responsive - ENHANCED BREAKPOINTS */
@media (min-width: 1024px) { 
  .fr-media { height: 220px; }
  .fr-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .fr-grid { 
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1.25rem;
  }
  .fr-media { height: 190px; }
}

@media (max-width: 767px) {
  .fr-grid { 
    grid-template-columns: 1fr;
    grid-gap: 1.25rem;
    margin: 0 1rem;
  }
  .fr-media { height: 180px; }
  .fr-body { padding: 16px 18px 20px; }
  .fr-title { font-size: 1.125rem; }
  .fr-sub { font-size: .85rem; }
  .fr-hook { font-size: .95rem; }
  .fr-badge {
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    font-size: .8rem;
  }
  .fr-badge .fr-acc { font-size: .75rem; }
}