/* Discord join modal — L2Galaxy theme */
.discord-join-modal-root {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.discord-join-modal-root.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

body.discord-join-modal-open {
  overflow: hidden;
}

.discord-join-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 9, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mdl--discord {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-width: 26rem;
  overflow: visible;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    rgba(8, 10, 14, 0.96);
  border: 1px solid rgba(222, 202, 89, 0.22);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 48px rgba(222, 202, 89, 0.08);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.35s ease;
}

.discord-join-modal-root.is-open .mdl--discord {
  transform: translateY(0) scale(1);
}

.mdl--discord .mdl__inner,
.mdl--discord .mdl__body {
  overflow: visible;
}

.discord-join-modal {
  padding-top: 4px;
}

.discord-join-modal__heading {
  text-align: center;
  padding: 0 1.25rem 0.65rem;
  box-sizing: border-box;
}

.discord-join-modal__title {
  margin: 0 0 0.5rem;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: clamp(1.25rem, 4vw, 1.625rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff8dd;
}

.discord-join-modal__desc {
  margin: 0;
  color: #d9d2bd;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.discord-modal-widget-wrap {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

.discord-modal-widget-wrap--popup .discord-widget {
  display: block;
  width: 100%;
  max-width: 350px;
  min-height: 340px;
  height: 340px;
  margin: 0 auto;
  border: 0;
  border-radius: 14px;
  background-color: #0a0a0a;
}

.community-discord-overlay {
  position: absolute;
  background-color: #5865f2;
  color: #fff;
  height: 48px;
  width: 150px;
  right: 1px;
  top: 8px;
  z-index: 5;
  font-size: 12px;
  font-weight: 400;
  text-align: end;
  padding-right: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: 20px;
  pointer-events: none;
  box-sizing: border-box;
  opacity: 0.96;
}

.discord-join-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
}

.discord-join-modal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 176px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 16px;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  color: #111;
  background: linear-gradient(180deg, #f1dc7c, #d7b94a);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(222, 202, 89, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.discord-join-modal__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(222, 202, 89, 0.28);
}

.discord-join-modal__close-btn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 30;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  color: #fff8dd;
  background: rgba(16, 18, 22, 0.72);
  border: 1px solid rgba(222, 202, 89, 0.18);
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.discord-join-modal__close-btn:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.discord-join-modal__close-btn:not(:disabled):hover {
  background: rgba(222, 202, 89, 0.28);
  transform: translateY(-1px);
}

.discord-join-modal__close-btn--ready {
  font-size: 1.5rem;
  font-weight: 500;
}

.discord-join-modal__close-label {
  display: block;
  pointer-events: none;
}

.discord-join-modal__never {
  display: none;
  width: auto;
  margin: 0.65rem auto 0;
  padding: 0;
  border: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  outline: none;
  color: rgba(217, 210, 189, 0.72);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.discord-join-modal__never:hover {
  color: #fff4c7;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.discord-join-modal-root .discord-join-modal__never,
.discord-join-modal-root .discord-join-modal__never:hover,
.discord-join-modal-root .discord-join-modal__never:focus {
  background: none;
  box-shadow: none;
}

.discord-join-modal__never.is-visible {
  display: block;
}

@media (max-width: 480px) {
  .discord-join-modal-root {
    padding: 12px;
  }

  .mdl--discord {
    padding: 12px;
    border-radius: 20px;
  }

  .discord-join-modal__heading {
    padding: 0 1.25rem 0.85rem;
  }

  .discord-modal-widget-wrap--popup .discord-widget {
    min-height: 300px;
    height: 300px;
  }
}
