/* RedAI-Web – Discord widget modal (se abre al pulsar el icono de Discord del footer) */

.discord-widget-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.discord-widget-modal.show {
  display: flex;
}

.discord-widget-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.discord-widget-container {
  position: relative;
  background: var(--neo-surface, #101625);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 20px;
  max-width: 95vw;
  max-height: 95vh;
  overflow: auto;
  animation: discordWidgetIn 0.25s ease-out;
}

@keyframes discordWidgetIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.discord-widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.discord-widget-title h2 {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neo-text, #e6e9f2);
}

.discord-widget-title p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--neo-muted, #9aa6bf);
}

.discord-widget-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--neo-text, #e6e9f2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.discord-widget-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

.discord-widget-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 11px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5865f2 0%, #7b4fe0 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
}

.discord-widget-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
  color: #fff;
}

.discord-widget-join:active {
  transform: translateY(0);
}

.discord-widget-frame-wrap {
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

.discord-widget-frame-wrap iframe {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 350px;
  height: 500px;
  border: 0;
}

html[data-mode="light"] .discord-widget-container {
  background: var(--neo-surface, #ffffff);
  border-color: var(--neo-border, rgba(0, 0, 0, 0.1));
}

html[data-mode="light"] .discord-widget-close {
  background: rgba(0, 0, 0, 0.06);
  color: var(--neo-text, #1a1f2e);
}

html[data-mode="light"] .discord-widget-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* Móvil: el widget se adapta al ancho disponible */
@media (max-width: 480px) {
  .discord-widget-container { padding: 14px; }
  .discord-widget-frame-wrap iframe { height: 440px; }
}
