/*
 * lostnewbs.css — Estilos compartidos de la marca Lost Newbs
 * Importar en todas las páginas con:
 *   <link rel="stylesheet" href="/common/css/lostnewbs.css">
 */

/* =============================================
   VARIABLES DE MARCA (Custom Properties)
   Define los colores una vez, úsalos en todas partes.
   Si un color cambia, solo se cambia aquí.
   ============================================= */
:root {
  --color-bg:              #E9A79E;
  --color-gradient-start:  #FFD4AD;
  --color-gradient-mid:    #FF947D;
  --color-gradient-end:    #BD8EAF;
  --color-salmon:          #F29274;
  --color-salmon-hover:    #F79B7E;
  --color-text:            #4C4F57;
  --color-text-body:       #451607;
  --color-purple:          #815CFF;
  --color-card:            rgba(255, 255, 255, 0.85);
}

/* =============================================
   BODY — Fondo con gradiente + textura de ruido
   El SVG inline crea una textura sutil encima del gradiente.
   background-size: 512px = tamaño de la textura
                    cover  = el gradiente cubre toda la pantalla
   ============================================= */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    var(--color-bg)
    url('data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20height%3D%22512%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cfilter%20id%3D%22noise%22%3E%20%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.875%22%2F%3E%20%3CfeColorMatrix%20values%3D%220.996%200%200%200%200%200%200.746%200%200%200%200%200%200.637%200%200%200%200%200%200.379%200%22%2F%3E%20%3C%2Ffilter%3E%20%3Crect%20filter%3D%22url%28%23noise%29%22%20width%3D%22512%22%20height%3D%22512%22%2F%3E%3C%2Fsvg%3E')
    fixed,
    linear-gradient(45deg, var(--color-gradient-start) 0%, var(--color-gradient-mid) 55%, var(--color-gradient-end) 100%);
  background-size: 512px, cover;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-body);
  box-sizing: border-box;
}

/* =============================================
   CARD — Panel de vidrio (glassmorphism)
   ¿Qué es glassmorphism?
   Es cuando el fondo de un panel parece vidrio esmerilado:
   semi-transparente + borroso + sombra suave.
   backdrop-filter: blur(12px) = el "vidrio esmerilado"
   ============================================= */
.card {
  background: var(--color-card);
  padding: 3rem 2rem;
  border-radius: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  width: 100%;
}

.container {
  width: 100%;
  max-width: 600px;
}

/* =============================================
   TOGGLE DE IDIOMA (EN/ES)
   Botón fijo en la esquina superior derecha.
   position: fixed = siempre visible aunque hagas scroll
   ============================================= */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  border: 2px solid #2563EB;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}
.lang-btn {
  border: none;
  padding: 7px 11px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  background: transparent;
  color: #4C4F57;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.lang-btn.active {
  background: #2563EB;
  color: white;
}

/* =============================================
   INPUTS Y SELECTS
   Todos los campos del formulario comparten este estilo.
   ============================================= */
input,
select,
textarea {
  width: 100%;
  height: 3.5rem;
  padding: 0 1.25rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  color: var(--color-text);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-salmon);
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='504' height='552' viewBox='0 0 504 552'%3E%3Cpath d='M483.9,210.9L252,442.9L20.1,210.9l67.9-67.9L252,307.1l164.1-164.1L483.9,210.9z' fill='%23666'/%3E%3C/svg%3E");
  background-position: calc(100% - 1rem) center;
  background-repeat: no-repeat;
  background-size: 0.8rem;
  background-color: rgba(255, 255, 255, 0.8);
}

/* =============================================
   BOTÓN PRINCIPAL
   Gradiente salmón, crece un poquito al pasar el mouse.
   transform: scale(1.02) = crece 2% — efecto "botón vivo"
   ============================================= */
button.submit,
.btn-primary {
  width: 100%;
  height: 3.5rem;
  background: linear-gradient(45deg, var(--color-salmon), var(--color-salmon-hover));
  color: white;
  border: none;
  border-radius: 0.625rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
button.submit:hover,
.btn-primary:hover {
  transform: scale(1.02);
  opacity: 0.95;
}
button.submit:disabled,
.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* =============================================
   TOAST NOTIFICATIONS
   ¿Por qué toasts y no alert()?
   alert() bloquea el navegador y es feo.
   Los toasts aparecen abajo de la pantalla,
   se ven bien, y desaparecen solos.

   REGLA: NUNCA usar alert(), confirm() o prompt().
   SIEMPRE usar showToast().
   ============================================= */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px); /* empieza abajo, fuera de pantalla */
  background: #C62828;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  max-width: calc(100vw - 40px);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.toast.show {
  transform: translateX(-50%) translateY(0); /* sube a su posición final */
  opacity: 1;
}
.toast.success {
  background: #2E7D32;
}

/* =============================================
   UTILIDADES
   ============================================= */
.hidden { display: none !important; }

h1, h2, h3 {
  color: var(--color-text);
}

/* =============================================
   RESPONSIVE — Pantallas pequeñas (celulares)
   @media = "si la pantalla es más pequeña que X, aplica esto"
   ============================================= */
@media (max-width: 480px) {
  body {
    padding: 12px;
    align-items: flex-start;
  }
  .card {
    padding: 2rem 1.25rem;
    border-radius: 1.25rem;
  }
  .lang-toggle {
    top: 12px;
    right: 12px;
  }
  .lang-btn {
    padding: 6px 9px;
    font-size: 0.8rem;
  }
}
