/* App-specific additions on top of pico + foreverscheme. */

.meta {
  color: var(--pico-muted-color);
  margin-bottom: 1rem;
}

body {
  background-color: var(--surface-background);
  /*background-image: url("../img/raw/paper-bg.jpg");*/
  font-size: var(--pico-font-size);
}

/* Every icon is <span class="forever-icon"><img class="forever-icon-{size}"></span>; the span
   carries the theme border on top of the image (an <img> can't have a ::after overlay). */
.forever-icon {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  line-height: 0;
  vertical-align: middle;
}

/* The image sits 2px inside the frame and has rounded corners (% so it scales with every size). */
.forever-icon > img {
  margin: 2px;
  border-radius: 12%;
}

.forever-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/theme/icons/border.png") center / 100% 100% no-repeat;
  pointer-events: none;
}

.forever-icon-tiny {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  object-fit: cover;
  border-radius: 1px;
}

.forever-icon-small {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  object-fit: cover;
  border-radius: 2px;
}

.forever-icon-medium {
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
  object-fit: cover;
  border-radius: 3px;
}

.forever-icon-large {
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

/* The site's footer: its links and the trademark notice. */
main > footer.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pico-muted-border-color);
  text-align: center;
}

/* Upload messages and status badges. */
.collector-message {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--pico-primary);
  background: var(--pico-card-background-color);
}

.collector-message--error {
  border-left-color: var(--pico-del-color);
}

.collector-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
  background: var(--pico-muted-border-color);
}

.collector-badge--new {
  background: #2f5d8a;
  color: #fff;
}

.collector-badge--fill {
  background: #2e6b3a;
  color: #fff;
}

.collector-badge--differs {
  background: #8a5a12;
  color: #fff;
}

/* The Support page's share box (like a tip page's): the link with Copy, round buttons that copy it for the
   platforms with no share address, and a button per platform that has one. */
.share-box {
  max-width: 32rem;
  margin: 0.75rem 0 0.5rem;
  padding: 1rem;
  background: var(--ft-panel-deep, #12100d);
  border: 1px solid var(--ft-metal-dark, #3a2a14);
  border-radius: 12px;
}
.share-box__tip {
  margin: 0 0 0.5rem;
  color: var(--ft-tan, #c6af8d);
  font-size: 0.9rem;
}
.share-box__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}
.share-box .share-box__link input {
  flex: 1;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0.3rem 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
}
.share-box[data-share-box] .share-box__link button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  margin: 0;
  padding: 0.5rem 0.85rem;
  border: 0;
  border-radius: 8px;
  background: var(--ft-ink, #0b0a08);
  background-image: none;
  box-shadow: none;
  color: #fff;
  font-weight: 600;
}
.share-box[data-share-box] .share-box__link button svg {
  width: 1.1rem;
  height: 1.1rem;
}
.share-box__icons {
  display: flex;
  gap: 0.6rem;
  margin: 0.85rem 0;
}
.share-box[data-share-box] button.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  background-image: none;
  box-shadow: none;
}
.share-box[data-share-box] .share-box__icons button.share-icon:hover {
  background-image: none;
  background: rgba(255, 255, 255, 0.16);
}
.share-box[data-share-box] button.share-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}
.share-box[data-share-box] .share-box__icons button.share-icon--discord,
.share-box[data-share-box] .share-box__icons button.share-icon--discord:hover { color: #5865f2; }
.share-box[data-share-box] .share-box__icons button.share-icon--twitch,
.share-box[data-share-box] .share-box__icons button.share-icon--twitch:hover { color: #9146ff; }
.share-box[data-share-box] .share-box__icons button.share-icon--youtube,
.share-box[data-share-box] .share-box__icons button.share-icon--youtube:hover { color: #ff0000; }
.share-box__copied {
  margin: 0 0 0.85rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #2f9e5a;
  border-radius: 8px;
  background: rgba(47, 158, 90, 0.12);
  color: #5fd38d;
  text-align: center;
}
.share-box__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.share-box__button:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.share-box__button svg {
  width: 1rem;
  height: 1rem;
}
.share-box__button--reddit svg { color: #ff4500; }
.share-box__button--bluesky svg { color: #1185fe; }
.share-box__button--x svg { color: #fff; }
.share-box__button--facebook svg { color: #1877f2; }
/* Support Us: Join our Discord, in Discord's own blurple (a button of its own, not in a share box). */
.discord-panel .share-box__button { display: inline-flex; width: auto; padding-inline: 1.1rem; }
.share-box__button--discord { background: #5865f2; }
.share-box__button--discord:hover { background: #4752c4; }
.share-box__button--discord svg { color: #fff; }

/* Upload lists, and an upload's heading with its buttons. */
.upload-lists {
  margin: 0 0 0.75rem;
}
.upload-lists a[aria-current="page"] {
  font-weight: 700;
  text-decoration: none;
}
.upload-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.upload-heading h2 {
  margin: 0;
}
.archive-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}
.archive-form button {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.9rem;
}

/* Notes on an uploaded file (whether it is as the addon saved it). */
.integrity-panel h3 {
  margin-bottom: 0.4rem;
}
.integrity-panel p,
.integrity-panel ul {
  margin-bottom: 0.4rem;
}
.integrity-panel--suspect {
  border-color: #b3402f;
  box-shadow: inset 4px 0 0 #b3402f;
}

/* Collector uploads: Commit's confirmation in a dialog (public/js/collector.js), wide enough for a tame's changes, and
   the notice shown at the bottom of the window after a commit or rejection made in place. */
.collector-toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 1000;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.6rem 1rem;
  transform: translateX(-50%);
  border-left: 4px solid var(--pico-primary);
  background: var(--pico-card-background-color);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.5);
}
