/* Focused post-review tuning: login visibility, Discord actions, and compact alert status. */

/* Keep the custom rarity picker above every later form stage. */
.alert-form > .form-stage:first-of-type {
  position: relative;
  z-index: 40;
}

.primary-fields,
.primary-fields .form-row,
.rarity-picker {
  overflow: visible;
}

.rarity-picker {
  position: relative;
  z-index: 50;
}

.rarity-picker__trigger,
.rarity-picker__menu,
.rarity-picker__option {
  pointer-events: auto;
}

.rarity-picker__menu {
  z-index: 9999 !important;
}

#auth-area > a[href="/auth/discord"],
#auth-area .discord-login-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 176px;
  min-height: 42px;
  color: #fff3e7 !important;
  font-weight: 700;
  border: 1px solid #d45a5a !important;
  background: linear-gradient(180deg, #bd3838 0%, #962727 52%, #6f1919 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -4px 10px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(75, 8, 8, 0.8),
    0 0 18px rgba(162, 34, 34, 0.36) !important;
  text-shadow: 0 1px 0 #3d0909;
}

#auth-area > a[href="/auth/discord"]:hover,
#auth-area .discord-login-link:hover {
  border-color: #ef7777 !important;
  background: linear-gradient(180deg, #d34747 0%, #a92e2e 52%, #7a1c1c 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -4px 10px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(75, 8, 8, 0.82),
    0 0 22px rgba(190, 45, 45, 0.46) !important;
}

#auth-area > a[href="/auth/discord"]:active,
#auth-area .discord-login-link:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

.discord-auth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.discord-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

#auth-area .discord-invite-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px !important;
  color: #f4f2ff !important;
  font-weight: 700;
  border: 1px solid #7d86ea !important;
  background: linear-gradient(180deg, #626ee8 0%, #4c58c9 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -3px 8px rgba(18, 20, 67, 0.32),
    0 4px 10px rgba(0, 0, 0, 0.3) !important;
  text-decoration: none;
}

#auth-area .discord-invite-link:hover {
  border-color: #9da4ff !important;
  background: linear-gradient(180deg, #7480f1 0%, #5965d8 100%) !important;
}

.alert-status-row {
  min-height: 56px;
  gap: 10px;
  padding: 8px 10px;
}

.alert-status-row > div {
  gap: 10px;
}

.alert-status-row .stage-number {
  width: 30px;
  height: 30px;
  font-size: 0.66rem;
}

.alert-status-row h3 {
  font-size: 1.06rem;
}

.alert-status-row p {
  margin-top: 2px;
  font-size: 0.84rem;
  line-height: 1.25;
}

.alert-status-row .ledger-check {
  min-width: 104px;
  min-height: 38px;
  padding: 7px 10px;
  gap: 8px;
  font-size: 0.78rem;
}

.alert-status-row .check-mark {
  width: 17px;
  height: 17px;
}

@media (max-width: 767px) {
  .discord-auth-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #auth-area .discord-login-link,
  #auth-area .discord-invite-link {
    width: 100%;
  }

  .alert-status-row {
    padding: 9px;
  }

  .alert-status-row .ledger-check {
    width: 100%;
    min-height: 40px;
  }
}
