Jump to content

Template:Entity layout/styles.css

From PokeNexus Wiki
/* ==========================================================
   PokeNexus Wiki — Shared entity layout

   Shared by structured content pages such as:
   - Items
   - Pokémon
   - Abilities
   - Achievements
   - Moves

   This file owns layout and generic infobox presentation only.
   Entity-specific styling belongs in that entity's stylesheet.
   ========================================================== */

/* ==========================================================
   Entity page layout
   ========================================================== */

.pn-entity {
  margin-block: 0;
}

.pn-entity__content {
  min-width: 0;
}

.pn-entity__content > .mw-heading:first-child {
  margin-block-start: 0;
}

.mw-heading {
  padding-block-start: 0;
}

.pn-entity__aside {
  float: right;

  width: 20rem;
  max-width: 100%;

  margin: 0 0 1.5rem 2rem;
}

/* ==========================================================
   Shared infobox
   ========================================================== */

.pn-infobox {
  overflow: hidden;

  background-color: var(--background-color-neutral-subtle, #eee6d8);

  color: var(--color-base, #312b25);

  border: 1px solid #b29f86;
  border-radius: 0.6rem;

  box-shadow: 0 1px 3px rgba(49, 43, 37, 0.08);
}

/* ----------------------------------------------------------
   Infobox title
   ---------------------------------------------------------- */

.pn-infobox__title {
  margin: 0;
  padding: 0.8rem 1rem;

  background-color: var(--background-color-neutral, #e0d6c4);

  color: var(--color-emphasized, #211d19);

  border: 0;

  font-family: "Roboto", Arial, sans-serif;

  font-size: 1.35rem;
  font-weight: 700;

  line-height: 1.2;
  text-align: center;
}

/* ----------------------------------------------------------
   Infobox image / media
   ---------------------------------------------------------- */

.pn-infobox__media {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 8rem;

  padding: 1.25rem;

  background-color: var(--background-color-base, #f7f1e7);

  border-top: 1px solid #cbbda8;
}

.pn-infobox__media .mw-file-element {
  display: block;

  max-width: 100%;
  height: auto;
}

/* ==========================================================
   Infobox data rows
   ========================================================== */

.pn-infobox__rows {
  border-top: 1px solid #b29f86;
}

.pn-infobox__row {
  display: flex;

  background-color: var(--background-color-base, #f7f1e7);

  border-bottom: 1px solid #cbbda8;
}

.pn-infobox__row:last-child {
  border-bottom: 0;
}

.pn-infobox__label,
.pn-infobox__value {
  min-width: 0;

  padding: 0.65rem 0.9rem;

  line-height: 1.35;
}

.pn-infobox__label {
  flex: 0 0 45%;

  background-color: var(--background-color-neutral-subtle, #eee6d8);

  color: var(--color-emphasized, #211d19);

  font-weight: 700;
}

.pn-infobox__value {
  flex: 1 1 auto;

  color: var(--color-base, #312b25);

  border-left: 1px solid #cbbda8;
}

/* ----------------------------------------------------------
   Common value states
   ---------------------------------------------------------- */

.pn-infobox__value--yes {
  color: var(--pn-brand-strong, #0b7f88);

  font-weight: 700;
}

.pn-infobox__value--no {
  color: var(--color-subtle, #756a5b);
}

/* ==========================================================
   Dark appearance border adjustments
   ========================================================== */

html.skin-theme-clientpref-night .pn-infobox {
  border-color: #54595d;
}

html.skin-theme-clientpref-night .pn-infobox__media,
html.skin-theme-clientpref-night .pn-infobox__rows,
html.skin-theme-clientpref-night .pn-infobox__row,
html.skin-theme-clientpref-night .pn-infobox__value {
  border-color: #54595d;
}

@media screen and (prefers-color-scheme: dark) {
  html.skin-theme-clientpref-os .pn-infobox {
    border-color: #54595d;
  }

  html.skin-theme-clientpref-os .pn-infobox__media,
  html.skin-theme-clientpref-os .pn-infobox__rows,
  html.skin-theme-clientpref-os .pn-infobox__row,
  html.skin-theme-clientpref-os .pn-infobox__value {
    border-color: #54595d;
  }
}

/* ==========================================================
   Narrow layouts
   ========================================================== */

@media (max-width: 719px) {
  .pn-entity__aside {
    float: none;

    width: auto;
    max-width: none;

    margin: 0 0 1.5rem;
  }
}