.form-modal::-webkit-scrollbar {
  width: 10px;              /* ancho del scroll */
}

.form-modal::-webkit-scrollbar-track {
  background: transparent;      /* fondo del track */
  border-radius: 10px;
}

.form-modal::-webkit-scrollbar-thumb {
  background: #052a51;      /* color del thumb */
  border-radius: 10px;
}

.form-modal::-webkit-scrollbar-thumb:hover {
  background: #041f3d;      /* hover */
}

.billing-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0); /* empezamos transparente */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;             /* invisible al inicio */
  pointer-events: none;   /* no clickeable mientras está oculto */
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.billing-popup.active {
  opacity: 1;
  background: rgba(0,0,0,0.6); /* fondo oscuro visible */
  pointer-events: auto;        /* habilitamos clics */
}

.billing-popup-content {
  background: #fffdf5;
  border: 2px dashed #d4af37;
  padding: 24px;
  border-radius: 14px;
  text-align: center;
  min-width: 300px;
  transform: translateY(-20px);  /* inicia un poco arriba */
  opacity: 0;                     /* inicia invisible */
  transition: all 0.3s ease;
}

.billing-popup.active .billing-popup-content {
  transform: translateY(0); /* baja suavemente a su posición */
  opacity: 1;               /* se vuelve visible */
}

.billing-popup-content h3 {
  margin-bottom: 16px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.billing-options {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.billing-btn {
  flex: 1;
  padding: 12px 0;
  border: 1px solid var(--primary);
  border-radius: 12px;
  cursor: pointer;
  background: #f9fbfd;
  font-weight: 600;
  transition: all 0.3s;
}

.billing-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.billing-btn:hover {
  background: var(--primary-light);
  color: #fff;
}

.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-overlay.active {
  display: block;
  opacity: 1;
}

.form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  z-index: 1000;
  display: none;
  opacity: 0;
  transform: translate(-50%, -45%) scale(0.96);
  transition: all 0.35s ease;
}

.form-modal.active {
  display: block;
  opacity: 1;
}

.form-modal h2 {
  margin-bottom: 25px;
  color: var(--primary);
  text-align: center;
}

.form-group {
  display: flex;
  gap: 15px;
  margin-bottom: 18px;
}

.form-group input,
.form-group select{
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d1d9e6;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  background: #f9fbfd;
}

.subsection-title {
  font-size: 1.05rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 600;
}

.field-with-error {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.input-error-text {
  display: none;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #e74c3c;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.input-error-text.show {
  display: block;
  opacity: 1;
}



#area{
  margin-bottom: 10px;
}

#otherArea{
  margin-bottom: 10px;
}

#skillInput{
  margin-bottom: 10px;
}

.input-add-container {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#addSkillBtn {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 0 14px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#addSkillBtn:active {
  transform: scale(0.95);
}

@media (max-width: 480px) {
  .input-add-container {
    flex-direction: row;
    gap: 6px;
  }

  #addSkillBtn {
    padding: 0 12px;
    font-size: 1.1rem;
  }
}



/* ---------- CV ---------- */
.upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fbfd;
  border: 1px solid #d1d9e6;
  border-radius: 10px;
  padding: 10px;
  color: var(--primary);
  font-size: 0.9rem;
}

.cv-preview i {
  font-size: 1.4rem;
}

#cvError{
  margin-top: 5px;
}

.form-group input:focus,
.form-group select:focus{
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5,42,81,0.12);
}

.submit-btn {
  width: 100%;
  padding: 15px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-light)
  );
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(5,42,81,0.35);
}

.submit-btn:active {
  transform: scale(0.97);
}

.close-form {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #999;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-form:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.premium-only {
  background: #fdfbf4;
  border: 1px dashed var(--gold-premium);
  padding: 14px;
  border-radius: 12px;
}




.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--primary);
}

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch input {
  display: none;
}

.slider {
  width: 46px;
  height: 26px;
  background: #ccc;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: 0.3s;
}

.slider::before {
  content: "";
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}



@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group input:hover,
.form-group select:hover,
textarea:hover {
  border-color: var(--primary);
}


.upload-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 2px dashed var(--primary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.upload-box:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

textarea#presentation {
  margin-top: 10px;
  resize: none;
  min-height: 100px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 100%;
  transition: all 0.25s ease;
}

textarea#presentation:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 42, 81, 0.15);
}

.candidate-form {
  display: flex;
  flex-direction: column;
}

.form-section {
  margin-bottom: 28px;
  animation: fadeUp 0.5s ease both;
}

.form-section h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section-address h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: all 0.25s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5,42,81,0.15);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--primary);
}

.form-group {
  display: flex;
  gap: 15px;
  margin-bottom: 18px;
}

.form-group.column {
  flex-direction: column;
}


select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%23052a51' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

select[multiple] {
  height: auto;
  padding: 12px;
  background-image: none;
}


input[list] {
  cursor: pointer;
}


#skills {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chip {
  background: var(--primary);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip button {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: -5px;
}

.add-btn {
  background: transparent;
  border: 1px dashed var(--primary);
  color: var(--primary);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.25s;
}

.add-btn:hover {
  background: var(--primary-soft);
}

.remove-btn {
  pointer-events: auto;
  z-index: 10;
  cursor: pointer;
  background: transparent;
  border: none;
}


.remove-btn:hover{
    cursor: pointer;
}


.upload-box {
  border: 2px dashed var(--primary);
  padding: 18px;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  background: var(--bg-input);
  color: var(--primary);
  margin-bottom: 10px;
}

.upload-box i {
  font-size: 1.6rem;
  margin-bottom: 6px;
  display: block;
}

.upload-box:hover {
  background: var(--primary-soft);
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Mensajes de error específicos para habilidades y estudio */
#error, .error {
  color: var(--danger, #e74c3c);
  font-size: 0.85rem;
  display: block;
  margin-top: -8px;  /* sube un poco el mensaje hacia el input */
  margin-bottom: 15px; /* espacio debajo del mensaje */
}



.account-box {
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 14px;
  background: var(--bg-input);
}

.account-box input{
  margin-bottom: 10px;
  margin-top: 10px;
}


.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--primary);
}

.switch input {
  display: none;
}

.slider {
  width: 46px;
  height: 26px;
  background: #ccc;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: 0.3s;
}

.slider::before {
  content: "";
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.input-error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.35) !important;
}

.input-success {
  border-color: #2ecc71 !important;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.35) !important;
}

select.input-error {
  border: 2px solid #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.35) !important;
}

select.input-success {
  border: 2px solid #2ecc71 !important;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.35) !important;
}



.phone-dropdown {
  position: relative;
  width: 220px;
  cursor: pointer;
  font-family: sans-serif;
}
.phone-dropdown .selected {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 4px;
  position: relative;
}
.phone-dropdown .selected img {
  width: 20px;
  height: 14px;
  object-fit: cover;
}
.phone-dropdown .options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  border: 1px solid #ccc;
  max-height: 250px;
  overflow-y: auto;
  background: white;
  z-index: 10000000;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.phone-dropdown.active .options {
  display: block;
}
.phone-dropdown .options li {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
}
.phone-dropdown .options li:hover {
  background: #f0f0f0;
}
.phone-dropdown .options img {
  width: 20px;
  height: 14px;
  object-fit: cover;
}



.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(5,42,81,0.35);
}

.submit-btn:active {
  transform: scale(0.97);
}



#addressCountry {
  height: 50px;
}


#addressCountry option {
  font-size: 0.9rem;
  padding: 6px 10px;
}




.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px; /* espacio para el ojito */
}

.password-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #999;
  font-size: 16px;
}

.password-wrapper .toggle-password:hover {
  color: #333;
}

.password-rules {
  display: none;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #e53935; /* rojo */
}

.password-match {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #e53935;
}

.password-rules.valid {
  color: #28a745; /* verde */
}

.password-rules.invalid {
  color: #dc3545; /* rojo */
}

.password-match.valid {
  color: #28a745;
}

.password-match.invalid {
  color: #dc3545;
}




.form-message {
  display: none;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  animation: fadeDown 0.35s ease;
}

.form-message.error {
  display: block;
  background: #fdecea;
  color: #b42318;
  border: 1px solid #f5c2c7;
}

.form-message.success {
  display: block;
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Overlay que bloquea el fondo */
.overlay-emailVerification {
  display: none; /* mientras probamos, luego lo pones en none */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5); /* semi-transparente */
  z-index: 9998; /* detrás del cuadro */
}

/* Contenedor del cuadro de verificación */
#emailVerificationBox {
  display: none; /* mientras probamos */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* centra perfectamente */
  width: 350px; /* ancho fijo o adaptativo */
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  z-index: 9999; /* encima del overlay */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Texto principal del cuadro */
#verifyEmailText {
  margin-bottom: 8px;
  font-weight: 600;
}

/* Input de código de verificación */
#verificationCode {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 2px solid #052a51;
  margin-bottom: 10px;
  font-size: 14px;
  text-align: center;
}

#verificationCode:focus{
  border: none;
}

/* Botón de verificar código */
#verifyCodeBtn {
  width: 100%;
  padding: 10px;
  background: #052a51;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* Opcional: hover para el botón */
#verifyCodeBtn:hover {
  background: #031a32;
}

/* Botón de reenviar código */
#resendCodeBtn {
  width: 100%;
  padding: 10px;
  background: #ccc; /* gris cuando está deshabilitado */
  color: #333;
  border: none;
  border-radius: 6px;
  cursor: not-allowed; /* cursor distinto mientras está deshabilitado */
  font-weight: 600;
  margin-top: 8px;
  transition: background 0.3s, color 0.3s;
}

/* Cuando está habilitado */
#resendCodeBtn:enabled {
  background: #052a51;
  color: white;
  cursor: pointer;
}

#resendCodeBtn:enabled:hover {
  background: #031a32;
}



@media (max-width: 480px) {
  .form-group {
    flex-direction: column;
  }

  .form-modal {
    padding: 22px;
  }
}

@media (max-width: 600px) {
  .form-modal {
    max-height: 100vh;
    border-radius: 0;
  }
}

@media (max-width: 400px) {
  .submit-btn {
    font-size: 0.95rem;
    padding: 13px;
  }
}



.terms-container {
  margin-top: 25px;
  margin-bottom: 25px;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.terms-checkbox input {
  display: none;
}

/* CAJA */
.checkmark {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid #052a51;
  background: white;
  position: relative;
  transition: 0.25s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

/* CHECK */
.terms-checkbox input:checked + .checkmark {
  background: #052a51;
  border-color: #052a51;
}

.terms-checkbox input:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 14px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.terms-text {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.terms-link {
  margin-top: 4px;
  background: none;
  border: none;
  color: #052a51;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.terms-link:hover {
  opacity: 0.8;
}

/* MODAL */
.terms-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 99999;
}

.terms-modal-box {
  width: 92%;
  max-width: 700px;
  max-height: 85vh;

  overflow-y: auto;

  background: white;
  border-radius: 20px;

  padding: 30px;

  box-shadow: 0 20px 60px rgba(0,0,0,0.3);

  animation: popupTerms 0.25s ease;
}

.terms-modal-box h2 {
  color: #052a51;
  margin-bottom: 20px;
  text-align: center;
}

.terms-content {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.terms-content ol {
  padding-left: 20px;
}

.close-terms-btn {
  margin-top: 25px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #052a51;
  color: white;
  font-weight: 600;
  cursor: pointer;

  transition: 0.2s ease;
}

.close-terms-btn:hover {
  transform: translateY(-2px);
}

.hidden {
  display: none !important;
}

@keyframes popupTerms {
  from {
    opacity: 0;
    transform: scale(.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}