/* MUDWAVE TECH UI - FIXED */
:root { 
  --mw-brand: #3EC6C6; 
  --mw-navy: #1A3444;  
  --mw-bg-input: rgba(0,0,0,0.25);
}

body.mw-modal-open { overflow: hidden; }

/* FIX CURSOR: Siempre arriba del todo, incluso por encima del popup */
#cursor { z-index: 9999999 !important; }
#cursor-ring { z-index: 9999998 !important; }

/* Ocultar el cursor nativo del sistema cuando estemos encima del modal o sus campos */
.mw-overlay, .mw-modal, .mw-card, .mw-card * { 
  cursor: none !important; 
}

/* Fondo difuminado */
.mw-overlay {
  position: fixed; inset: 0; 
  background: rgba(15, 34, 51, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; 
  z-index: 99998;
}

/* Contenedor principal del modal (Invisible por defecto, pero permite que la tarjeta se vea cuando la llamamos) */
.mw-modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  visibility: hidden; pointer-events: none; 
  z-index: 99999; padding: 16px;
  font-family: 'Montserrat', sans-serif;
}

/* Clases Activas */
.mw-overlay.active { pointer-events: auto; }
.mw-modal.active { visibility: visible; pointer-events: auto; }

/* Tarjeta principal estilo Dashboard */
.mw-card {
  width: 100%; max-width: 500px;
  background: var(--mw-navy);
  border: 1px solid rgba(62, 198, 198, 0.2);
  border-radius: 6px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6), 0 0 40px rgba(62, 198, 198, 0.08);
  padding: 2.8rem 2.5rem;
  position: relative;
  opacity: 0; /* Empieza oculto para GSAP */
}

.mw-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--mw-brand);
  box-shadow: 0 0 15px var(--mw-brand);
}

.mw-card h3 { 
  margin: 0 0 1.8rem; color: #fff; font-size: 1.8rem; font-weight: 800; line-height: 1.1;
}

.mw-close {
  all: unset; position: absolute; top: 1.2rem; right: 1.2rem; 
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px;
  transition: all 0.2s; font-size: 1.5rem;
}
.mw-close:hover { 
  background: rgba(62,198,198,0.1); color: var(--mw-brand); border-color: rgba(62,198,198,0.4);
}

/* Inputs */
.mw-field { margin: 0 0 1.2rem; opacity: 0; /* Empieza oculto para cascada GSAP */ }
.mw-field label { 
  display: block; font-family: 'Roboto Mono', monospace; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.85); margin: 0 0 0.5rem; 
}
.mw-field label span { color: #ff5a2a; }

.mw-field input, .mw-field textarea {
  width: 100%; border: 1px solid rgba(255,255,255,0.08); border-radius: 4px;
  padding: 0.85rem 1rem; font-size: 0.9rem; font-family: 'Montserrat', sans-serif;
  color: #fff; background: var(--mw-bg-input); outline: none; box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.mw-field textarea { min-height: 100px; resize: vertical; }

.mw-field input:focus, .mw-field textarea:focus {
  border-color: var(--mw-brand); background: rgba(15,34,51,0.9);
  box-shadow: 0 0 0 3px rgba(62,198,198,0.15);
}

/* Botón Submit */
.mw-submit {
  width: 100%; background: var(--mw-brand); color: var(--mw-navy);
  font-family: 'Montserrat', sans-serif; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 1.1rem 2rem;
  border: none; border-radius: 4px; transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 1rem; opacity: 0; /* Empieza oculto para GSAP */
}
.mw-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(62,198,198,0.25); }
.mw-submit.loading { opacity: 0.7; pointer-events: none; }

/* Mensajes */
.mw-response-msg { display: none; margin-top: 1rem; padding: 1rem; border-radius: 4px; font-size: 0.85rem; text-align: center; font-weight: 600; }
.mw-response-msg.error { background: rgba(255, 90, 42, 0.1); border: 1px solid rgba(255, 90, 42, 0.4); color: #ff5a2a; }
.mw-response-msg.success { background: rgba(62, 198, 198, 0.05); border: 1px solid var(--mw-brand); color: var(--mw-brand); }