.friend-invite-banner[hidden],
.friend-invite-dialog [hidden] { display: none !important; }

.friend-invite-banner {
  position: relative;
  max-width: 1277px;
  margin: 10px 0 16px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: clamp(15px, 3.8vw, 22px);
  background:
    linear-gradient(#0a1b18, #0a1b18) padding-box,
    linear-gradient(120deg, #a4ef74, #4e7347 24%, #203c32 58%, #53cf57) border-box;
  box-shadow: 0 10px 24px rgb(2 12 8 / .32), 0 0 18px rgb(127 247 81 / .13);
}
.friend-invite-banner > button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.friend-invite-banner img { display: block; width: 100%; height: auto; }

/* Align the clickable button with the artwork for the active language. */
.friend-invite-banner > .friend-invite-button {
  position: absolute;
  top: 59.07%;
  left: 5.09%;
  width: 34.53%;
  height: 21.52%;
  border-radius: 8% / 34%;
}
.friend-invite-banner[data-artwork-lang="es"] > .friend-invite-button {
  top: 56.47%;
  left: 4.06%;
  width: 37.03%;
  height: 20.39%;
}
.friend-invite-banner[data-artwork-lang="fr"] > .friend-invite-button {
  top: 56.73%;
  left: 4.06%;
  width: 37.5%;
  height: 19.69%;
}
@media (hover: hover) {
  .friend-invite-button:hover {
    box-shadow: 0 0 0 2px #dcffa4, 0 0 16px rgb(139 255 57 / .7);
  }
}

.friend-invite-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  margin: 8px auto 4px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #a3e635;
  color: #14220a;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.friend-invite-primary:hover { background: #b6ef58; }

.friend-invite-dialog {
  width: min(100% - 24px, 526px);
  max-height: calc(100% - 24px);
  margin: auto;
  padding: 10px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
}
.friend-invite-dialog::backdrop { background: rgba(0, 0, 0, .56); }
.friend-invite-dialog header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  padding: 0 10px 9px;
}
.friend-invite-dialog h2 {
  grid-column: 2;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
}
.friend-invite-dialog h2:focus { outline: none; }
.friend-invite-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.friend-invite-close:hover { background: var(--surface-2); }
.friend-invite-close svg { width: 21px; height: 21px; }
.friend-invite-status { margin: 8px 12px 4px; font-size: 14px; text-align: center; }
.friend-invite-status:empty { display: none; }
.friend-invite-reward-note {
  margin: 8px 12px 2px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
.friend-invite-link-row { margin: 8px 12px 4px; }
.friend-invite-link-row input {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.friend-invite-channels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(56px, 1fr);
  column-gap: 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scroll-padding-inline: 12px;
  scrollbar-width: thin;
  padding: 4px 12px;
}
.friend-invite-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 77px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.friend-invite-target:hover { text-decoration: underline; }
.friend-invite-icon {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.friend-invite-icon svg { width: 26px; height: 26px; }
.friend-invite-icon-copy { background: #2769e9; }
.friend-invite-icon-whatsapp { background: #138851; }
.friend-invite-icon-facebook { background: #0866ff; }
.friend-invite-icon-x { background: #101115; }
.friend-invite-icon-telegram { background: #197fa7; }
.friend-invite-icon-linkedin { background: #0a66c2; }
.friend-invite-native {
  display: block;
  min-height: 44px;
  margin: 2px auto 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.friend-invite-banner > button:focus-visible,
.friend-invite-dialog :is(button, a, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px), (max-width: 932px) and (pointer: coarse) {
  .friend-invite-dialog {
    position: fixed;
    inset: auto auto 0 0;
    bottom: calc(100% - 100dvh);
    width: 100vw;
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
  }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .friend-invite-dialog[open] { animation: friend-invite-arrive .2s ease-out; }
  @keyframes friend-invite-arrive {
    from { transform: translateY(24px); opacity: .7; }
    to { transform: translateY(0); opacity: 1; }
  }
}
