html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 90px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* ---- Family Wish List ---- */
:root {
  --app-red: #b3262e;
  --app-green: #1f6f43;
}

.app-navbar {
  background: linear-gradient(90deg, var(--app-red), #8e1d24);
}

/* The menu bar stays at the top while scrolling. */
.app-header {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

/* Jumping to an item (#item-12) or section shouldn't leave it hidden under the menu bar. */
html {
  scroll-padding-top: 76px;
}

/* On phones the opened menu can be taller than the screen; let it scroll instead of running off the bottom. */
@media (max-width: 1199.98px) {
  .app-navbar .navbar-collapse {
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
}

.app-navbar .nav-link, .app-navbar .navbar-brand {
  color: #fff;
}

.app-navbar .nav-link:hover {
  color: #ffe9b0;
}

/* Yellow dot on the phone menu button when something in the menu has a count. */
.navbar-toggler {
  position: relative;
}
.nav-new-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffc107;
  border: 2px solid #b3262e;
}

/* Admin > Live traffic chart. */
.traffic-chart {
  width: 100%;
  height: 140px;
  display: block;
  margin-top: .5rem;
  background: repeating-linear-gradient(to top, transparent 0 27px, rgba(0, 0, 0, .05) 27px 28px);
}
.traffic-chart .bar-people { fill: var(--app-green); }
.traffic-chart .bar-bots { fill: #f0ad4e; }
.traffic-chart .bar-err { fill: #dc3545; }
.legend { display: inline-block; width: .8em; height: .8em; border-radius: 2px; vertical-align: -1px; }
.legend-people { background: var(--app-green); }
.legend-bots { background: #f0ad4e; }
.legend-err { background: #dc3545; }
.traffic-agent { max-width: 220px; }

/* "New" lines on the Activity page and home page. */
.activity-new {
  background: #fff8e1;
}

/* Back button for the full-screen (home screen) app; hidden in a normal browser. */
.app-back {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .5);
  padding: .15rem .6rem;
}
.app-back:hover, .app-back:focus {
  color: #fff;
  background: rgba(255, 255, 255, .15);
}

/* In app mode, keep content clear of the iPhone's rounded corners and home bar. */
.app-mode body {
  padding-bottom: env(safe-area-inset-bottom);
}

.btn-primary {
  --bs-btn-bg: var(--app-green);
  --bs-btn-border-color: var(--app-green);
  --bs-btn-hover-bg: #185a36;
  --bs-btn-hover-border-color: #185a36;
  --bs-btn-active-bg: #134a2c;
}

.item-card {
  height: 100%;
}

.item-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid var(--bs-border-color);
  padding: .5rem;
  border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
}

.item-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: #fbf6ee;
}

.item-desc {
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-bought .item-img {
  opacity: .45;
}

.item-hidden {
  border-style: dashed;
}
.item-hidden .item-img {
  opacity: .5;
}

.invite-code {
  font-family: var(--bs-font-monospace);
  font-size: 1.5rem;
  letter-spacing: .2em;
}

.preview-img {
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
}

.announcement {
  border-left: 4px solid var(--app-green);
}

/* Minimized announcements: the title row is the click target, with a turning arrow. */
.announcement-summary {
  cursor: pointer;
  list-style: none;
}
.announcement-summary::-webkit-details-marker {
  display: none;
}
.announcement-summary h3::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  color: var(--app-green);
  transition: transform .15s;
}
details[open] > .announcement-summary h3::before {
  transform: rotate(90deg);
}
details:not([open]) > .announcement-summary {
  padding-top: .6rem;
  padding-bottom: .6rem;
}

/* Show / Hide button inside password boxes (added by site.js). */
.pw-holder {
  position: relative;
}
.pw-input {
  padding-right: 4.5rem;
}
.pw-input::-ms-reveal {
  display: none; /* Edge's own eye icon; ours replaces it */
}
.pw-toggle {
  position: absolute;
  top: 0;
  right: .25rem;
  height: calc(1.5em + .75rem + 2px);
  z-index: 5;
  text-decoration: none;
  color: var(--app-green);
  font-weight: 600;
}
.form-floating > .pw-toggle {
  top: 50%;
  transform: translateY(-50%);
  height: auto;
}

/* Recent activity on the home page: the heading minimizes it, with the same turning arrow. */
.activity-summary {
  cursor: pointer;
  list-style: none;
}
.activity-summary::-webkit-details-marker {
  display: none;
}
.activity-summary h2::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  color: var(--app-green);
  transition: transform .15s;
}
.activity-section[open] > .activity-summary h2::before {
  transform: rotate(90deg);
}
.activity-section[open] .activity-count {
  display: none; /* only useful as a hint while minimized */
}

.announcement-body {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.feedback-msg {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Help & feedback conversations: the member's messages on the left, the admin's indented and tinted. */
.support-msg {
  border-radius: .5rem;
  padding: .5rem .75rem;
  margin-bottom: .5rem;
}
.support-mine {
  background: var(--bs-tertiary-bg);
  margin-right: 2rem;
}
.support-admin {
  background: #e8f3ec;
  border-left: 3px solid var(--app-green);
  margin-left: 2rem;
}

.announcement-img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: .375rem;
}
