/*
 * Discord OAuth login consent modal.
 * Triggered by js/oauth-popup.js for data-oauth-popup links that point
 * at the /auth/login endpoint. Shown once per browser (localStorage).
 */

.sl-oauth-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 18, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: sl-oauth-fade 0.2s ease-out;
}

.sl-oauth-consent-overlay.is-open { display: flex; }

body.sl-oauth-consent-open { overflow: hidden; }

@keyframes sl-oauth-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sl-oauth-consent-card {
  position: relative;
  background: linear-gradient(160deg, #1e2135 0%, #242842 100%);
  border: 1px solid rgba(255, 92, 0, 0.22);
  border-radius: 18px;
  padding: 2.25rem 2rem 1.75rem;
  max-width: 540px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  color: #e0e4f0;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: sl-oauth-pop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

@keyframes sl-oauth-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sl-oauth-consent-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: transparent;
  color: #8a91ab;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sl-oauth-consent-close:hover,
.sl-oauth-consent-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  outline: none;
}

.sl-oauth-consent-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 auto 1.15rem;
  width: 100%;
}

.sl-oauth-hero-badge {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  flex-shrink: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.sl-oauth-hero-badge img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(255, 92, 0, 0.28));
}

.sl-oauth-hero-discord {
  color: #5865F2;
  filter: drop-shadow(0 8px 18px rgba(88, 101, 242, 0.32));
}

.sl-oauth-hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b7bdd0;
  font-size: 1.4rem;
  padding: 0 0.1rem;
  flex-shrink: 0;
  position: relative;
}

.sl-oauth-hero-link::before,
.sl-oauth-hero-link::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.85rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.22) 100%);
  border-radius: 2px;
}

.sl-oauth-hero-link::before {
  right: 100%;
  margin-right: 0.2rem;
}

.sl-oauth-hero-link::after {
  left: 100%;
  margin-left: 0.2rem;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.22) 100%);
}

.sl-oauth-consent-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.sl-oauth-consent-intro {
  margin: 0 0 1.25rem;
  color: #b7bdd0;
  line-height: 1.55;
  font-size: 0.96rem;
}

.sl-oauth-consent-intro strong { color: #fff; }

.sl-oauth-consent-section {
  margin: 1.35rem 0 0.55rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.sl-oauth-consent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sl-oauth-consent-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #c8ccdd;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}

.sl-oauth-consent-list.neg li {
  background: rgba(255, 92, 0, 0.04);
  border-color: rgba(255, 92, 0, 0.14);
}

.sl-oauth-consent-list li strong {
  color: #fff;
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 600;
}

.sl-oauth-i {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  margin-top: 0.12rem;
  line-height: 1;
}

.sl-oauth-i.pos { background: rgba(52, 211, 153, 0.16); color: #34d399; }
.sl-oauth-i.neg { background: rgba(255, 92, 0, 0.18); color: #ff7a33; }

.sl-oauth-consent-footer {
  margin: 1.35rem 0 0;
  font-size: 0.84rem;
  color: #8a91ab;
  line-height: 1.6;
}

.sl-oauth-consent-footer a {
  color: #ff7a33;
  text-decoration: none;
}
.sl-oauth-consent-footer a:hover { text-decoration: underline; }

.sl-oauth-consent-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.sl-oauth-consent-cancel,
.sl-oauth-consent-continue {
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s, border-color 0.18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  line-height: 1;
}

.sl-oauth-consent-cancel {
  background: transparent;
  color: #b7bdd0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sl-oauth-consent-cancel:hover,
.sl-oauth-consent-cancel:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  outline: none;
}

.sl-oauth-consent-continue {
  background: linear-gradient(135deg, #5865F2, #4752c4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
}

.sl-oauth-consent-continue:hover,
.sl-oauth-consent-continue:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.45);
  outline: none;
}

.sl-oauth-consent-continue:active { transform: translateY(0); }

@media (max-width: 560px) {
  .sl-oauth-consent-card {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 14px;
  }
  .sl-oauth-consent-actions {
    flex-direction: column-reverse;
  }
  .sl-oauth-consent-actions button {
    width: 100%;
  }
}
