Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:NavCell/styles.css: Difference between revisions

Template page
No edit summary
No edit summary
Line 48: Line 48:


.navcell-ui {
.navcell-ui {
   width: 232px; /* was 216 */
   width: 260px; /* wide enough to contain Up and Down */
   box-sizing: border-box;
   box-sizing: border-box;
   margin: 10px auto 0 auto;
   margin: 10px auto 0 auto;
Line 100: Line 100:
   justify-content: space-between;
   justify-content: space-between;
   gap: 12px;
   gap: 12px;
   width: 232px; /* was 216 */
 
   width: 236px; /* inner content width */
   box-sizing: border-box;
   box-sizing: border-box;
  margin: 0 auto;
}
}


Line 152: Line 154:
}
}


/* Mobile: ALWAYS fixed like a gamepad, above Citizen footer */
/* Mobile: fixed pad near bottom, centered, no calc/env/transform */


@media screen and (max-width: 759px) {
@media screen and (max-width: 759px) {
   .navcell-ui {
   .navcell-ui {
     position: fixed !important;
     position: fixed !important;
     left: 50% !important;
     left: 0 !important;
 
    right: 0 !important;
     /* keep it above mobile toolbars + footer */
     bottom: 92px !important; /* raise above browser and Citizen bars */
     bottom: 120px !important;
     margin-left: auto !important;
 
     margin-right: auto !important;
     transform: translateX(-50%) !important;


    /* win z-index wars */
     z-index: 9999 !important;
     z-index: 2147483647 !important;


    margin: 0 !important;
     padding: 10px 12px !important;
     padding: 10px 12px !important;


Line 177: Line 175:
   }
   }


   /* Make room so the fixed pad never gets covered by footer */
   /* keep page text from sitting under the pad */
   .navcell {
   .navcell {
     padding-bottom: 260px !important;
     padding-bottom: 280px !important;
   }
   }


   /* If Citizen footer is overlaying, shove it behind our pad */
   /* try to prevent footer overlay winning the stacking */
  footer,
   .mw-footer,
   .mw-footer,
   footer,
   .mw-body-footer,
  .mw-page-footer,
   .citizen-footer,
   .citizen-footer,
   .mw-body-footer {
   .citizen-footer__container,
  .citizen-footer__content,
  .citizen-footer__bottom {
     position: relative !important;
     position: relative !important;
     z-index: 1 !important;
     z-index: 0 !important;
   }
   }
}
}

Revision as of 01:14, 21 December 2025

/* Base */

.navcell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  box-sizing: border-box;
}

.navcell-top {
  width: 100%;
  box-sizing: border-box;
}

/* Text blocks: tighter, smaller */

.navcell-desc,
.nav-nearby,
.navcell-lore {
  width: 94%;
  margin: 8px auto 0 auto;
  padding: 8px 10px;

  font-size: 0.88em;
  line-height: 1.12;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;

  background: transparent;
  border: 1px solid rgba(120, 140, 180, 0.25);
  border-radius: 12px;
  box-sizing: border-box;
}

.navcell-desc p,
.nav-nearby p,
.navcell-lore p,
.navcell-desc div,
.nav-nearby div,
.navcell-lore div {
  margin: 0;
  padding: 0;
}

/* Inline nav (desktop default) */

.navcell-ui {
  width: 260px; /* wide enough to contain Up and Down */
  box-sizing: border-box;
  margin: 10px auto 0 auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  background: #222;
  border: 1px solid #444;
  border-radius: 7px;

  color: #eee;
  text-align: center;

  font-size: 0.72em;
  line-height: 1.05em;

  box-sizing: border-box;
}

.nav-btn a {
  color: inherit;
  text-decoration: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.nav-btn:hover {
  background: #333;
  border-color: #777;
}

.nav-empty,
.nav-center {
  background: transparent;
  border: none;
}

/* Gamepad layout inside the nav pad */

.nav-pad-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  width: 236px; /* inner content width */
  box-sizing: border-box;
  margin: 0 auto;
}

.nav-dpad {
  display: grid;
  grid-template-columns: 46px 46px 46px;
  grid-template-rows: 38px 38px 38px;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-dpad .nav-btn {
  width: 46px;
  height: 38px;
}

.nav-ud {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-ud .nav-btn {
  width: 46px;
  height: 38px;
  font-size: 0.7em;
}

/* Desktop wide: keep text and inline nav side by side */

@media screen and (min-width: 760px) {
  .navcell-top {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    padding: 0 10px;
  }

  .navcell-left {
    flex: 1 1 auto;
    max-width: 720px;
  }

  .navcell-ui {
    flex: 0 0 auto;
    margin-top: 8px;
  }
}

/* Mobile: fixed pad near bottom, centered, no calc/env/transform */

@media screen and (max-width: 759px) {
  .navcell-ui {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 92px !important; /* raise above browser and Citizen bars */
    margin-left: auto !important;
    margin-right: auto !important;

    z-index: 9999 !important;

    padding: 10px 12px !important;

    background: rgba(0, 0, 0, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  }

  /* keep page text from sitting under the pad */
  .navcell {
    padding-bottom: 280px !important;
  }

  /* try to prevent footer overlay winning the stacking */
  footer,
  .mw-footer,
  .mw-body-footer,
  .mw-page-footer,
  .citizen-footer,
  .citizen-footer__container,
  .citizen-footer__content,
  .citizen-footer__bottom {
    position: relative !important;
    z-index: 0 !important;
  }
}