/* =========================================================
 * Archivo : assets/css/plt-form.css  
 * Versión : 2.5.0 – 11-jun-2025
 * Estilos PLT para formulario SIMPLIFICADO
 * Personalidad: Geek retro, ASCII art, colores PLT
 * ======================================================= */

/* ──────── CONTENEDOR PRINCIPAL ──────── */
.plt-form-container {
  max-width: 500px;
  width: 100%;
  margin: 2rem auto;
  background-color: #F5F5F3;
  border: 2px solid #2C2C2C;
  padding: 1.5rem;
  font-family: "Courier New", monospace;
  box-sizing: border-box;
  position: relative;
}

/* ──────── ASCII HEADERS DINÁMICOS ──────── */
.plt-ascii-header {
  text-align: center;
  font-size: 1rem;
  color: #2C2C2C;
  margin-bottom: 1rem;
  white-space: pre-line;
  line-height: 1.2;
  overflow-x: auto;
  font-weight: bold;
}

.plt-ascii-coffee {
  margin-bottom: 1.5rem;
  font-weight: bold;
  color: #4A234A;
  text-align: center;
  font-size: 0.9rem;
  overflow-x: auto;
}

.plt-ascii-footer {
  text-align: center;
  margin-top: 15px;
  font-size: 0.8rem;
  color: #9A8D80;
}

/* ──────── ESTRUCTURA DEL FORMULARIO ──────── */
.plt-form-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plt-field input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #9A8D80;
  background-color: #F5F5F3;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  box-sizing: border-box;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.plt-field input:focus {
  border-color: #FFB81C;
  outline: none;
  box-shadow: 0 0 0 1px #FFB81C;
}

.plt-field input:valid {
  border-color: #4A234A;
}

/* ──────── BOTÓN CON MÁXIMA PERSONALIDAD PLT ──────── */
.plt-submit-btn {
  background-color: #FFB81C;
  color: #2C2C2C;
  border: 2px solid #2C2C2C;
  padding: 1rem;
  font-family: "Courier New", monospace;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 1rem;
  -webkit-appearance: none;
  border-radius: 0;
  text-transform: none;
  position: relative;
  overflow: hidden;
}

.plt-submit-btn:hover {
  background-color: #4A234A;
  color: #F5F5F3;
  border-color: #FFB81C;
  transform: translateY(-1px);
}

.plt-submit-btn:active {
  transform: translateY(0);
}

/* Elemento geek antes del texto del botón */
.plt-geek-element::before {
  content: "(>_■) < ";
  color: #2C2C2C;
  font-weight: bold;
}

.plt-submit-btn:hover .plt-geek-element::before {
  color: #FFB81C;
}

/* ──────── MENSAJES DE ESTADO CON PERSONALIDAD ──────── */
.plt-message-box {
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  min-height: 20px;
  text-align: center;
}

.plt-error {
  color: #d32f2f;
  font-weight: bold;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background-color: rgba(211, 47, 47, 0.1);
  border-left: 3px solid #d32f2f;
}

.plt-success {
  color: #388e3c;
  font-weight: bold;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background-color: rgba(56, 142, 60, 0.1);
  border-left: 3px solid #388e3c;
}

.plt-info {
  color: #1976d2;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background-color: rgba(25, 118, 210, 0.1);
  border-left: 3px solid #1976d2;
}

/* Spinner animado */
.plt-spinner {
  display: inline-block;
  animation: plt-spin 1.5s linear infinite;
  font-size: 1.5rem;
}

@keyframes plt-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ──────── ESTILOS PARA EL EDITOR (Gutenberg) ──────── */
.plt-form-editor-preview {
  background-color: #F5F5F3;
  border: 2px solid #2C2C2C;
  padding: 1.5rem;
  text-align: center;
  font-family: "Courier New", monospace;
  margin: 1rem 0;
}

.plt-preview-header {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #2C2C2C;
}

.plt-preview-ascii {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #4A234A;
  white-space: pre-line;
}

.plt-preview-note {
  font-size: 0.9rem;
  color: #9A8D80;
  margin-top: 0.5rem;
}

/* ──────── RESPONSIVE DESIGN ──────── */
@media screen and (max-width: 480px) {
  .plt-form-container {
    margin: 1rem auto;
    padding: 1rem;
    border-width: 1px;
  }
  
  .plt-ascii-header {
    font-size: 0.8rem;
  }
  
  .plt-field input {
    padding: 0.7rem;
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  .plt-submit-btn {
    padding: 0.8rem;
    min-height: 44px; /* Altura mínima para interacción táctil */
  }
  
  .plt-ascii-coffee {
    font-size: 0.8rem;
    overflow-x: auto;
  }
  
  /* Asegura que el captcha sea responsive */
  .h-captcha {
    transform-origin: left top;
    transform: scale(0.9);
    margin-bottom: 10px;
  }
}

/* Ajustes para dispositivos muy pequeños */
@media screen and (max-width: 320px) {
  .plt-ascii-header {
    white-space: normal;
    font-size: 0.7rem;
  }
  
  .plt-form-container {
    padding: 0.8rem;
  }
  
  .h-captcha {
    transform: scale(0.8);
  }
  
  .plt-ascii-coffee {
    display: none; /* Ocultar en pantallas muy pequeñas */
  }
}

/* ──────── EFECTOS ADICIONALES PLT ──────── */
.plt-form-container::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #FFB81C, #4A234A, #FFB81C);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.plt-form-container:hover::before {
  opacity: 0.1;
}

/* Animación sutil para los placeholders */
.plt-field input::placeholder {
  color: #9A8D80;
  transition: color 0.2s ease;
}

.plt-field input:focus::placeholder {
  color: #FFB81C;
}
