/* ================= REGISTRO.CSS ADAPTADO 3 COLUMNAS ================= */

/* ===== BOX SIZING ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  font-family: Arial, sans-serif;
}

/* ================= MODAL ================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  overflow: hidden; /* evita scroll de fondo */
}

.modal-content {
  width: 1000px;
  max-width: 95%;
  max-height: 95vh;
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  animation: aparecer 0.8s ease;
  overflow-x: visible; /* permite que el tooltip salga a los lados */
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
  font-weight: bold;
}

/* ================= FORMULARIO ================= */
.registro h2 {
  text-align: center;
  color: #8B0000;
  margin-bottom: 20px;
}

/* GRID FLEXIBLE 3 COLUMNAS */
.form-grid-3 {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-grid-3 > .col {
  flex: 1;
  min-width: 250px;
}

/* LABELS */
.col label, .form-grid label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

/* INPUTS */
.control, .col input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #8B0000;
  font-size: 15px;
  transition: border 0.3s, box-shadow 0.3s;
}

.control:focus, .col input:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 6px rgba(231,76,60,0.3);
  outline: none;
}

/* VALIDACIONES VISUALES */
.control.valid, .col input.valid {
  border: 2px solid #28a745;
  background-color: #e6f4ea;
}

.control.invalid, .col input.invalid {
  border: 2px solid #dc3545;
  background-color: #f8d7da;
}

/* BOTONES */
.boton {
  background: #e74c3c;
  color: #fff;
  border-radius: 8px;
  border: none;
  padding: 12px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s, transform 0.2s;
}

.boton:hover {
  background: #c0392b;
  transform: scale(1.02);
}

/* CAPTCHA */
.recaptcha-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 15px 0;
}

/* Tooltip de contraseña */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 220px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 5px;
  padding: 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}
#tooltip-confirm {
  bottom: auto;
  top: 105%;
  left: 0;
  transform: none;
  width: 100%;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
input.valid {
    border: 2px solid #28a745 !important;
    background-color: #e9f7ef !important;
}

input.invalid {
    border: 2px solid #dc3545 !important;
    background-color: #fdecea !important;
}

/* ================= ANIMACIONES ================= */
@keyframes aparecer {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= RESPONSIVE ================= */
@media screen and (max-width: 1024px) {
  .form-grid-3 {
    flex-direction: column;
  }
}

@media screen and (max-width: 768px) {
  .modal-content {
    width: 90%;
    padding: 20px 15px;
  }
}
